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)

Athena1984 01-14-2011 10:39 PM

I have the settings to pull the first image in the post as the thumbnail and for some reason, it will not show up after initially posting. I have to post the thread then edit for the thumbnail to show up. Could this be because of another modification? Initially, I thought it was because of the MOD System, like vbulletin.org has so, I disabled it but, it's still giving me the same issue.

DaPike 01-18-2011 10:49 AM

I'm using 4.1.0PL2. I can only see the NO THUMB COVER!
All used links to the right covers are not shown. There is also only the NO COVER to see!

What to do to get this mod working??

megamoose 01-20-2011 07:09 PM

Going to repost this as it works the exact some for this version as the old:

Quote:

Okay next fix:

If you are using the First Image in Post option, you will notice you only get a thumbnail when you update the post, and not when you create a new one. To fix this:

Goto the Manage Plugins tab in your ACP and edit New Thread - Save Thumbnail, Datamanager

You will then want to replace the Plugin PHP Code with:
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]);
                }              
            } 



Chris Ober 01-24-2011 05:09 PM

How can I enable this to work with First Attachment AND First Image in post?

Right now, if set to First Attachment, it doesn't display thumbnails for images hosted outside of the site (entered in IMG tags).

If it's set to First Image in Post, then the external image thumbnails are displayed but not the attachment ones.

bybart 01-25-2011 08:01 PM

Working for 4.0.1? If not there for 4.1.0;

james shadle 01-25-2011 10:50 PM

Quote:

Originally Posted by Chris Ober (Post 2153919)
How can I enable this to work with First Attachment AND First Image in post?

Right now, if set to First Attachment, it doesn't display thumbnails for images hosted outside of the site (entered in IMG tags).

If it's set to First Image in Post, then the external image thumbnails are displayed but not the attachment ones.


Great question Chris.
I could use that feature on my board as well.
James

fxwoody 02-03-2011 01:03 PM

1 Attachment(s)
Ok guys! i manage to make the thumbnail to work perfectly with the "User Entered URL"
function !!

The way i work on my forum, is, i have sections that i want to display the thumbnails for each thread, so, in the option menu, i use "User Entered URL" and "Thumbnails Required" set to yes.
Now, u can also put the option "Thumbnails Required" to NO and it will also get automatically the thumbnail image you set up in the "No Thumbnail Replacement Image".

The way i made it work in my V4.1.1 is like this:

In New posting Templates / newthread

Find:

HTML Code:

                                &nbsp;<img id="display_posticon" src="{vb:raw selectedicon.src}" alt="{vb:raw selectedicon.alt}" />
                        </div>

and paste after:

HTML Code:

<!---urlthumbnail--->           
                    <vb:if condition="$show['thumbnailurl']">
                        <div class="blockrow">
                                <label for="thumbnailurl" class="full">{vb:phrase thumbnail_url}:</label>
                                <input type="text" name="thumbnailurl" id="thumbnailurl" class="primary full textbox" value="" maxlength="250" />
                        </div>
                    </vb:if>
<!---urlthumbnail--->


in editpost

find:

HTML Code:

                                <img id="posticon_preview" src="{vb:raw selectedicon.src}" alt="{vb:raw selectedicon.alt}" title="Selected post icon" />
                        </div>

and paste after:

HTML Code:

        <!---autothumbnail--->
                            <vb:if condition="$show['thumbnailurl']">
                <div class="blockrow">
                        <label for="thumbnailurl">{vb:phrase thumbnail_url}:</label>
                        <input type="text" name="thumbnailurl" id="thumbnailurl" class="primary textbox" value="{vb:raw threadinfo.thumbnailurl}" maxlength="250" />
                </div>
                </vb:if>
        <!---/autothumbnail--->


In plugin manager for "Product : Thread Thumbnails"
in the : "New Thread - Save Thumbnail, Datamanager"

replace everything with this:

HTML 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)\]\s*(https?:\/\/([^*\r\n]+|[a-z0-9\/\\\._\- !]+))\[\/(img|IMG)\]/', $post['message'], $matches);

               
                $dataman->setr('thumbnailurl', $matches[1]);
                } 
                if($vbulletin->options['thread_thumbnails_required'] == '1' && empty($post['thumbnailurl']))
                {
                    if($vbulletin->options['thread_thumbnails_thumbnail_source'] == '0')
                    {
                        $errors[] = $vbphrase['thumbnail_error_one'];
                    }
                    else if($vbulletin->options['thread_thumbnails_thumbnail_source'] == '2')
                    {
                        $errors[] = $vbphrase['thumbnail_error_two'];
                    }
                }           
            }

Hope it helps a few of you ;)

dirk2103 02-06-2011 06:27 PM

Quote:

Originally Posted by megamoose (Post 2152087)
Okay next fix:

If you are using the First Image in Post option, you will notice you only get a thumbnail when you update the post, and not when you create a new one. To fix this:

Goto the Manage Plugins tab in your ACP and edit New Thread - Save Thumbnail, Datamanager

You will then want to replace the Plugin PHP Code with:
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]);
                }              
            } 


Thanks ,this fix Works Perfect for 4.1.1

TCB 02-16-2011 09:48 PM

Thanks (y)

Would it be possible to have this custom icon INSTEAD of the threadicon, instead of having it left or right to it?

solohdes 02-16-2011 10:40 PM

Does not work on vB 4.1.2, the thumbnail URL bar does not appear.


All times are GMT. The time now is 04:31 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
  • Page Generation 0.01345 seconds
  • Memory Usage 1,786KB
  • 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
  • (5)bbcode_html_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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