Back to vBulletin 3.6 Add-ons

A Better News Module Fix for vBadvanced CMPS 2.2.1
Mod Version: 1.00, by voteforbird

This modification is in the archives.
vB Version: 3.6.2 Rating: (1 vote - 5.00 average) Installs: 30
Released: 30 Oct 2006 Last Update: Never Downloads: 66
Not Supported  

http://www.vbadvanced.com/ has released http://www.vbadvanced.com/products.php?do=productinfo&p=4 2.2.1 with a substandard fix to the News module bug that has plagued many vBulletin forums for months.

http://www.volconvo.com/ and developer http://www.volconvo.com/cmps.php?page=newsmodulefix#sillysoft are offering a free and better fix.

BACKGROUND

In version 2.2.0, the problem occurred when when the maximum characters variable was set at such a number that it precluded the display of closing BBCode tags. (thumb: news_verybad.png)

Version 2.2.1 "resolved" the issue by ending quoted material prematurely, effectively ignoring the actual maximum character value. (thumb: news_bad.png)

http://www.volconvo.com/ and developer http://www.volconvo.com/cmps.php?page=newsmodulefix#sillysoft have partnered to offer the following better fix for vBadvanced CMPS that respects your personal settings. (thumb: news_good.png)

INSTALLATION
  1. Find this line in [forumdirectory]/modules/news.php:
    PHP Code:
     $news['message'] = substr($news['message'], 0strrpos(substr($news['message'], 0$mod_options['portal_news_maxchars']), ' ')); 
    Replace with the following code:
    PHP Code:
    // START BUG FIX
    // Provided by Volconvo.com and Sillysoft
    // http://www.volconvo.com/cmps.php?page=newsmodulefix
    // Original code:
    // $news['message'] = substr($news['message'], 0, strrpos(substr($news['message'], 0, $mod_options['portal_news_maxchars']), ' '));

                        
    $rawdata $news['pagetext'];
                        
    $newspart1 substr($rawdata,0,$mod_options['portal_news_maxchars']);
                        
    $newsposition strrpos($newspart1,' ');
                        
    $newspart1 substr($newspart1,0,$newsposition);
                        
                        
    $rawdata $rawdata .'.';
                        
    $newspart2 substr($rawdata,$newsposition,-1);
                        
                        
    preg_match_all('#(\[(.*?)\])?.*?(\[\/(.*?)\])?#',$newspart2,$newspart2tags); 
                        
    $numtags count($newspart2tags[0]);
                        
    $tags '';
                        
                        for(
    $i 0$i $numtags$i++)
                        { 
                            
                            
    $tags .= $newspart2tags[1][$i] . $newspart2tags[3][$i];
                                 
                        }
                        
                        
    $shownews $newspart1 .'...';
                        
    $news['message'] = $bbcode_parser->do_parse($shownews$mod_options['portal_news_enablehtml'], $news['allowsmilie'], $mod_options['portal_news_enablevbcode'], $mod_options['portal_news_enablevbimage']);

    // END BUG FIX 
  2. Click .

CHANGE LOG

11/6/06: Update to better handle images as provided here

Spoiler (click to open)


This works well, but one issue.

Fix this line:

Code:
$shownews = $newspart1 .'...' .$tags;
and replace with:

Code:
$shownews = $newspart1 .'...';

Otherwise a post with lots of images prints all the image tags in a row and stretches out the theme.....

Close
.

CREDITS

This fix was developed by Sillysoft in partnership with http://www.volconvo.com.

You may contact Sillysoft at liquidchaoss (at) yahoo.com or via AIM at "Sillysoft".
The Volconvo administrator may be contacted http://www.volconvo.com/forums/sendmessage.php.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s newsmodulefix.txt (3.4 KB, 94 downloads)

Screenshots

Click image for larger version
Name:	news_bad.png
Views:	1150
Size:	18.7 KB
ID:	55311   Click image for larger version
Name:	news_good.png
Views:	1062
Size:	28.0 KB
ID:	55312   Click image for larger version
Name:	news_verybad.png
Views:	1130
Size:	49.1 KB
ID:	55313  

Similar Mods

vBadvanced CMPS - News Digest Module 1.02 vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024