• Welcome to Simple Machines Community Forum. Please login or sign up.
January 25, 2022, 05:30:16 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Thumbnail on Topic Listing

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

Previous topic - Next topic

iosys

Yeah there is two different areas I think.  I played around with it for a while but got annoyed.  I want to have the first two columns removed.  I could get the header columns removed but when I tried to do the same with the content columns it screwed up the formatting.  I had other things to do so left it for now.  Would love to know if someone has got this to work
AAF [nofollow]

fmsllc

i attached a pic of what i did.

in that same messageindextemplate file....I used this

<td width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thread Preview</td>

if you do not have a thread with an attachment on that page though, it comes out looking weird.

diontoradan

This mod is very nice. Im using it with SMF 2RC. Something i wanna ask :

1. Can i select particular board to display this mod? i dont want to display it in all boards, just the events page.
2. How can i resize the thumbnail? it would be great if we can select the size. i got the picture in 100% in all of the topics...

there's a good php thumbnailer, if youre interested in using it : http://phpthumb.sourceforge.net/

vbgamer45

1. Not at this time
2. This is determined by the attachment settings it uses those sizes as its base.
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

the-punisher

i Just Love SMF!

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

SilverKnight

I like this option, but there needs to be a option to "enforce" it on a board, so people cannot make a thread without a image, so maybe make a seperate box which they have to upload the image to, it's more direct than attachments.

fmsllc

Quote from: iosys on August 13, 2009, 10:16:17 AM
Default thumbnail where no attachment exists

Ok firstly thanks for this great mod!  I searched around for an extra feature which I couldnt find so I made a small change myself.  What I wanted was for those posts that dont have any attached images to show a default thumbnail in the message index.  Let me just say Im in no way a PHP programmer so this is hardcoded but at least it works!  The defaultthumbnail.jpg I manually sized as 100x100.

In MessageIndex.template.php

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


add after
// MOD to show default thumnail image
else
{
echo '<img src="http://www.site.com/defaultthumbnail.jpg">';
$imagefound = true;
}
// END MOD to show default thumbnail image


just want to say thanks for this add on. It makes the forum look a lot cleaner now.

vbgamer45

Looks like a good feature may add an interface for it in the future.
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

Im trying to have a thumb in listing and the original large image inside the topic.




example 1: "Resize images when showing under posts" is OFF in admin panel.

Result: When I attach a image to a topic it show the original large image in listing and inside the topic.




example 2: "Resize images when showing under posts" is ON in admin panel.

Result: When I attach a image to a topic it show the thumb in listing. But inside the topic it show a clickeable thumb to enlarge to the original image size.




All i want its a thumb in listing and the larger image inside the topic without have to click, its that possible?

excuse my english.
grettings and thanks in advance.



samurai-lupin

Can this mod also be adjusted in order to work with the recent replies / postings pages?

JulesW

October 25, 2009, 04:09:37 PM #171 Last Edit: October 26, 2009, 03:17:34 PM by JulesW
For my custom theme, I tried editing the messageindex.template.php myself but I get a syntax error.

Could you be so kind to take a look @ the file and see if you could fix it for me?

TIA!

Edit: Success at last! found it myself. Great mod!!
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

NeoXII

Hi,
great mod but on SMF 2.0 RC1.2 in MessageIndex.php I can't find this code:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

But this:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)

If I try to replace with this, I have blank page:

LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

Thank You very much!! :)




NeoXII

Quote from: JulesW on October 25, 2009, 04:09:37 PM
For my custom theme, I tried editing the messageindex.template.php myself but I get a syntax error.

Could you be so kind to take a look @ the file and see if you could fix it for me?

TIA!

Edit: Success at last! found it myself. Great mod!!

I think that is my same problem....
How have you fix it?

Thank You!

JulesW

October 27, 2009, 05:40:28 PM #174 Last Edit: October 27, 2009, 05:51:23 PM by JulesW
I found the error in the code, there was a piece of the code that wasn't in the right spot...

If you attach your messageindex.template.php I can take a look if I can fix it for ya...

Edit: I must add that I use smf 1.1.10 and not 2.0, so I'm not sure I can help!
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

NeoXII

OK!
Say me what do you have change in the code please...

Thanks....  :)

JulesW

I've made all the necessary edits in this file. Was this the file from your server or did you attach a clean copy of the file. In this file there were no edits at all and for the mod to work, the  MessageIndex.php file also needs to be editted.

new file is attached. Hope it works for you!
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

NeoXII

Ok I attack also the messageindex.php..
In this file I can't find this code:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

But this:

LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)

Thanks Very Very Much!




JulesW

OK, try this one and let me know if it works. I do not use the smf 2.0 RC2 version, so I cannot test it for you.

If it does not work, I can't help you any further, and you should find someone else or the creator of the mod. The
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

is part of the SMF 2 rc1 code, and apparently that has changed in the RC2 version.

modified file is attached.
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

NeoXII

October 28, 2009, 06:57:51 PM #179 Last Edit: October 28, 2009, 07:01:33 PM by NeoXII
Thanks You Julesw for your Help  ;)

In 2.0 RC1.2 this mod don't work also I use Julesw's file :(

Bye!

Advertisement: