Back to vBulletin 3.0 Add-Ons

Stopping images in signatures from making the page really wide
Mod Version: 1.00, by UK Jimbo

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 7
Released: 11 Jan 2005 Last Update: Never Downloads: 0
Not Supported  

This is a hack we've used on https://www.visordown.com/forums/ in version 3.0.0 up to 3.0.5

It prevents users from having images in their sigs that push the width of the page larger than the template should be by adding some whitespace between each of the images.

You just need to edit one file includes/functions_showthread.php

On line 459 find:
PHP Code:
$post['signature'] = parse_bbcode($post['signature'], 'nonforum'$vboptions['allowsmilies']); 
add on the line below it:
PHP Code:
$post['signature'] = preg_replace('/(<img[^<>]+>)(<img)/i',"\$1 \$2",$post['signature']); 

The block of code should now look like:
PHP Code:
                        if (!isset($sigcache["$post[userid]"]))
                        {
                                
$parsed_postcache['skip'] = true;
                                
$post['signature'] = parse_bbcode($post['signature'], 'nonforum'$vboptions['allowsmilies']);
                                
$post['signature'] = preg_replace('/(<img[^<>]+>)(<img)/i',"\$1 \$2",$post['signature']);
                                
$sigcache["$post[userid]"] = $post['signature'];
                        }
                        else 

Download

No files for download.

Screenshots

   


vblts.ru supports vBulletin®, 2022-2024