Advertisement:

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

Offline jafonseca

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

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,272
    • 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: 57
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

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,272
    • 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: 57
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

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,272
    • 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...

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,272
    • 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.