![]() |
Thread Thumbnail
The new version is available here.
This plugin was based on Thumbnail of Attachments on forum display 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: Code:
<if condition="$show['threadicons']"> Code:
<if condition="$show['threadicons']"> __________________________________________________ ___ 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: Code:
<if condition="$tt_displaythumbs"> Code:
<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])"> |
Oh wow, this could come in real handy. Thanks a lot!
MGM out |
XHTML <img tags> are to be closed with <img /> and border=0 should be border="0"
tnx for sharing! :) |
All threads listed show up with the nothumb image, none of them with attachment shows the thumbnail in the threadlist.
|
:o , sorry somehow mixed up the xml file, i reuploaded it... I forgot the alt="" too :o, everything looks right now...
|
Is there a way that a user can choose to disable it as well? Say for dial up users?
|
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.
|
Quote:
|
Interesting and useful mod but i've found a couple of problems.
I had the modify the template change to this: HTML Code:
<if condition="$show['threadicons']"> 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. |
Thanks.
|
Quote:
Code:
<if condition="$show['threadicon']"> |
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.
|
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.
|
Quote:
I guess I have the latest update. |
Quote:
|
thx!!!
|
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 |
Quote:
|
Quote:
The deafult style is almost untouched, but I will try to install a fresh version now to see if it helps :) |
Quote:
|
Have you installed any other hacks?
|
This is the one I got
PHP Code:
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 |
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...
|
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 :) |
question:
can this be applied/controlled for specific forums only? (so I can exclude or include this function depending on the forums) |
Quote:
|
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 |
Quote:
Here is the template as requested: HTML Code:
<tr> Code:
$thumbsforums = array(210); |
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 |
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? |
hmm... well I'm not really sure what is wrong, can you test this:
Code:
$thumbsforums = array(210); If it still failed then run this test: Code:
$thumbsforums = array(210); Let me know what your results were. |
Quote:
|
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. |
: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.
|
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 |
you have an old template, that was fixed a while back when I moved the <if condition="$show['threadicon']"> inside the else statement
Code:
<if condition="$show['threadicons']"> |
@Jason can you please provide the intructions in the zip file.
|
Quote:
Cheers |
Quote:
|
Hi, nice hack here. :)
Is there any options of displaying the Avatar of the thread started instead of using attachments? |
All times are GMT. The time now is 04:48 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|