PDA

View Full Version : Thread Thumbnail


jasonmerchant
10-17-2005, 10:00 PM
The new version is available here. (https://vborg.vbsupport.ru/showthread.php?t=158396)




This plugin was based on Thumbnail of Attachments on forum display (https://vborg.vbsupport.ru/showthread.php?t=73220) by Dechevious(I hope its alright with you)

It is mostly the same converted to the new 3.5 hook. I also fixed the "If the attachment is not an image, a thumbnail will not be shown" problem.

Note: This plugin works in v3.68

Installation:

In your AdminCP, go to Plugin System, Download/Upload Plugins and import the xml document.

Be sure to change the forum ids in the $thumbsforums array to the forum ids you want to enable thumbnails in.

Next you will need to modify your threadbit template:

Find:
<if condition="$show['threadicons']">
<td class="alt2">
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
<else />
&nbsp;
</if>
</td>
</if>

Replace With:
<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$tt_displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>
You will also need to upload an image to display if there are no image attachments here: $stylevar[imgdir_misc]/nothumb.jpg(ex: http://www.mysite.com/forums/images/misc/nothumb.jpg). I've made a simple one you can use or you can make your own. By default thumbnails are confined in a 100x100 px area, I found that it looks good to make the "no image" image about 100x83 px.

__________________________________________________ ___

Add-ons

UserCP option to turn the thumbnails on/off on a per user basis

Go into your admincp and click User Profile Fields->Add New User Profile Field.

Select "single selection radio buttons", click continue.

For title put "Thread Thumbnails", for description put "This will allow you to turn the thumbnails of threads on and off."

For options, enter "On" and "Off".

Skip down to Display Page and choose "Options: Thread Viewing".

In your threadbit template(assuming you already applied the template changes above):

Find:
<if condition="$tt_displaythumbs">
Replace with:
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])">
You need to replace field5 with the field name of the profile field you created earlier.

MGM
10-18-2005, 02:46 AM
Oh wow, this could come in real handy. Thanks a lot!

MGM out

Floris
10-18-2005, 02:47 AM
XHTML <img tags> are to be closed with <img /> and border=0 should be border="0"

tnx for sharing! :)

Floris
10-18-2005, 02:50 AM
All threads listed show up with the nothumb image, none of them with attachment shows the thumbnail in the threadlist.

jasonmerchant
10-18-2005, 03:10 AM
:o , sorry somehow mixed up the xml file, i reuploaded it... I forgot the alt="" too :o, everything looks right now...

Xplorer4x4
10-18-2005, 03:14 AM
Is there a way that a user can choose to disable it as well? Say for dial up users?

jasonmerchant
10-18-2005, 03:26 AM
Sorry to do this again but I just found a better way to check if the attachment is a image, please reinstall both the xml and template changes.

jasonmerchant
10-18-2005, 03:29 AM
Is there a way that a user can choose to disable it as well? Say for dial up users?
yes that shouldn't be too hard, I'll look into tomorrow as I'm about to go to sleep.

trancetopia
10-18-2005, 10:06 AM
Interesting and useful mod but i've found a couple of problems.

I had the modify the template change to this:


<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$show['threadicon']">
<if condition="$displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>


Notice i've moved where the <td class="alt2" align="center" valign="middle"> to after the first condition instead of the second. Having the cell opened after the second condition badly messed up the table structure of the threadbit. I changed the close tag </td> to align with this change also. This happened for me anyway.

The second problem is that when this is activated for a forum, no threads show at all. Not sure why but suspect the query, not had chance to look any further as i'm in work.

Snake
10-18-2005, 12:10 PM
Thanks.

jasonmerchant
10-18-2005, 08:17 PM
Interesting and useful mod but i've found a couple of problems.

I had the modify the template change to this:


<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$show['threadicon']">
<if condition="$displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>


Notice i've moved where the <td class="alt2" align="center" valign="middle"> to after the first condition instead of the second. Having the cell opened after the second condition badly messed up the table structure of the threadbit. I changed the close tag </td> to align with this change also. This happened for me anyway.

The second problem is that when this is activated for a forum, no threads show at all. Not sure why but suspect the query, not had chance to look any further as i'm in work.

Yes thats right, I hadn't really tested it on the default style last night. I've updated the themplate changes and moved the
<if condition="$show['threadicon']">
inside the else statement to prevent threads without a thread icon from not showing the thumbnail. Is that what you were referring to by "no threads show at all"? or is the entire thread info missing?

trancetopia
10-18-2005, 10:23 PM
All the threads are missing from the forum completely. The forum I tested this on had 18 threads in it and one with an attachment just to test things but after I specified the forum id in the plugin, this forum didn't show any of the 18 threads.

jasonmerchant
10-18-2005, 11:28 PM
hmm, I just installed it on a fresh default style and it worked. Have you tried it on the default style? I'm guessing this is a template problem, try reinstalling the template or post it here and I'll check it out.

bpn
10-19-2005, 12:59 AM
All threads listed show up with the nothumb image, none of them with attachment shows the thumbnail in the threadlist.

I have the same problem, and I just downloaded and installed your hack, so
I guess I have the latest update.

bpn
10-19-2005, 02:06 AM
I have the same problem, and I just downloaded and installed your hack, so
I guess I have the latest update.

I just found out that if I edit a thread and set it to show 'no icon', I do not get the "no thumb" pic. Now there's just an empty cell.

nokturno
10-19-2005, 03:00 AM
thx!!!

bpn
10-19-2005, 03:01 AM
For what it's worth I think the problem is that it dont is getting the attachmentid.
I did an output on this before the IF statements and got nothing on $thread['attachmentid'] but I did get the threadID on this $thread[threadid] placed on the same spot outside the IF statements

jasonmerchant
10-19-2005, 03:06 AM
I just found out that if I edit a thread and set it to show 'no icon', I do not get the "no thumb" pic. Now there's just an empty cell.

that is odd, have you tried making the template changes on a fresh default style? I'm almost certain it is a template error, where your template code is signifigantly different(my forum's style requires a slightly different code) or installation error. Please get back to me on your results.

bpn
10-19-2005, 03:09 AM
that is odd, have you tried making the template changes on a fresh default style? I'm almost certain it is a template error, where your template code is signifigantly different(my forum's style requires a slightly different code) or installation error. Please get back to me on your results.

I tried it on the default style and the one I'm currently using.
The deafult style is almost untouched, but I will try to install a fresh version now to see if it helps :)

jasonmerchant
10-19-2005, 03:10 AM
For what it's worth I think the problem is that it dont is getting the attachmentid.
I did an output on this before the IF statements and got nothing on $thread['attachmentid'] but I did get the threadID on this $thread[threadid] placed on the same spot outside the IF statements

sorry, missed the second page... it looks as if you don't have the latest plugin code.

jasonmerchant
10-19-2005, 03:13 AM
Have you installed any other hacks?

bpn
10-19-2005, 03:18 AM
This is the one I got

<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="vbulletin">
<title>Thread Thumbnail</title>
<hookname>forumdisplay_query</hookname>
<phpcode><![CDATA[$thumbsforums = array(2, 3);
$displaythumbs = false;
if (in_array($forumid, $thumbsforums)) {
$displaythumbs = true;
$hook_query_fields = ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";
$hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "attachment as attachment ON(attachment.postid = thread.firstpostid) ";
$hook_query_where .= "GROUP BY thread.threadid ";
}]]></phpcode>
</plugin>
</plugins>



Yes, I have a few hacks like: VB category Icons, Welcome PM, V3 arcade, Sort by Newest Thread, Allow thumbnail view per usergroup (tried to disable this), & Thread starter column

jasonmerchant
10-19-2005, 04:18 AM
You have the right plugin code and now I'm thinking because of the number of hacks you have installed, there may be some conflict. I tried to locate some of them and saw that VB category Icons is only for rc1 and rc2, what version are you running(in this case I don't think that will effect it but I'll check it out anyway)? I'll try and look through some of them tomorrow and see if I can find the conflict as I have 4 hours left to sleep...

bpn
10-19-2005, 04:24 AM
I just tried to disable that hack aswell without luck & I am running 3.5.0
Ok, thanks for checking it out, I sure hope you can find out what's wrong :)

GrendelKhan{TSU
10-19-2005, 05:25 AM
question:

can this be applied/controlled for specific forums only? (so I can exclude or include this function depending on the forums)

jasonmerchant
10-19-2005, 10:47 AM
question:

can this be applied/controlled for specific forums only? (so I can exclude or include this function depending on the forums)

yes..."Be sure to change the forum ids in the $thumbsforums array to the forum ids you want to enable thumbnails in."

jasonmerchant
10-19-2005, 07:40 PM
bpn:
I think I may have solved your problem, my previous code was replacing any changes to the query hook variable. This may have been what was conflicting with your other hacks. Try it out and let me know how it goes

trancetopia
10-19-2005, 07:54 PM
hmm, I just installed it on a fresh default style and it worked. Have you tried it on the default style? I'm guessing this is a template problem, try reinstalling the template or post it here and I'll check it out.

I've tried it on the default style and still getting the same problem - threads do not display. The moment I specify some forum id's in the array, those forums threads are then all hidden.

Here is the template as requested:

<tr>
<td class="alt1" id="td_status_$thread[realthreadid]">
$thread[openclose_editable]
<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_status_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
</td>
<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$show['threadicon']">
<if condition="$displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="/images/nothumb.gif" alt="" border="0" />
</if>
<else />
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if> <td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">

$thread[title_editable]
<div>
<span style="float:$stylevar[right]">
<if condition="$show['moderated']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/moderated_small.gif" alt="<phrase 1="$thread[hiddencount]">$vbphrase[x_moderated_posts]</phrase>" /> </if>
<if condition="$show['paperclip']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$thread[attach]">$vbphrase[x_attachments]</phrase>" /> </if>
<if condition="$show['subscribed']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /> </if>
<if condition="$show['sticky']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /> </if>
</span>
<if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
$thread[movedprefix]
$thread[typeprefix]
$thread[moderatedprefix]
<if condition="$show['gotonewpost']">
<strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>
<else />
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
</if>
<if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">( <img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav] <if condition="$show[pagenavmore]">... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&amp;page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if> )</span></if>
</div>

<div class="smallfont">
<if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>
<if condition="$show['guestuser']">
$thread[postusername]
<else />
<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
</if>
</div>

<if condition="$show['unsubscribe']">
<div class="smallfont">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;t=$thread[threadid]">$vbphrase[reply]</a> |
<a href="subscription.php?$session[sessionurl]do=removesubscription&amp;return=ucp&amp;t=$thread[threadid]">$vbphrase[unsubscribe]</a>
</div>
</if>

</td>

<if condition="$show['threadmoved']">
<td class="alt2" align="center">-</td>
<else />
<td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
$thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br />
<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</td>
</if>

<if condition="$show['notificationtype']">
<td class="alt1"><div class="smallfont">
<label for="sub$subscribethread[$threadid]">$thread[notification]</label>
</div></td>
<td class="alt2"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td>
<else />
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td>
<td class="alt2" align="center">$thread[views]</td>

<if condition="$show['forumlink']">
<td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
</if>
</if>

<if condition="$show['inlinemod']">
<td class="alt1">
<input type="checkbox" name="tlist[$thread[realthreadid]]" id="tlist_$thread[realthreadid]" value="$thread[checkbox_value]" <if condition="$show['disabled']">disabled="disabled"</if> />
</td>
</if>
</tr>

and here is the code:


$thumbsforums = array(210);
$displaythumbs = false;
if (in_array($forumid, $thumbsforums)) {
$displaythumbs = true;
$hook_query_fields = ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";
$hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "attachment as attachment ON(attachment.postid = thread.firstpostid) ";
$hook_query_where .= "GROUP BY thread.threadid ";
}


Thanks

jasonmerchant
10-19-2005, 08:09 PM
trancetopia:
It looks as though you are running into the same problem as bpn, and I would guess you have installed other plugins for the forumdisplay_query hook? I believe this is solved with the last update 30 minutes ago. Redownload the xml and check if it is solved

trancetopia
10-19-2005, 08:31 PM
I've downloaded the file again, uninstalled the hook code and re-installed with the version I just downloaded and I'm still getting the same problem :(

There is only one plugin occupying the forumdisplay_query hook and that is your "Thread Thumbnail" plugin.

Anything else you want me to try?

jasonmerchant
10-19-2005, 11:58 PM
hmm... well I'm not really sure what is wrong, can you test this:

$thumbsforums = array(210);
$displaythumbs = false;
if (in_array($forumid, $thumbsforums)) {
$displaythumbs = true;
$hook_query_fields = "";
$hook_query_joins = "";
$hook_query_where = "";
}
If this test is successfull it should display "no thumbnail" images on all threads.

If it still failed then run this test:

$thumbsforums = array(210);
$displaythumbs = false;
if (in_array($forumid, $thumbsforums)) {
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";
$hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "attachment as attachment ON(attachment.postid = thread.firstpostid) ";
$hook_query_where .= "GROUP BY thread.threadid ";
}
If this test is successfull it will display your threads normally without thumbnails.

Let me know what your results were.

jasonmerchant
10-20-2005, 02:48 AM
Is there a way that a user can choose to disable it as well? Say for dial up users?

I've updated the first post with the changes needed to do this under Add-ons. :)

trancetopia
10-20-2005, 11:57 AM
Hi Jason, i've given those two scripts a try and here are the results:

The 1st script made little difference in the fact that it did not display any threads just like my initial problem.

The 2nd script did exactly as you said, it displayed all the threads without any thumbnail images.

Thanks for your help trying to work this out, it's really appreciated.

jasonmerchant
10-20-2005, 08:04 PM
:D , then the answer is simple, one of your other hacks is using the variable $displaythumbs. This can be easily solved be changing the name to something more unique such as $tt_displaythumbs (tt for thread thumbnail). I've just updated the template and xml with "tt_" added to my variables.

trancetopia
10-20-2005, 09:42 PM
Hey it's working now, kind of. Sorry to give you more bad news but only one of the thumbnails is now showing.

You can view the forum here:

http://www.littlewales.com/forumdisplay.php?f=210

jasonmerchant
10-20-2005, 09:50 PM
you have an old template, that was fixed a while back when I moved the <if condition="$show['threadicon']"> inside the else statement

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$tt_displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>

Xplorer4x4
10-21-2005, 03:23 AM
@Jason can you please provide the intructions in the zip file.

trancetopia
10-21-2005, 07:04 AM
you have an old template, that was fixed a while back when I moved the <if condition="$show['threadicon']"> inside the else statement


Doh, it's working great now :). Thank you for your time with getting this to work for me. For the type of content on my forum, this will probably be one of the most visually useful plugins ever.

Cheers

jasonmerchant
10-22-2005, 05:03 AM
@Jason can you please provide the intructions in the zip file.

Done. :)

rookiyong
10-27-2005, 08:59 AM
Hi, nice hack here. :)

Is there any options of displaying the Avatar of the thread started instead of using attachments?

jasonmerchant
10-28-2005, 08:03 PM
Hi, nice hack here. :)

Is there any options of displaying the Avatar of the thread started instead of using attachments?

Display the avatar of the thread instead of the attachment? I didn't know threads had avatars, I'll check it out.

rookiyong
10-29-2005, 02:26 AM
Thanks for replying jasonmerchant ;)

Actually this hack will retrieve the image of the attachment and show up as a thumbnail, but because I did not allow members to upload attacments, it would be great if this can retrieve the avatar of the 1st poster and put it up as a thumb.

I think there was such an hack in VB3, to be able to toggle between selecting the attachment or avatar to display, but I can't find it.

mfizzel
10-29-2005, 03:51 AM
how can this work with 'new posts' ?

mfizzel
10-29-2005, 03:44 PM
Ok, I'm having 2 issues with this.

1) It's showing 'no thumbnail' on moved posts, can you remove that? On the thumbnail hack for 3.0.x it didn't do this.

2) It's working great in a few of the forums and in a few of the other forums most of the threads are showing 'no thumbnail'....I can't understand why it's working great in a few but not in others...I've doublechecked the forum array ids...

mfizzel
10-29-2005, 03:47 PM
Ok, I'm having 2 issues with this.

1) It's showing 'no thumbnail' on moved posts, can you remove that? On the thumbnail hack for 3.0.x it didn't do this.

2) It's working great in a few of the forums and in a few of the other forums most of the threads are showing 'no thumbnail'....I can't understand why it's working great in a few but not in others...I've doublechecked the forum array ids...

ok, quick update I believe I know why it's doing that....this hack is getting confused when there are uploaded pics AND files.

In threads where there are just pics it works perfect...

Could you fix this? Thanks man, this is one of the most important hacks on my board.

neutek
01-05-2006, 07:20 PM
thanks man :)
*clicked install

GamerJunk.net
01-05-2006, 09:00 PM
Awesome thanks!

katholic
01-06-2006, 02:13 AM
Can something be added or changed so the thumbnail size it displays is smaller than the actual thumbnail size in the thread itself? I run a gaming forum where people are constantly uploading new creations for download. We have the thumbnails set to 300 to give people a clearer view of what said item is however having it set at 300 on the forum display is a bit large.

ConKien
01-10-2006, 11:23 PM
Anyone use this for vb 3.5.2?

I just download it today 1/17/06 and I still have the problem discussed previously, which the specific forum only shown the "no_image" thumbnail.

Thanks!

DarKNull
01-11-2006, 02:51 AM
how can i enable this option for only certain forum not all of them ?

dave777
01-11-2006, 03:24 AM
Is it possible to display the thread thumbnails to guests even if "Can Download Attachments" is set to no for guests in the usergroup manager?

I want guests to be able to see the thumbnails but not be able to download the full size images.

lazyseller
01-15-2006, 03:22 AM
a usergroup option would be great..........

SIINSI
01-16-2006, 02:57 AM
a usergroup option would be great..........

I'd love some help with this....

I installed the plugin... modified the threadbit and uploaded the image.

Next to every thread I just get the nothumbnail image.

I just downloaded this so I am guessing I have the newest version of it.

Here is what my threadbit template looks like

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$tt_displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>


any help? i'd LOVE to get this working.

Thanks,
Miguel

konabiker47
01-17-2006, 04:03 PM
I cant figure out how to get it to apply to a forum. I dont understand what forum array means. What would i edit in the xml to make it apply to everone of the listing forums located here www.ezbst.com ?

lazyseller
01-18-2006, 06:00 PM
forum array is the forumid of the forum... you go into the forum manage located int he admin panel and hover your pointer over the forum title and you will see the Forumid

(3,4,5) will allow this mod to work in forums 3,4,5

ConKien
01-19-2006, 01:29 AM
I'd love some help with this....

I installed the plugin... modified the threadbit and uploaded the image.

Next to every thread I just get the nothumbnail image.

I just downloaded this so I am guessing I have the newest version of it.

Here is what my threadbit template looks like

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$tt_displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>


any help? i'd LOVE to get this working.

Thanks,
Miguel


I got the same problem, I'm using vb 3.5.2 though!

Somehow this line is never TRUE for my forum:

<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">

I tried to search the variable $thread['attachmentid'] and $thread['thumbsize'], there's none of them in existing vb3.5.2 templates. Don't know if that would cause the problem?

Xplorer4x4
01-19-2006, 12:35 PM
Ever get this to disable for user on dialup?

lazyseller
01-19-2006, 08:19 PM
"Add-ons

UserCP option to turn the thumbnails on/off on a per user basis

Go into your admincp and click User Profile Fields->Add New User Profile Field.
"

SIINSI
01-19-2006, 11:35 PM
I'd love some help with this....

I installed the plugin... modified the threadbit and uploaded the image.

Next to every thread I just get the nothumbnail image.

I just downloaded this so I am guessing I have the newest version of it.

Here is what my threadbit template looks like

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$tt_displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>


any help? i'd LOVE to get this working.

Thanks,
Miguel

I went over this a bazillion times. Any help with this. I NEED this to work!!!! :D

Thanks,
Miguel

MarsNIIT
01-22-2006, 07:30 PM
I don't want upload attachment, only add link?? can you help me? Thanks.

SIINSI
01-22-2006, 09:53 PM
I went over this a bazillion times. Any help with this. I NEED this to work!!!! :D

Thanks,
Miguel

Pretty please? With sugar on top? :)

Miguel

SIINSI
01-22-2006, 10:01 PM
Pretty please? With sugar on top? :)

Miguel

Holy cow, after all that I finally figured out what it is....

You have to have thumbnails enabled on vbulletin. Is there any way to do this WITHOUT having thumbnails enabled?

I still want to be able to view attachments full size. Or at least only enable thums in a certain forum?

You may want to add to your instructions that one MUST have thumbnails enabled in their VB options. I've been messing with this for days...LOL

Thanks,
Miguel

IrPr
01-27-2006, 09:14 PM
is it possible to load thumbnail from [img] tag of the 1st post?

b65ran
02-14-2006, 03:27 AM
I just installed it today. I used to use it on my 3.0.x forum. Now I upgraded my forum to 3.5.3. I followed every instructions. But some of the thumbnails are not showing. some of them showing nothumb image even though it has thumnails. Please help somebody. Here is my forum url http://www.banglatorrents.com/forumdisplay.php?f=33

thanks in advanced.

kurv
02-15-2006, 03:23 PM
I have installed hacks before but I can not get this one to work... I am installing this on a 3.5.3 board and have checked, rechecked and looked at all the settings. I can not find anything that would not allow it to work.

No thumbnails showing up for me...

Can someone help me please... thank you!

kurv
02-15-2006, 03:49 PM
Okay update... well in all my work on the thumbnail hacks, I had uploaded a 'nothumb.gif as oppsed to the .jpg it was looking for... so that image is working...

kurv
02-15-2006, 04:15 PM
I got it working guys, thank you... sorry for the false alarm.

Rastus
02-15-2006, 06:45 PM
I got it working guys, thank you... sorry for the false alarm.

what was your fix?

b65ran
02-24-2006, 12:00 AM
How can I show the differrent attachmentid as preview ? Like now it's showin only for the first attachment. If the first one is not thumbnail it doesn't show the preview. I have different attachment type in a thread. That's why it's not working properly. Please somebody tell me where can I change that.

b4stu
03-07-2006, 06:45 AM
There is a BUG in this MOD. This bug was in the previous version as well.

If the first attachment is not an image file, it will not show the thumbnail. I believe you'll have to do a query to solve this issue.

apollooooooo
03-07-2006, 03:46 PM
Hey people i got a weird problem the Mod seams to be working Great....But

Only in Firefox Browsers when you use Internet Explorer it wont show any image

Any Ideas????

apollooooooo
03-13-2006, 04:55 PM
bump.......

apollooooooo
03-20-2006, 11:12 AM
this is what i mean with internet explorer that happens

http://crazycullen.com/forum/pictures/14415f9c9e4c5a.JPG

but when i use Firefox to view the same page this is what i get

http://crazycullen.com/forum/pictures/14415f9d4892b3.JPG

apollooooooo
03-23-2006, 03:21 PM
bump anyone help at alll...................

Bernd
04-15-2006, 05:27 PM
Has someone been able to install this using vbulletin 3.54?

No thumbnails are being displayed on my forum (just the general thread icons).

jasonmerchant
04-16-2006, 08:06 PM
Hey, sorry guys for the lack of support, I've been really busy and now my server's hard drive has failed and it doesn't look like I can recover any of my files. A few people have mentioned that it doesn't work in the new version, this will probably be fixed soon as I try to get my server back up and I plan to upgrade at the same time.

b4stu:
thats not really a bug, its just how it currently works. I was planning on adding the option to choose which image should be the thumbnail, however it may not come soon.

Bernd
04-25-2006, 07:15 AM
Any updates?

993ti
04-27-2006, 11:36 PM
How about if only an attachement is posted, a thumbnail is shown?
Btw, works for me on 3.5.4
Check:
http://www.twenteracingscene.com/forumdisplay.php?f=22&page=3&order=desc

ForeverForums
05-01-2006, 11:05 AM
This would be very useful on my site if only i had attachments turned on, due to such high bandwidth use i have them disabled, any chance on getting this to display not only attachments but rather images that are posting from say...imageshack..ect ?

If so then i could really use this.

regards,

BeaLzeBuB
05-01-2006, 11:44 AM
good idea

i will install when new version release

GraphicPlanet
05-07-2006, 11:48 AM
My VBulletin Version is 3.5.4
i can not user
what can i do? plz Coder Help me :confused:

993ti
05-08-2006, 10:51 PM
It's working fine with 3.5.4 for me.
Did you edit this line in the plugin for the forums you want the thumbnails to show?
<phpcode><![CDATA[$tt_thumbsforums = array(22, 70);
Change 22 and 70 to the forum id's you want the thumbnails to show.
If you want more forums, just add them like 1, 2, 3, 4

SaN-DeeP
05-08-2006, 11:38 PM
gives a nice look to your forumdisplay :)

NemoTech
05-12-2006, 06:59 PM
Is there a way to enable ALL forums to display thumbnails.

993ti
05-12-2006, 11:42 PM
Yep, just add all forum id's in the plugin file.

NemoTech
05-13-2006, 08:22 PM
Yep, just add all forum id's in the plugin file.

I have nearly 400 forums set up. I was hoping I wouldn't have to manually insert them.

NemoTech
05-13-2006, 08:24 PM
This is a great hack. One thing though... its not w3c

I receive the following error
cannot generate system identifier for general entity "stc" .

rc="attachment.php?attachmentid=1948&stc=1&thumb=1" alt="" border="0" height=

w3c doesn't like the usage of the andpersand & - I think. Any help would be appreatiated.

ramone_johnny
05-28-2006, 07:36 AM
Im running v3.5.4 and im getting "No Available Image" on posts with attachements. I have thumbnails turned on, not sure on GD stuff and I also have hundreds of forums to put in the array. *sigh

Could someone help with this?

RJ

ramone_johnny
05-28-2006, 09:59 AM
Ok ive managed to get this working, however...

The images are not resized to a standard thumbnail image. The images infact show as their original size, which gets messy. Also, for images that are above the allowed thumbnail size set within the AdminCP it reverts to "No Available Image" - which is pretty pointless really.

Any chance someone could modify the code so that it shows an image titled "Thread Contains Images" or something to that nature?

RJ

GrendelKhan{TSU
06-04-2006, 12:09 PM
any chance of modifying this hack to display "lastest attachments" thumbnails on FORUMHOME!
(like many gallery that have a forumhome hack showing lastest 5 images).


that would be so l33t. ;)

Sandy-XXX
06-12-2006, 10:51 AM
I have a problem with this plugin...

The option for the users can turn off/on the images dont work, if you select no, the thumbails stills shows.

And I have the unregistered users gruop without permissions to download attachments, but when they see the forum like a guest the thumbails shows the x error... The only way is give to guests permissions so can download / view attachments.

I would like a option so the guests can see the thumbails threads, but when they go into the thread, dont let they see and dont cant download the attachment if they not register first. Thats is possible to do editing the code?

Excuse my english but im from Spain, I have the 3.5.4 version.

Aceman
06-13-2006, 01:40 PM
I'm investigating a method of displaying the LAST attachment the thread ORGINAL POSTER uploads to display on forumdisplay.

Would anyone know how to modify the code to do this?

Show the LAST ATTACHMENT made to the thread FROM the ORGINAL thread CREATOR.

Any help would be appreciated.
Aceman

FOZ13
06-15-2006, 01:58 AM
Guys what am I missing here? I went to upload the plugin and it came back with: XML Error: not well-formed (invalid token) at Line 1

pspcrazy
06-15-2006, 04:22 AM
Awesome hacvk, anway to make it work only in certain forums?

Sandy-XXX
06-15-2006, 06:46 PM
Hi,

I detect a new bug, if we move a thread to other forum or subforum, the defect redirect link of the move thread shows a diferent thumbs and thats only registered users, the unregistered users see x error...

Some help please? I like so much this plugin :(

tienkhom
06-18-2006, 08:34 AM
Great hack, thanks, installed and work well

vktechnology
07-01-2006, 05:37 PM
Has someone been able to install this using vbulletin 3.54?

No thumbnails are being displayed on my forum (just the general thread icons).

I installed on 3.5.4
I didnlt see thumbnail and when I go to enable plugin and then it work


admin CP > Enable Plugin/Hook System

GNDI
07-14-2006, 02:32 PM
thanks, nice mod :)

ThomasR
07-22-2006, 10:45 AM
I'm also looking for the original 3.0.x feature that display the last image attached to the original post, which is used as the thread thumbnail.

It was a very cool systeme.. you upload all the images you want (then, the vb will create the thumbnail) and then, you can, if the user want, upload a 100x100 picture (which is the size of my Thread thumbnail) and it was -always- this image which was used as the forum thumbnail.

If I'm not wrong, it was not a part of the original hack in 3.0.x, but an edit made by someone else in the hack thread.

ThomasR
07-22-2006, 11:47 AM
Found the post: https://vborg.vbsupport.ru/showthread.php?p=586660#post586660

aceofspades
07-27-2006, 04:57 PM
Im getting a little fed up here. I have 3.5.4, i installed the mod and every thread has 'no attachment' when it does. In the attachment section on the admincp i enabled tumbnails for jpg's (which is what format my image is in) but it still says no image. Please help, i really need this working

MikeGK
07-27-2006, 10:07 PM
Can anyone show me how to implement this plugin for VBAdvanced V2 on NEWS ARCHIVE FRONTPAGE to show thumbnail? thnx

Infante
07-28-2006, 07:33 PM
I'm confused. I installed the hack, tried to upload an attactment, and the new image wouldn't show. Just the default "no image avaliable" jpg does.

How do I add a thumbnail to the thread?

GNDI
07-29-2006, 03:29 AM
make shure you have activeted "Enable Thumbnails" in vBulletin Options -> Message Attachment Options

unitedpunjab
07-30-2006, 11:25 AM
This is my Template Code:
<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$show['threadicon']">
<if condition="$displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>

And This is My Plug IN Code:
$tt_thumbsforums = array(67, 74, 12);
$tt_displaythumbs = false;
if (in_array($forumid, $tt_thumbsforums)) {
$tt_displaythumbs = true;
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";
$hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "attachment as attachment ON(attachment.postid = thread.firstpostid) ";
$hook_query_where .= "GROUP BY thread.threadid ";
}

Followed Every Single Instruction Given in Installation file But Nothing Happened. Nor it showing any attachment image as a Thumbnail or neither any "No Image" Thumbnail.

And I m using vB 3.6.0 RC 3

Jda
08-02-2006, 07:08 AM
I'm investigating a method of displaying the LAST attachment the thread ORGINAL POSTER uploads to display on forumdisplay.

Would anyone know how to modify the code to do this?

Show the LAST ATTACHMENT made to the thread FROM the ORGINAL thread CREATOR.

Any help would be appreciated.
Aceman

I didnt know what happened with my forum, i didnt touch anything and its showing the Last Attachment as you would like your forum do.


I would like to fix it, but how do i fix something i have never changed?

htrshgytrs
08-08-2006, 04:29 AM
i've been messing around with this, attempting to add the thumbnails to the search results/newposts page (but failed miserably...)

Is this possible, or any tips where to start?

Love the mod by the way, looks great!

GNDI
08-08-2006, 05:53 AM
have anyone tried this on the 3.6 version?

htrshgytrs
08-08-2006, 05:56 AM
have anyone tried this on the 3.6 version?


yup, works fine on 3.6

Aceman
08-09-2006, 03:18 PM
Works fine for me.

Aceman

GNDI
08-09-2006, 03:37 PM
thanks :)

VaaKo
08-09-2006, 06:07 PM
* VaaKo clicks install
check it out
http://www.onelebanon.com/forum/forumdisplay.php?f=118

carpzone
08-30-2006, 04:27 PM
I have a problem with this plugin...

The option for the users can turn off/on the images dont work, if you select no, the thumbails stills shows.

And I have the unregistered users gruop without permissions to download attachments, but when they see the forum like a guest the thumbails shows the x error... The only way is give to guests permissions so can download / view attachments.

I would like a option so the guests can see the thumbails threads, but when they go into the thread, dont let they see and dont cant download the attachment if they not register first. Thats is possible to do editing the code?

Excuse my english but im from Spain, I have the 3.5.4 version.

U do it like this :
Find in threadbit template
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">

Replace
<if condition="($thread['attachmentid']) AND ($thread['thumbsize']) AND ($bbuserinfo['userid'])">

Samarande
09-03-2006, 08:17 AM
Thanks for the mod.
Works perfectly with vb 3.6.0 :)

htrshgytrs
09-04-2006, 12:19 AM
i've been messing around with this, attempting to add the thumbnails to the search results/newposts page (but failed miserably...)

Is this possible, or any tips where to start?

Love the mod by the way, looks great!


if i change the hook location to "search_results_query_threads" i can see the nothumbs image as expected. It doesn't seem to link up the attachment id though, so the thumbnail is not displayed.

Any help would be much appreciated

Demo16
09-08-2006, 07:34 AM
Hi I'm installing this plugin but I have one question: can I decide in wich forum to use it or when it's on it works in every forum?
I don't want a no thumb image in every thread without attachments

Another thing: where is the threadbit template I have to modify?

K

thenetbox
09-09-2006, 12:57 AM
great plug in :) Thank you

Does any one know how to get it to grab the first thumbnail in the thread? If the first post doesn't have an image then could it go down and grab the next image attachment?

Nothing urgent. I am just curious :)

Demo16
09-09-2006, 10:11 AM
Hey Thenet where is the threadbit template I have to modify?

thenetbox
09-09-2006, 04:07 PM
Hey Thenet where is the threadbit template I have to modify?

Hi,

Go to styles and templates. Press the [<< >>] button of the style you want this mod to work with. Then you'll see a list of templates. Scroll down until you see something like Threadbit Templates. Double click it. Inside that you'll find threadbit and you can edit that accordingly :D

Demo16
09-10-2006, 03:09 PM
tnx thenet, I have to use the mod as it is on the top of this page or there are some recent modifications?

Demo16
09-10-2006, 03:40 PM
I've tried exactly this mod but it doesn't work for me :-(
the only I change is on and off button (I put si no) cause it's an italian forum and obviously I change also this line in this way:

<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'no' OR $show['guest'])">

What can it be the problem? Other particular things if the language is different?

I can't see the preview outside any post
In the user profile is all ok and I've also uploaded the nothumb.jpg image

HELP!!!! :-(

Demo16
09-12-2006, 04:28 PM
no one can help me?

jyajay
09-17-2006, 07:45 PM
Can I use this mod with vB 3.6.x?

konabiker47
09-22-2006, 08:55 PM
How do you make the thumbnail show up? I have everything installed.....

GNDI
09-23-2006, 09:12 AM
enable thumbnails in your admincp

ThomasR
09-23-2006, 04:43 PM
Then, does it works under 3.6? without this mod, I can't switch to 3.6... :)

ThomasR
09-23-2006, 06:30 PM
Just installed a test forum, this plugin is working with vb 3.6.1!

jyajay
09-27-2006, 01:20 PM
Okay I installed it on 3.6.1 and it is working.

My question is, can I use the normal posticons on threads where no thumb was uploaded instead of this "no thumb" picture?

GNDI
09-27-2006, 03:02 PM
then you'll make something like this


<if>
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])">

<else />

<if condition="$tt_displaythumbs">

</if>


PS. haven't tested it but could give you an idear about howto

jyajay
09-28-2006, 07:34 PM
Your tip is not exactly doing what I had in mind but you gave me the idea to do what I planned. I just replaced the


<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
..with

<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />

Now want to add a function that allows users to deactivate the display of the thumbnail and show the regular posticon instead.

I am not sure how big this change has to be for this to work.

GNDI
09-28-2006, 07:42 PM
then you have to play with <if>userfieldx</if> where x is the number off the useroption from "User Profile Fields" in admincp

jyajay
09-28-2006, 09:11 PM
I forgot that I overwrote the addon. Thanks again.

Working fine!

jyajay
10-06-2006, 12:00 PM
If somebody moves a thread there is a X behind instead of the correct icon.

How can I correct that?

Currently threadbit (from 1st line) looks like this:


<tr>
<td class="alt1" id="td_threadstatusicon_$thread[realthreadid]">
$thread[openclose_editable]
<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
</td>

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>

Edog
10-06-2006, 10:50 PM
Doesnt work for me and now after installing this It wont let me make new posts. it keeps saying I didnt add enough characters when I have..

nnjj.net
10-31-2006, 04:59 PM
is it working on 3.6.2?

JohnBee
11-02-2006, 03:49 PM
It would be very usful if members(select usergroups) could turn this feature on or off. I know there is a small mod to allow users to turn it on or off in there profiles etc. but what I mean is during the posting process.

The reason I say this is because there are times when an admin would like t o post a sticky in the forum(instructions or reminders) and the MOD assigns a no attachment icon instead of the default posting icon.

Is this possible?

mktrilogy
11-03-2006, 02:39 AM
i think it would be cool if it does not show on the thread but will show the thumbs on mouse over only :)

crishel
11-17-2006, 12:21 AM
Has anyone gotten this to display on the actual forum home page. I must have searched VB.org for an hour tonight, simply looking for a way to post an icon on the main forum page for any forum I select.

Is this possible. Take a look at this forum, and notice the icon on the main forum on the main page, can anyone do this?

Look here: http://www.inkjetgarmentprinters.com/forums/forums.html

Notice a little ways down there are pictures of printers on some of the forums. Can anyone do this?

Trana
11-26-2006, 11:08 PM
Anyone have this working on 3.6.4?

ThomasR
11-27-2006, 04:42 AM
It's working perfectly on 3.6.1, I don't see why it wouldn't do in 3.6.4 (I do the update today)

Floris
12-11-2006, 02:52 AM
I've used the default code (attached .xml) on 3.6.4 and changed the array to point to 15 forums, and it works just fine! Thanks for this.

rstarke
12-27-2006, 10:05 PM
Can something be added or changed so the thumbnail size it displays is smaller than the actual thumbnail size in the thread itself? I run a gaming forum where people are constantly uploading new creations for download. We have the thumbnails set to 300 to give people a clearer view of what said item is however having it set at 300 on the forum display is a bit large.

Has anyone found a solution for this situation?
My forum is here http://www.paint-sculpt.com/forum/index.php
you can see that my thumbnails are set to 400 pix. I want to keep this size on the actual thread page
but I'd A like smaller thumbnail (say 80px or so) on the forum display page
I love this mod and I'm dieing to get it to work on my forum!
thanks for any help that you can give me
-Richard

giza
01-03-2007, 08:45 AM
man thanks a lot
u saved me :)

peterpigman
01-03-2007, 11:44 AM
Where in the template do you add 'height = xx' and 'width = xx' to change the thumbsize?

Edit: It's ok i figured it out




<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" width=80 height=80 border="0" />

Trana
01-05-2007, 06:02 AM
So there is no way to enable thumbnails for use by this hack without turning them on for every post in the site? My users like the full photos so I can't use the generic thumbnail option in admincp.

peterpigman
01-06-2007, 08:51 PM
So there is no way to enable thumbnails for use by this hack without turning them on for every post in the site? My users like the full photos so I can't use the generic thumbnail option in admincp.

I just thought of something about that, i'll get back if it works.

Resn
02-05-2007, 03:28 AM
Would it be easy to mod this, so that the attachment used as the thumbnail is hidden when you view the actual post?

Mutt
02-27-2007, 12:09 PM
this worked really well on 3.64 and was amazingly easy. thanks.

kafi
03-06-2007, 12:07 PM
This is wonderfull.
Is it possible to put more than one thumbnails? I will put them below thread name.

rasterbox
03-07-2007, 04:01 AM
Hi i just installed this great plugin in my forum... Thank you!!!

I just have a questions:

Is there a way to fix the size of the thumbnail like if i set 70x70px if the thumb size will be 70x50px. The image will convert/resize to 70x70px.

Thank you..

P.S. Excuse my english, not my native tongue.

b65ran
03-13-2007, 02:37 AM
I have one problem with this hack. Some of the thumbnail doesn't show even though I have thumbnail image in that thread. I have different attachment rather than image. Is there anyway I can show the image attachment only. Any help will be appreciated.

Thanks

tspore
03-25-2007, 06:20 AM
I don't see how it would be possible, but would there be an option to add to the WYSIWYG editor, a place to link in an thumbnail?
Then I could disable attachements.

casa
04-14-2007, 03:11 AM
Please tell me how to:
1. show the LAST attachment, rather than the first.

2. how to show thumb of image in https://vborg.vbsupport.ru/ tag in the thread in case there are no attachments.

thanks
www.fordmuscle.com

casa
04-14-2007, 02:27 PM
Does not work well in 3.6.5, only shows thumbs if you are logged in. Not logged in and you get red X in IE and no image in Firefox.

kafi
04-14-2007, 09:34 PM
2. how to show thumb of image in https://vborg.vbsupport.ru/ tag in the thread in case there are no attachments.


that would be awesome!!!!

rasterbox
04-17-2007, 12:20 PM
I have the same problem casa. If you are not logged in there will be no thumbnails. Is there a fix for this problem?

Whether the user is logged in or not the thumbnail should always be displayed... Can this be done?


Thanks in advance...

www.3dpinoy.com

dannylin3000
04-21-2007, 02:59 PM
this is really awesome - but was just wondering can you also add a feature to show a thumb of the first images in a post using [img] tag but not attachment?

Aery
04-30-2007, 08:11 AM
There is a way to add a custom thumb (different from the attachment) ?

flup
05-14-2007, 03:04 PM
Great hack! Just what I needed!

dannylin3000
05-21-2007, 06:58 AM
how can I modify this to also work for inline images? (ex. displaying thumbs for images using [ img ] tag)

kyokushin4life
05-26-2007, 11:48 PM
Hi there. Anyway to show it to guests as well? for some reason it's not showing for guests...

Thanks for this plugin :)

kyokushin4life
05-27-2007, 12:59 AM
iv been playing with the code with usegroupid but no success so far... could someone help so that the thumbnails are shown to guests(not logged in) as well? thanks.

kyokushin4life
05-27-2007, 07:08 AM
I got it!

A user "Dismounted" helped me out on this.

Find

<if condition="($tt_displaythumbs) AND ($bbuserinfo['field7'] <> 'Off' OR $show['guest'])">


and repalce with

<if condition="$tt_displaythumbs AND ($bbuserinfo['field7'] != 'Off' OR $show['guest'])">

kafi
05-27-2007, 08:28 AM
there is one add-on that enable you to control showing thumbnail to guests, otherwise you can do it by allowing them to see attachments in admincp

Greek76
05-28-2007, 07:23 PM
How do you resize the image to something smaller? The images come out huge. Where do I edit the settings.

Adam21
05-29-2007, 05:10 PM
How do you resize the image to something smaller? The images come out huge. Where do I edit the settings.

You can add in the required sizes in here i supposed.:rolleyes:

<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />

Whiteyez
07-07-2007, 12:00 AM
Works great on vBulletin Version 3.6.7PL1

Trana
07-11-2007, 04:43 AM
I just thought of something about that, i'll get back if it works.

Did anyone ever figure out how to display the thumbnails without turning on thumbnailing for the entire forum? I don't want photos attached to posts to be thumbnailed within the post itself.

Thanks!

casa
07-13-2007, 04:47 AM
I got it!

A user "Dismounted" helped me out on this.

Find

<if condition="($tt_displaythumbs) AND ($bbuserinfo['field7'] <> 'Off' OR $show['guest'])">


and repalce with

<if condition="$tt_displaythumbs AND ($bbuserinfo['field7'] != 'Off' OR $show['guest'])">



hmm, doesnt work. this code would only be in the Threadbit IF someone had the radio button option in the userCP allowing users to turn off thumbnail viewing.


What I would like to see in this mod, and I cant imagine why this is so tough (though I am no coder, lol) is to simply allow these thumbnails next to the thread title to display to guests/non-registered. Go to my forum and you'll see how LAME it is without this:
http://www.fordmuscle.com/forums/tech-exchange/

xcingix
07-13-2007, 08:57 PM
Display the avatar of the thread instead of the attachment? I didn't know threads had avatars, I'll check it out.
Has anyone helped you yet?
I want to display the LAST poster's avatar instead of a status icon on forumhome, but noone seems to want to help me out here.
I figures this thread was close enough.

If ANYONE has any ideas of how I would achieve this PLEASE let me know. I really want to work thi sout.

NextLuxury
07-19-2007, 02:54 AM
How do you get the IMG Tages to work? Instead of doing the attachment, its killing our space, and server. :(

kafi
07-31-2007, 11:52 AM
How do you get the IMG Tages to work? Instead of doing the attachment, its killing our space, and server. :(


I wish to know too

Baku
08-02-2007, 01:43 PM
How do you resize the image to something smaller? The images come out huge. Where do I edit the settings.
The best way would be to apply the sizes in the template edits like so:

<if condition="$show['threadicons']">
<td class="alt2">
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" width="80" height="80" border="0" />
<else />
&nbsp;
</if>
</td>
</if>

and...

<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$tt_displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" width="80" height="80" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" width="80" height="80" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" width="80" height="80" />
</if>
</if>
Just edit the numeric values that are in red and replace them with a pixel size that suits your forum.

I've not tried this yet, so if someone does, and it doesn't work, let me know. ><

Stefano Virgill
08-15-2007, 01:55 AM
excellent!

nnjj.net
08-15-2007, 07:45 AM
is there any update for this product to 3.6.8?

theOZer
08-17-2007, 04:10 PM
Just installed & set up in V3.6.8. Works great now that I know how to find my forum ids (https://vborg.vbsupport.ru/showthread.php?t=48985).

nnjj.net
08-17-2007, 07:07 PM
your replay not clear, what the connection bettwen this hach and Forum IDs?!!!

baboo
08-18-2007, 05:26 PM
I have a problem with this plugin...doesn't work with vBulletin Version 3.6.8

Aery
08-20-2007, 07:46 AM
I dont read forumID in my adress bar, but using the number of "forumdisplay.php?f=21" (in this case is 21) and chance the value in this line (open the xlm file):

<phpcode><![CDATA[$tt_thumbsforums = array(1, 21);

everythings works fine

I have only 1 problem : How I can use this plug-in in more forumdisplay ?

Trana
08-21-2007, 07:24 PM
I just thought of something about that, i'll get back if it works.

Can you please let us know if this is possible?

jasonmerchant
08-21-2007, 07:57 PM
Trana:

You can edit this section in the postbit timeplate:

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>



Aery:

You can edit the plugin through the control panel, there is no need to mess around in the xml file.

On the following line you place the forum ids of the forums that will have thumbnails. So if you want to enable thumbnails on forums 6, 11, and 25, the code would look like:

$tt_thumbsforums = array(6, 11, 25);

Aery
08-22-2007, 01:35 PM
Thank you very much.
My dumb about editing XML file :)

theOZer
08-24-2007, 02:57 PM
A direct question to jasonmerchant:
Why is OR $show['guest'] part of the if tag that checks for the user chosen thumbnails On or Off option?
(<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])">)
Why is it "necessary" to also check $show['quest'] in the if tag? The issue is whether or not the thread option is On or Off, right(??).

Trana
08-30-2007, 03:05 AM
Trana:

You can edit this section in the postbit timeplate:

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>


Sorry, I'm not following what you want me to do. Can you explain a little further?

nnjj.net
09-18-2007, 04:27 PM
is there any update for 3.6.8?

jasonmerchant
09-18-2007, 05:03 PM
theOzer:

The $show['guest'] in the if statement turns thumbnails on for all guests. Guests don't have profile options, so they can not choose.

nnjj.net:

This plugin works in 3.6.8, maybe a moderator can move this plugin to the 3.6.8 forum?

Trana:

I believe you said that you don't want to display thumbnails in posts with this plugin, correct?

All you need to do is replace the content of the first if statement with the second one. ie:

Replace:
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>

With:
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>

casa
09-21-2007, 03:19 AM
PLEASE - does anyone know how to modify this line to make it show the LAST attachment:
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />

jasonmerchant
09-21-2007, 04:24 AM
Casa:

I have not tested it yet, but you should be able to just change the MIN sql function to MAX. ie:

Replace the following in the plugin:

$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";


With:
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MAX(attachment.attachmentid) AS attachmentid ";

casa
09-21-2007, 04:46 AM
Casa:

I have not tested it yet, but you should be able to just change the MIN sql function to MAX. ie:
[/CODE]


Jason
You rock, that worked.
PM me if you are interested in other coding work.

thanks

nnjj.net
09-21-2007, 07:30 PM
Be sure to change the forum ids in the $thumbsforums array to the forum ids you want to enable thumbnails in

where???

jasonmerchant
09-21-2007, 07:57 PM
nnjj.net:

On the first line:

$tt_thumbsforums = array(2);

Change 2 to the forum id. So if you want to enable thumbnails in forums 3, 7, and 12, it would look like:

$tt_thumbsforums = array(3, 7, 12);

A new version of the plugin is available. You can find the new thread here. (https://vborg.vbsupport.ru/showthread.php?t=158396)

Trana
11-14-2007, 10:21 PM
Trana:

I believe you said that you don't want to display thumbnails in posts with this plugin, correct?

All you need to do is replace the content of the first if statement with the second one. ie:

Replace:
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>

With:
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>

WHat I meant was I don't want to enable thumbnails globally as it causes ALL image attachments to show as thumbnails.

Ideally, I would like to enable this hack while also maintaining the ability to display the entire full size image in posts.

Please let me know if you have any ideas.

hieronymous
12-07-2007, 10:04 AM
man, i could HUG you

er, i WON'T, of course. but this is JUST what i've been searching for

siliconfinance
01-29-2008, 01:27 AM
How would one disable thumbnails from showing in search results?

tspore
04-29-2008, 07:08 AM
I was wondering - can we update this to work with 3.7?
<if condition="$show['threadicons']">
<td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
</if>
A bit different than the original code, but I don't want to screw anything up.

Greek76
05-04-2008, 02:13 PM
Im curious aswell. Will it work with 3.7?

bijju
01-04-2009, 08:26 AM
i just installed for my forum 3.7.4.