The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Thread Thumbnails Details »» | |||||||||||||||||||||||||||
Thread Thumbnails
-------------------------------------- Created By: Null Parameter This mod is officially tested with 3.8.1, but has been reported to work with many other versions. Please leave any comments, suggestions or bugs. Description This mod allows a user, when creating or editing a thread, to specify a Thumbnail image to be used for display next to the thread in the Thread Listing. With this mod you can define a set of forums that have thumbnails enabled, then in those forums whenever a user creates or edits their thread they can change their thumbnail, based on the method that you choose to allow. This image is then shown in the Forum Display, in place of the Thread Icon. The image also appears in Search & Tag Search, and I can add it to the regular Search if somebody requests it. And possibly have options for displaying in each area. Forum Display: Forum.jpg Search: Search.jpg ACP Options: ACP Options.jpg Installation Install the Product XML File. That's it! All Template Edits Are Now Automatic. If you are Upgrading from the older version, see directions in the README file on how to undo the template edits. Demo Possible Future Features (With Request)
Download Now
Show Your Support
|
2 благодарности(ей) от: | ||
chikkoo, vijayninel |
Comments |
#202
|
|||
|
|||
Hey guys,
So I had the same problem as some of you where, if you use attachments, only the first thread shows up on forumdisplay and all the other threads mysteriously disappear. After a bit of digging the culprit was actually in a missing "group by" clause in the SQL statement. Solution Edit the plugin "Forum Display - Query" Change the code to this: Code:
$dothumbnail = false; if((THIS_SCRIPT == 'forumdisplay') && ($vbulletin->options['thread_thumbnails_active'] == '1')){ if ($vbulletin->options['thread_thumbnails_forum_list'] && $vbulletin->options['thread_thumbnails_forum_list'] != "") { $forumsallowed = explode(",", $vbulletin->options['thread_thumbnails_forum_list']); if (in_array($foruminfo['forumid'], $forumsallowed)){ $dothumbnail = true; if($vbulletin->options['thread_thumbnails_thumbnail_source'] == '1'){ $hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "attachment AS attachment ON (attachment.postid = thread.firstpostid AND attachment.extension IN('jpg', 'gif', 'png', 'jpeg', 'bmp'))"; $hook_query_fields .= ", MIN(attachment.attachmentid) AS attachmentid"; $hook_query_where .= "GROUP BY thread.threadid"; } else { $hook_query_fields .= ", thread.thumbnailurl AS thumbnailurl"; } } } } Code:
$hook_query_where .= "GROUP BY thread.threadid"; Leo |
#203
|
|||
|
|||
search thumbnails only appear on the first page. The rest of the pages are displayed as normal (without thumbs). Is it just me? I have VBSEO installed.
|
#204
|
||||
|
||||
Quote:
|
#205
|
|||
|
|||
$threadactiontime = (($feed['threadactiondelay'] > 0) ? (TIMENOW + $feed['threadactiondelay'] * 3600) : 0);
preg_match($pat,$pagetext,$matches); $thumburl = escape_string($matches[1]); $itemdata->set('thumbnailurl', $thumburl); |
#206
|
|||
|
|||
PHP Code:
|
#207
|
|||
|
|||
if ($type == 'thread')
{ if($vbulletin->options['thread_thumbnails_thumbnail_source'] == '0') { $dataman->setr('thumbnailurl', htmlspecialchars_uni($post['thumbnailurl'])); } if($vbulletin->options['thread_thumbnails_thumbnail_source'] == '2') { preg_match('/\[img\](.*?)\[\/img\]/i',$post['message'],$matches); $dataman->setr('thumbnailurl', $matches[1]); } } |
#208
|
|||
|
|||
not work
$pat = '/\[IMG\](.*?)\[\/IMG\]/i'; preg_match($pat,$pagetext,$matches); $thumburl = escape_string($matches[1]); $itemdata->set('thumbnailurl', $thumburl); |
#209
|
|||
|
|||
If you have RSS posts going to a forum like I do, you will have to do this:
in includes/cron/rssposter.php find PHP Code: $threadactiontime = (($feed['threadactiondelay'] > 0) ? (TIMENOW + $feed['threadactiondelay'] * 3600) : 0); Put this below preg_match('/\[img\](.*?)\[\/img\]/i',$pagetext,$matches); $thumburl = ($matches[1]); $itemdata->set('thumbnailurl', $thumburl); now the thumbnail will appear on forum display like regular thread posts The code work on my 3.8.4 it will draw the thumb from {feed:description} any one know how to edit the {feed:description} and make it shorter or delete some characters? |
#210
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|