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

JulesW

QuoteI 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:

<th width="9%" colspan="2" class="catbg3 headerpadding">&nbsp;</th>


Replace:

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


Find:
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:
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

The Goblin

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

JulesW

QuoteI 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

The Goblin

#203
Quote from: JulesW on November 10, 2009, 02:30:23 PM
QuoteI 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

JulesW

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

The Goblin

Quote from: JulesW 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)

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.

JulesW

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

The Goblin

Quote from: JulesW 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

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  ::)

JulesW

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

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

javierjp

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



Tanks

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

JulesW

QuoteExist 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

javierjp

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

JulesW

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

Tanks

A quick question :)

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

gwuix2

#216
I have the following error:
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? ) :)

Liam.

Could there be an option of which thumbnail to show? That'd be epic!

Quote from: Tanks 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 ??

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

Tanks

Quote from: iKorp on November 15, 2009, 08:26:01 AM
Could there be an option of which thumbnail to show? That'd be epic!

Quote from: Tanks 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 ??

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

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

Ryan

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!

Advertisement: