Advertisement:

Author Topic: Thumbnail on Topic Listing  (Read 186565 times)

Offline jafonseca

  • Semi-Newbie
  • *
  • Posts: 59
Re: Thumbnail on Topic Listing
« Reply #480 on: June 06, 2018, 02:05:05 PM »
Nothing at all, cant connect to database

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #481 on: June 06, 2018, 02:10:50 PM »
Undo what you changed
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

Offline jafonseca

  • Semi-Newbie
  • *
  • Posts: 59
Re: Thumbnail on Topic Listing
« Reply #482 on: June 06, 2018, 02:18:47 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

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #483 on: June 06, 2018, 02:19:36 PM »
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

Offline jafonseca

  • Semi-Newbie
  • *
  • Posts: 59
Re: Thumbnail on Topic Listing
« Reply #484 on: June 06, 2018, 02:26:46 PM »
That is true. I would have to redo the queries to make it work.

Thanks !! :) :)

Offline MamaTea

  • Semi-Newbie
  • *
  • Posts: 59
    • MamaTeasKali on Facebook
    • https://www.linkedin.com/in/mamateasocial/ on LinkedIn
    • @mamateasocial on Twitter
    • MamaTea
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #485 on: June 25, 2018, 10:48:40 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
Code: [Select]
<th width="9%" colspan="2" class="catbg3 headerpadding">&nbsp;</th>replace with
Code: [Select]
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding">&nbsp;</th>
Find
Code: [Select]
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
Replace with
Code: [Select]
<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:
Code: [Select]
<th scope="col" class="first_th" style="width: 8%;" colspan="2">&nbsp;</th>

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

Here is the original:
Code: [Select]
<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:
Code: [Select]
<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

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #486 on: June 25, 2018, 10:58:15 PM »
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

Offline MamaTea

  • Semi-Newbie
  • *
  • Posts: 59
    • MamaTeasKali on Facebook
    • https://www.linkedin.com/in/mamateasocial/ on LinkedIn
    • @mamateasocial on Twitter
    • MamaTea
Re: Thumbnail on Topic Listing
« Reply #487 on: June 26, 2018, 01:24:43 AM »
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...

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #488 on: June 26, 2018, 08:12:33 AM »
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

Offline MamaTea

  • Semi-Newbie
  • *
  • Posts: 59
    • MamaTeasKali on Facebook
    • https://www.linkedin.com/in/mamateasocial/ on LinkedIn
    • @mamateasocial on Twitter
    • MamaTea
Re: Thumbnail on Topic Listing
« Reply #489 on: June 26, 2018, 08:59:04 AM »
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.

Offline DreadPirateRoberts

  • Semi-Newbie
  • *
  • Posts: 39
    • Agora Road's Macintosh Caf
Re: Thumbnail on Topic Listing
« Reply #490 on: April 24, 2020, 06:34:01 PM »
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!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #491 on: April 24, 2020, 06:47:13 PM »
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

Offline DreadPirateRoberts

  • Semi-Newbie
  • *
  • Posts: 39
    • Agora Road's Macintosh Caf
Re: Thumbnail on Topic Listing
« Reply #492 on: April 24, 2020, 08:54:07 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!

Offline SMFHacks.com Team

  • Full Member
  • ***
  • Posts: 439
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Re: Thumbnail on Topic Listing
« Reply #493 on: April 25, 2020, 06:39:49 AM »
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.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #494 on: April 25, 2020, 06:41:02 AM »
@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

Offline pocttopus

  • Full Member
  • ***
  • Posts: 478
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Thumbnail on Topic Listing
« Reply #495 on: April 25, 2020, 12:03:04 PM »
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]
Code: [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]

Code: [Select]
// Create a new board...

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #496 on: April 25, 2020, 12:07:23 PM »
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

Offline pocttopus

  • Full Member
  • ***
  • Posts: 478
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Thumbnail on Topic Listing
« Reply #497 on: April 25, 2020, 03:04:13 PM »
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.


« Last Edit: April 25, 2020, 03:25:44 PM by pocttopus »

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,980
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing
« Reply #498 on: April 25, 2020, 04:29:20 PM »
Test failed  above says for this code
Code: [Select]
<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

Offline pocttopus

  • Full Member
  • ***
  • Posts: 478
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Thumbnail on Topic Listing
« Reply #499 on: May 20, 2020, 08:15:51 AM »
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.