vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Forum Display Enhancements - Thread Thumbnails (https://vborg.vbsupport.ru/showthread.php?t=237404)

fxwoody 08-20-2010 08:57 PM

Ok, i modified my set up in my V4.0.6 and with codes and reference that i found in here and...it works OK! Lolll

Here's the changes i made (Tks to every one who has posted Codes and ideas, as none of these are my creation)

These changes have to be done in every skins that you have in order to make it work. Also, the option for "First Image In Post" and "First Attachment" are working well but got stuck with the "User entered URL" and this one is not showing properly :(
Still, it works as it should in V4.0.6

Now, replace or copy these in the templates:

In the Threadbit:

Find:
PHP Code:

  <vb:if condition="$show['threadicon']">
                                                <
img src="{vb:raw thread.threadiconpath}" alt="{vb:raw thread.threadicontitle}" border="0" />
                                        </
vb:if> 

Paste this after:

PHP Code:

<!----autothumbnail--->
                                      <
vb:if condition="!$thread['thumbnailurl']">
                <
class="threadstatus" rel="vB::AJAX" title="
                <vb:if condition="
$show['threadcount']">
                    {vb:rawphrase have_x_posts_in_thread_last_y, {vb:raw thread.dot_count}, {vb:raw thread.dot_lastpost}}
                </vb:if>
                "
></a>
                          </
vb:if>
<!----/
autothumbnail---> 


In the template "thread_thumbnail_threadbit"

You should have this code in it:

PHP Code:

<vb:if condition="$thread['thumbnaildisplay'] AND (!$thread[sticky] OR ($vbulletin->options[thread_thumbnails_sticky] == '1'))">
            <
a href="{vb:link thread, {vb:raw thread}}" id="thread_gotonew_{vb:raw thread.realthreadid}" style="float:left;clear:right;display:block;margin:2px;"><img style="{vb:raw thread.thumbnailstyle}" src="{vb:raw thread.thumbnailurl}"></a>
        </
vb:if> 


In the plugin manager : New Thread - Save Thumbnail, Datamanager >>> "Modify with this" :

PHP Code:

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]);
                }              
            } 

As for the rest of the normal template edit from the main post, i haven't modify anything from it.
The options in the "Thread Thumbnails Options" are all set to yes and the "Thumbnail Location" works fine in both before or after the Threadicon.

Also, if you want to re-size the thumbnail you can use this:
PHP Code:

max-width:40px;max-height:60px;border1px ridge

and change the px to the one you would like to see.

If no images are in the posts, i made myself a small pic that i FTP to the images root of my site and this part of it worked OK too ;)
EX: /vb4/images/misc/test-posbit.gif

Hope it will help a few of you guys that wanted this cool plugin :)

rolfw1 08-20-2010 09:24 PM

Well done, that should help a lot of people.:)

fxwoody 08-20-2010 10:44 PM

Quote:

Originally Posted by rolfw1 (Post 2087076)
Well done, that should help a lot of people.:)

Tks rolfw1 ;) Tho now i made a doodoo in my database with the script trying to get all the thumbnails to show! lolll

ohhh well, when it's not one thing it's another! :rolleyes:

By the way, i got this from the error:

Database error in vBulletin 4.0.6:

Code:

Invalid SQL:
SELECT node.nodeid, node.url, node.parentnode, node.nodeleft, node.noderight,
                        node.setpublish, node.publishdate, info.title, node.permissionsfrom, node.hidden, COUNT(child.nodeid) AS children,
                          SUM(CASE WHEN (child.setpublish > 0 AND child.publishdate < 1282347755 AND child.contenttypeid <> 17) THEN 1 ELSE 0 END) AS publish_count
                        FROM cms_node AS node
                        LEFT JOIN cms_node AS child ON child.parentnode = node.nodeid AND child.new != 1
                        LEFT JOIN cms_nodeinfo AS info ON info.nodeid = node.nodeid
                        WHERE (node.contenttypeid = 17)
                        GROUP BY node.nodeid, node.url, node.parentnode, node.nodeleft, node.noderight,
                        node.setpublish, node.publishdate, info.title, node.permissionsfrom, node.hidden  HAVING COUNT(child.nodeid) > 0
                        ORDER by node.nodeleft;;

MySQL Error  : Got error 28 from storage engine
Error Number  : 1030
Request Date  : Saturday, August 21st 2010 @ 01:42:35 AM
Error Date    : Saturday, August 21st 2010 @ 01:42:35 AM
Script        : http://wood
Referrer      :
IP Address    :
Username      : woody
Classname    : vB_Database
MySQL Version : 5.0.91-community


fxwoody 08-21-2010 12:39 AM

Ok! DO NOT RUN THE SCRIPT!!!! Server load went crazy and almost got cut off!

baboo 08-22-2010 12:20 PM

Hi fxwoody, does is it work well with you in 406?

fxwoody 08-22-2010 07:09 PM

It works well in every forums with the automatic 1 st image, tho, i tried the script from megamoose and ended up with a server load that almost busted my account! So install it ok! But do not use the script! ;)lolll

As for all the other images in the posts, only way i founded to get them to show is by edit and save each of them! Long task if you have tons of them!!! loll

Cheers

baboo 08-23-2010 12:47 PM

OMG, I will pay to any one who can install it for me and make it work.

It's very important for my forum.

baboo 08-23-2010 01:27 PM

Is there someone can update it for us?

S!p 08-24-2010 08:03 AM

how to fix it?
http://img687.imageshack.us/img687/3766/thn.png

fxwoody 08-24-2010 11:59 AM

If you guysfallow this it should work ok for you :
https://vborg.vbsupport.ru/showpost....&postcount=145

@S!p
What version are u using and did you adjust any of the templates?


All times are GMT. The time now is 03:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01226 seconds
  • Memory Usage 1,772KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete