vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Nexia's Attached Images in Full Size inside Thread (https://vborg.vbsupport.ru/showthread.php?t=213529)

05-12-2009 09:00 PM

Nexia's Attached Images in Full Size inside Thread
 
This is a Tutorial more than a product, because the only thing involved is a file edit. But there is no tutorials section here, and the articles get deleted when they come from me, so here is the hack!

You can see it on this site, all the attached images that we tag in our threads are shown in links, not as Thumbnails like in the default vBulletin 3.6+.

See how it goes in the default vBulletin:


And here we see it with the change made, like on vbEnhancer.com:


The only way we can do that is by editing a file that have no hook attached where it is needed.

Here is the Tutorial: (the file attached contain the exact same How To.txt)

PHP Code:

# FIND: (line 1848 in non-edited file)


    
function handle_bbcode_img($bbcode$do_imgcode$has_img_code false)
    {
        global 
$vbphrase;


# BELOW, ADD:

        
$oldregistry $this->registry->options['attachthumbs'];
        
$this->registry->options['attachthumbs'] = FALSE;



# FIND: (line 1964 in non-edited file)

        
if ($has_img_code BBCODE_HAS_SIGPIC)
        {
            
$bbcode preg_replace('#\[sigpic\](.*)\[/sigpic\]#siUe'"\$this->handle_bbcode_sigpic('\\1')"$bbcode);
        }


# BELOW, ADD:

        
$this->registry->options['attachthumbs'] = $oldregistry;


################################# THAT'S ALL FOR THE FILE EDIT! 

>> You now have to setup your Usergroups for "Can See Thumbnails" to YES!

Alfa1 05-14-2009 10:46 AM

Did you add the wrong images?

smooth-c 05-15-2009 09:09 AM

Bleh, I hate changing code! Good mod though, well done :)


All times are GMT. The time now is 08:04 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.01518 seconds
  • Memory Usage 1,718KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete