Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
A Better News Module Fix for vBadvanced CMPS 2.2.1 Details »»
A Better News Module Fix for vBadvanced CMPS 2.2.1
Version: 1.00, by voteforbird voteforbird is offline
Developer Last Online: Nov 2008 Show Printable Version Email this Page

Category: Portal Software - Version: 3.6.2 Rating:
Released: 10-29-2006 Last Update: Never Installs: 30
 
No support by the author.

vBadvanced has released CMPS 2.2.1 with a substandard fix to the News module bug that has plagued many vBulletin forums for months.

Volconvo.com and developer 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)

Volconvo.com and developer 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 INSTALL.

CHANGE LOG

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

CREDITS

This fix was developed by Sillysoft in partnership with Volconvo.

You may contact Sillysoft at liquidchaoss (at) yahoo.com or via AIM at "Sillysoft".
The Volconvo administrator may be contacted here.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-30-2006, 07:45 PM
bitHacker bitHacker is offline
 
Join Date: Sep 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

six month ago, i cam across an error, which made my page not validated due to
news module cutting HTML tags - http://www.vbadvanced.com/forum/show...1456#post91456

your solution fixed that problem too !!!!!!

one more thing...

add this:
PHP Code:
$news['message'] .= ' 'construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $news['threadid'], $session['sessionurl']); 
before
PHP Code:
// END BUG FIX 
to get a "[Read More]" link at the end of the post

THANK YOU !!!!

p.s.
if only i could *click INSTALL* a million times
Reply With Quote
  #13  
Old 10-30-2006, 07:47 PM
voteforbird's Avatar
voteforbird voteforbird is offline
 
Join Date: Jul 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it helped!

Mine already does have a [READ MORE] link. Can anyone else confirm? Perhaps somehow I left this out of the fix instructions.
Reply With Quote
  #14  
Old 10-30-2006, 09:03 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please attach the modification as a (text) file.

You can keep it in the first post if you wish, but all modifications must be supplied in a downloadable form.

Thanks.
Reply With Quote
  #15  
Old 10-30-2006, 09:09 PM
voteforbird's Avatar
voteforbird voteforbird is offline
 
Join Date: Jul 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry about that. Done!
Reply With Quote
  #16  
Old 10-31-2006, 03:20 AM
lolo? lolo? is offline
 
Join Date: Jun 2005
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great works fine thanks for this fix
Reply With Quote
  #17  
Old 10-31-2006, 08:47 AM
Mecho's Avatar
Mecho Mecho is offline
 
Join Date: Aug 2006
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi .. do u think that u can add some code for resize Images ( not attach images ) in news M... ?

sorry if i ask in wrong section but i saw that u work on it thats why....

Tnx alot
Reply With Quote
  #18  
Old 10-31-2006, 01:33 PM
voteforbird's Avatar
voteforbird voteforbird is offline
 
Join Date: Jul 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, that's not me, but you may be able to find your solution here: https://vborg.vbsupport.ru/showthread.php?t=127266
Reply With Quote
  #19  
Old 10-31-2006, 02:40 PM
Mecho's Avatar
Mecho Mecho is offline
 
Join Date: Aug 2006
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tnx mate but this topic that u said i think is not for Vbadvanced . isnt it ?

i need resize image for vbadvanced . i was looking for it everywhere and i request it more that 5times in vbadvanced forum too . but ....

it will be great if some coder can make this mode for news moudle for vbadvanced coz it doest exist . Tnx alot . regards
Reply With Quote
  #20  
Old 10-31-2006, 03:26 PM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to clarify...does this fix work with vbadvanced 2.2.1 or 2.2.0, or both?
Reply With Quote
  #21  
Old 10-31-2006, 04:34 PM
voteforbird's Avatar
voteforbird voteforbird is offline
 
Join Date: Jul 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mecho,
It should work with vBadvanced with slight alteration. Please save that discussion for another thread, though.

Bad Bunny,
The line in 2.2.0 is slightly different. You can find it shortly under this:
Quote:
// Strip characters and add "read more"
The fix will still work—in fact, it was originally created for version 2.2.0. I just assumed you all would have upgraded
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:54 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.09792 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete