Advertisement:

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

Offline JulesW

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
  • We should have shotguns for this kind of deal!
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #200 on: November 10, 2009, 01:25:16 PM »
Quote
I just tried opening the parse instructions for RC1.2 and they said it wasnt compatible and wont show the instructions for manual install.

Not sure what to do now.

MessageIndex.template.php
Find:
Code: [Select]
<th width="9%" colspan="2" class="catbg3 headerpadding">&nbsp;</th>
Replace:
Code: [Select]
<th width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3 headerpadding"></th>
Find:
Code: [Select]
echo '

<tr>

<td class="windowbg2 icon1">

<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />

</td>

<td class="windowbg2 icon2">

<img src="', $topic['first_post']['icon_url'], '" alt="" />

</td>
Replace:
Code: [Select]
echo '

<tr>

<td class="windowbg2 icon1">

<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />

</td>

<td class="windowbg2 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 '
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

Offline The Goblin

  • Semi-Newbie
  • *
  • Posts: 30
  • Gender: Female
  • Grrrrr...
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #201 on: November 10, 2009, 02:16:25 PM »
Ok, I found this info under MessageIndex.php
and this is all I found...
Quote
   // Grab the appropriate topic information...
   if (!$pre_query || !empty($topic_ids))
   
   // Thumbnail Topic Mod
   if (isset($modSettings['photo_boards']))
      $modSettings['photo_boards'] = explode(',', $modSettings['photo_boards']);
   else
      $modSettings['photo_boards'] = array($board);
   
   // Used to decide if we thumbnails are shown on this topic listing page
   $context['show_thumbnails'] = false;
   
   // End Thumbnail Topic Mod


   {
      // For search engine effectiveness we'll link guests differently.

I cant seem to find a MessageIndex.Templete.php

Offline JulesW

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
  • We should have shotguns for this kind of deal!
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #202 on: November 10, 2009, 02:30:23 PM »
Quote
I cant seem to find a MessageIndex.Templete.php

Its in the theme folder.(themes/themename) Could be that your theme doesn't have its own file, but then the default file would be used, and that one should be edited when you installed the mod through. What theme are you using?
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

Offline The Goblin

  • Semi-Newbie
  • *
  • Posts: 30
  • Gender: Female
  • Grrrrr...
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #203 on: November 10, 2009, 02:39:42 PM »
Quote
I cant seem to find a MessageIndex.Templete.php

Its in the theme folder.(themes/themename) Could be that your theme doesn't have its own file, but then the default file would be used, and that one should be edited when you installed the mod through. What theme are you using?

Im using BacknBlack by Crip

Update:  I just checked my default template and the thumbnail is not working in that either.  So Im going to look and see if I can find the info in the messageindex.template.php
« Last Edit: November 10, 2009, 02:44:34 PM by The Goblin »

Offline JulesW

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
  • We should have shotguns for this kind of deal!
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #204 on: November 10, 2009, 02:54:14 PM »
I saw that your theme does not have its own messageindex.template file, so the edits should be present in the default template file.

The mods shows the first attachment to a post, so that should be an image file. It does not show the first image in the post (just making sure you have a image file attached)

I did not have to switch it on (I'm using 1.1.10, not sure that makes a difference)
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

Offline The Goblin

  • Semi-Newbie
  • *
  • Posts: 30
  • Gender: Female
  • Grrrrr...
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #205 on: November 10, 2009, 03:01:07 PM »
I saw that your theme does not have its own messageindex.template file, so the edits should be present in the default template file.

The mods shows the first attachment to a post, so that should be an image file. It does not show the first image in the post (just making sure you have a image file attached)

I did not have to switch it on (I'm using 1.1.10, not sure that makes a difference)

Oh, I think I put just an image and not an image attachment.  Now I feel really stupid  :-[

Now I have to figure out how to attach an image.

Offline JulesW

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
  • We should have shotguns for this kind of deal!
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #206 on: November 10, 2009, 03:12:59 PM »
It should be under "aditional options" when you reply to a post (not quick reply)

In admin panel you have to check if you allow users to post attachments. Its in the Attachments and avatar section of the admin panel
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

Offline The Goblin

  • Semi-Newbie
  • *
  • Posts: 30
  • Gender: Female
  • Grrrrr...
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #207 on: November 10, 2009, 03:16:52 PM »
It should be under "aditional options" when you reply to a post (not quick reply)

In admin panel you have to check if you allow users to post attachments. Its in the Attachments and avatar section of the admin panel

Got it!   ;D  Though I do feel like a moron.  Yes, I missed somewhere that it has to be an attachement.  Plus I had disabled attachments, so that didnt help in the least.

Thank you sooo much for the help.  Sometimes its just so simple yet we cant see it  ::)

Offline JulesW

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
  • We should have shotguns for this kind of deal!
Re: Thumbnail on Topic Listing (SMF 2 Support Added!)
« Reply #208 on: November 10, 2009, 03:18:49 PM »
Glad I could help! Glad you got it sorted!

J
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,243
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #209 on: November 10, 2009, 10:55:07 PM »
Updated for SMF 2.0 RC2!
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 javierjp

  • Semi-Newbie
  • *
  • Posts: 81
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #210 on: November 11, 2009, 04:17:45 AM »
Hi, i have a problem with this mod, I attached a large image to a topic, in listing the image is large too, not a thumb, any idea?

edit: The image is large only when i have "Resize images when showing under posts" OFF in admin panel.
However if i turn on these option, the listing show a thumb but inside the topic it show a clickeable thumb too!

Exist any way to show a large image inside the topic? not a "click to enlarge" thumb?

Somebody have this problem too?

excuse my english.
grettings and thanks in advance.
Javier



Offline Tanks

  • Full Member
  • ***
  • Posts: 583
  • Gender: Male
  • Danish Dude
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #211 on: November 11, 2009, 10:24:11 AM »
Works just fine on my SMF 2.0 RC2.

I was wondering if there was any way to have this work for show posts since last visit ?

(/index.php?action=unread)

Cheers,

Tanks

Offline JulesW

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
  • We should have shotguns for this kind of deal!
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #212 on: November 11, 2009, 01:24:40 PM »
Quote
Exist any way to show a large image inside the topic? not a "click to enlarge" thumb?

Upload the pic to photobucket (or any other picturehosting website and put the link between [img] tags in the post or am I thinking too simple now?
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

Offline javierjp

  • Semi-Newbie
  • *
  • Posts: 81
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #213 on: November 11, 2009, 04:29:54 PM »
Hi, thanks for reply,
Not sense to me, the propose of this mod its just to show a thumb of a attached image in listing.
My english language its  not good, so i will try to explain with images:


The thing its the smf configuration affect the way this mod works, a little Example:

Case 1 - "Resize images when showing under posts" is OFF in admin panel



The result its:

Inside the topic it show the attached image in original size: (correct)


BUT it show in  the listing the image in the original size too! (incorrect)





Case 1 - "Resize images when showing under posts" is ON in admin panel




The mod take the  200 pixels x 200 pixels config.
The result its:


So in listing it show the correct thumb size (200x200) (correct)



BUT Inside the topic now it show the attached image in clickeable thumb size:  (incorrect, i would like a original size image not a 200x200 clickeable thumb, its thats possible? just as vbulletin)


vbgamer45 thanks a lot, you made a very good job with this mod.

thanks in advance, grettings.
Javier

Offline JulesW

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
  • We should have shotguns for this kind of deal!
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #214 on: November 11, 2009, 04:45:57 PM »
What I always do is attach an image and show that as a thumbnail, ( with resize images when showing under posts ON) so on the topic listing it shows the thumbnail as you showed. Next, when you upload your image to i.e. photobucket, or imageshack you can put the link to the image between [img] [ /img]  so it shows the image in the post as a large image.
And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17

Offline Tanks

  • Full Member
  • ***
  • Posts: 583
  • Gender: Male
  • Danish Dude
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #215 on: November 12, 2009, 10:46:07 AM »
A quick question :)

Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??

Offline gwuix2

  • Newbie
  • *
  • Posts: 4
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #216 on: November 13, 2009, 07:32:16 PM »
I have the following error:
Code: [Select]
Not unique table/alias: 'big'
Fájl: /public_html/Sources/MessageIndex.php
Sor: 446

I have mods installed but as i saw none of them have modified Sources/MessageIndex.php.
I have no idea what to do.

I made a test forum and on that forum it works perfect.
Btw i have modified it a little bit: hxxp:teszt.rapszajt.com/index.php?board=1.0 [nonactive]
cool :D

Help me pls, thx.
I attached the .php file.

EDIT: I solved this, i dunno what was the problem, i simply overwrited the file with the working one form the test forum ( barbarian huh? ) :)
« Last Edit: November 13, 2009, 09:08:59 PM by gwuix2 »

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #217 on: November 15, 2009, 08:26:01 AM »
Could there be an option of which thumbnail to show? That'd be epic!

A quick question :)

Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??

It only does every so often for me. Strange :/

Offline Tanks

  • Full Member
  • ***
  • Posts: 583
  • Gender: Male
  • Danish Dude
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #218 on: November 15, 2009, 09:44:22 AM »
Could there be an option of which thumbnail to show? That'd be epic!

A quick question :)

Why is it that this mod sometimes insist on showing the second attached image instead of the first attached image ??

It only does every so often for me. Strange :/

Yeah it only happens sometimes, very strange bug ay ? :D

Offline Ryan

  • Full Member
  • ***
  • Posts: 594
  • Gender: Male
Re: Thumbnail on Topic Listing (SMF 2 RC2 Support Added!)
« Reply #219 on: November 24, 2009, 09:36:51 PM »
I love this mod, but as requested in 2008 by sombody else, this mod definately needs a option to turn it on in selected boards, it can be a bit messy, round whole forum, especialy on boards that dont contain many attachments, but i realy do want this mod, as theres plenty of boards which are used mainly to attach images, just wis i could select them boards for it to be activated on..
 
I believe last time i used this mod i set boards to use a different theme, and only installed the mod on that theme, but thats one hella annoying way todo it lol.
 
Do you think this feature will be far along?
 
Thanks for all the work you do its a great mod!