News:

Wondering if this will always be free?  See why free is better.

Main Menu

Thumbnail on Topic Listing

Started by SMFHacks.com Team, April 04, 2008, 01:05:48 PM

Previous topic - Next topic

jafonseca

Nothing at all, cant connect to database

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jafonseca

Quote from: vbgamer45 on June 06, 2018, 02:10:50 PM
Undo what you changed
teh same


Expression #30 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hdclasic.big.id_attach' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Archivo: /home/uhdcl/public_html/Sources/MessageIndex.php
Línea: 421

well I think new versions of mysql are incompatible with some mods

vbgamer45

That is true. I would have to redo the queries to make it work.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jafonseca

Quote from: vbgamer45 on June 06, 2018, 02:19:36 PM
That is true. I would have to redo the queries to make it work.

Thanks !! :) :)

MamaTea

Quote from: mikeymx5 on January 03, 2010, 01:53:14 PM
Any chance on adding the core into your code, I dont like doing manual editing of files and I have no intention of using the crappy curve theme.

its very easy to do.

in themes/core/MessageIndex.template.php

Find
<th width="9%" colspan="2" class="catbg3 headerpadding">&nbsp;</th>
replace with
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding">&nbsp;</th>

Find
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>

Replace with
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';

$imagefound = false;

foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;

if (isset($image['id']))
{

echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}

echo '</td>';
}

// End Thumbnail Topic Mod

echo '
</td>



Please add this to your install file
Thanks



SOO, I followed this in my custom theme in 2.0.15..  I understood that it may not work since this post is so old and I do not know much about coding- or what has changed in the SMF code over the years.


So, while it did make the mod work,  it made my theme all shotty- a lot of the colors set behind words are gone and this type of thing.  Any suggestions?

Here is the original:
<th scope="col" class="first_th" style="width: 8%;" colspan="2">&nbsp;</th>


Here is my updated bit:
<th scope="col" class="first_th" style="width: 8%;" colspan="', $context['show_thumbnails'] ? 3 : 2, '">&nbsp;</th>


Here is the original:
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>


Here is my updated bit:
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';

$imagefound = false;

foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;

if (isset($image['id']))
{

echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}

echo '</td>';
}

// End Thumbnail Topic Mod

echo '
</td>



Attached below are both of these files as a whole

vbgamer45

Looks ok I would change class="windowbg2"
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MamaTea

Quote from: vbgamer45 on June 25, 2018, 10:58:15 PM
Looks ok I would change class="windowbg2"


Thanks for your input!! 

Do you mean to change class in one of these examples, both of them, throughout the entire file, or...?

I really appreciate it.  I'm glad to be learning more on this every day...

vbgamer45

Just in your example for echo '<td class="windowbg2" valign="middle" align="center">';
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MamaTea

Ok, after messing with that code a bit and nothing changing, I downloaded the original again.. and there was something wrong with it.  so it doesn't actually have to do with this code.  thank you though.

DreadPirateRoberts

This mod works great but for some reason this mod works for every board except one? im using smf 2.0.17 I need help
Welcome to Agora Road's Macintosh Cafe || A retro design vaporwave community forum! Enjoy your stay!

vbgamer45

What's the board id? How many boards do you have?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DreadPirateRoberts

Quote from: vbgamer45 on April 24, 2020, 06:47:13 PM
What's the board id? How many boards do you have?

The board id is 26 and I have 11 boards ( I know its weird but I have made and delete boards in the past). I seemed to have fix it by creating a new board and moving all topics to that board. Then I toggled "thumbnails" on the board modifications and moved all the topics back and it seems to have worked.

However there is a new problem. It works on the first page but not in any pages after that
Welcome to Agora Road's Macintosh Cafe || A retro design vaporwave community forum! Enjoy your stay!

SMFHacks.com Team

Update
Version 4.0
!Fixed a case where if you are just using linked images the column for thumbnail topic will not appear
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

vbgamer45

@DreadPirateRoberts I did fix one bug I saw in the mod above.
Note the column only appears if there is an image found in the first post. either attached or linked


Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

pocttopus

Hello there.
I am trying to update this mod so I cannot find these lines in ./Sources/ManageSettings.php to remove before uninstalling 3.0.1 version.
How can I solve this issue?

Code: (Find) [Select]
// Thumbnail Topic Mod: Update the database setting for "photo_boards"
$photo_board = isset($_POST['thumbnail']);
if ($photo_board && !in_array($_POST['boardid'], $context['photo_boards']))
$context['photo_boards'][] = $_POST['boardid'];
else if (!$photo_board && in_array($_POST['boardid'], $context['photo_boards']))
{
foreach ($context['photo_boards'] as $id => $board)
{
if ($_POST['boardid'] == $board)
unset($context['photo_boards'][$id]);
}
}
updateSettings( array( 'photo_boards' => implode(',', $context['photo_boards']) ) );

// Create a new board...


Code: (Replace) [Select]

// Create a new board...

vbgamer45

That should be in ManageBoards.php I belive
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

pocttopus

#497
Oh... but why is it saying that I need to remove those lines from ManageSettings.php instead of ManageBoards.php?
Sorry but I'm little confused.  :o ???




EDIT  O:) !Somehow I have managed to uninstall the previous version without removing lines from any file and installed the latest 4.0 version without issues.



vbgamer45

Test failed  above says for this code

<file name="$sourcedir/ManageSettings.php">
<operation>
<search position="before"><![CDATA[// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!]]></search>
<add><![CDATA[
'',
// Thumbnail Topic Settings
array('int', 'topic_thumb_height'),
array('int', 'topic_thumb_width'),
]]></add>
</operation>
</file>
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

pocttopus

Hello,

This is a nice mod, is there any chance to be available for 2.1rc2 version?
I am testing a new forum and I was curious about this mod.

Advertisement: