Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

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
  #2  
Old 10-30-2006, 05:26 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a note, vBACMPS is, and has always been, free.
Reply With Quote
  #3  
Old 10-30-2006, 05:29 PM
voteforbird's Avatar
voteforbird voteforbird is offline
 
Join Date: Jul 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right. I never said it wasn't… I didn't mean to imply that it wasn't by saying this was free, as well.
Reply With Quote
  #4  
Old 10-30-2006, 06:13 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm curious as to why you would have people modify the powered_by_vbulletin phrase when the fix in question affects vBadvanced. Such an edit would be displayed and viewable on all vBulletin powered pages.

As a side note, for those installing this -- I would recommend adding a rel="nofollow" tag to the links within the branding text, to prevent search engine crawling of those links.

eg.
HTML Code:
+ the <a href="http://www.volconvo.com" rel="nofollow">Volconvo</a><a href="http://www.volconvo.com/cmps.php?page=newsmodulefix" rel="nofollow"> news module fix</a>
Reply With Quote
  #5  
Old 10-30-2006, 06:38 PM
voteforbird's Avatar
voteforbird voteforbird is offline
 
Join Date: Jul 2006
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus
I'm curious as to why you would have people modify the powered_by_vbulletin phrase when the fix in question affects vBadvanced. Such an edit would be displayed and viewable on all vBulletin powered pages.
I didn't know there was a better place to add it. In my powered_by_vbulletin phrase, there's a vBadvanced notice there, as well. Is that one not global?

Why are you being so rude?
Reply With Quote
  #6  
Old 10-30-2006, 06:44 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by voteforbird
I didn't know there was a better place to add it. In my powered_by_vbulletin phrase, there's a vBadvanced notice there, as well. Is that one not global?
vBadvanced in no way modifies the powered_by_vbulletin phrase. It utilizes it's own independant phrase, powered_by_vbadvanced_cmps, which is displayed on all pages generated by vBadvanced. If you have to modify any phrase, this would be the one.

Quote:
Originally Posted by voteforbird
Why are you being so rude?
I wasn't aware I was being rude. Would you care to elaborate?
Reply With Quote
  #7  
Old 10-30-2006, 07:06 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There shouldn't be any updating of powered phrases, period. Asking for a "powered by" credit for one patch to one module in CMPS is ridiculous. That's like "third spear bearer on left" asking for equal credits with the lead actors in a movie.

Just my $0.02, your mileage may vary, one persons opinion, etc etc.

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

Quote:
Originally Posted by magnus
I wasn't aware I was being rude. Would you care to elaborate?
Your "I'm curious" comment and suggestion to add nofollow attributes insinuates that you think I'm trying to improve my search engine rankings. This is not the case.

Quote:
Originally Posted by cheesegrits
There shouldn't be any updating of powered phrases, period. Asking for a "powered by" credit for one patch to one module in CMPS is ridiculous. That's like "third spear bearer on left" asking for equal credits with the lead actors in a movie.

Just my $0.02, your mileage may vary, one persons opinion, etc etc.

-- hugh
Point taken. The instructions have been modified accordingly and the link is no longer required.
Reply With Quote
  #9  
Old 10-30-2006, 07:15 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by voteforbird
Point taken. The instructions have been modified accordingly and the link is no longer required.
You have regained my respect.

Thanks for the fix. I'll use it now.

-- hugh
Reply With Quote
  #10  
Old 10-30-2006, 07:27 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by voteforbird
Your "I'm curious" comment and suggestion to add nofollow attributes insinuates that you think I'm trying to improve my search engine rankings. This is not the case.
My post was made to be informative and factual. Which it was. I didn't interject my opinion on the subject.

But since you opened the door:

As for the nofollow tags -- they should've been added to begin with as a common courtesy. What your actual intentions were is irrelevant. Adding such links is unethical and I simply provided the needed code to correct this 'oversight'. Nevermind the fact that the entire branding addition is completely unwarranted and obtrusive.

I'm also baffled how cheesegrits' post was met with enthusiasm while mine was met with tooth and nail.
Reply With Quote
Reply


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 06:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05372 seconds
  • Memory Usage 2,324KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_html
  • (2)bbcode_php
  • (7)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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