Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Restore working vbCMS Comments on vB 4.0.4
fogjuice
Join Date: May 2009
Posts: 56

 

Toronto, Canada
Show Printable Version Email this Page Subscription
fogjuice fogjuice is offline 06-18-2010, 10:00 PM

Many of you may have realized that with the release of vBulletin 4.0.4, vbCMS Comments has been disabled and will give permission errors to everyone that tries to view the vbCMS comments page. I have created a fix for this until vbulletin creates an on/off switch.

You only need to do this if you are using vBulletin 4.0.4.

This is based off of what Mystics suggested at vbulletin.com.

How to fix (install):

Step 1:
Comment out line 317 to 320 in showthread.php.
PHP Code:
//if ($thread['forumid'] == $vbulletin->options['vbcmsforumid'] AND !can_moderate($thread['forumid']))
//{
    //eval(standard_error(fetch_error('invalid_comment_forum', $vbphrase['forum'], $vbulletin->options['contactuslink'])));
//} 


Step 2:

Open forumdisplay.php, scroll down to line 138.

Replace the following
PHP Code:
if (!$foruminfo['forumid'] OR ($foruminfo['forumid'] == $vbulletin->options['vbcmsforumid'] AND !can_moderate($foruminfo['forumid']))) 
with this:
PHP Code:
//if (!$foruminfo['forumid'] OR ($foruminfo['forumid'] == $vbulletin->options['vbcmsforumid'] AND !can_moderate($foruminfo['forumid'])))
if (!$foruminfo['forumid']) 
Finished!

You will have to do this if you upgrade your forum again or when ever you replace the showthread.php and forumdisplay.php files. Hopefully next release vbulletin team creates an on/off switch for this.
Reply With Quote
  #2  
Old 06-19-2010, 09:20 PM
Charlie98902 Charlie98902 is offline
 
Join Date: Dec 2006
Posts: 1,156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks and this does work! Wouldn't this fit better in the articles or template mod edits?
Reply With Quote
  #3  
Old 06-19-2010, 09:36 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

Moved to vb4 articles.
Reply With Quote
  #4  
Old 06-19-2010, 10:21 PM
fogjuice fogjuice is offline
 
Join Date: May 2009
Location: Toronto, Canada
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for putting it in the correct section.
Reply With Quote
  #5  
Old 06-20-2010, 12:26 AM
Charlie98902 Charlie98902 is offline
 
Join Date: Dec 2006
Posts: 1,156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good thing is I have a built in editor on my cpanel so it was easy to get to where I needed. This edit will make those folks happy. I know mine are.
Reply With Quote
  #6  
Old 06-20-2010, 07:38 PM
sulasno sulasno is offline
 
Join Date: Feb 2010
Posts: 588
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where are

showthread.php and forumdisplay.php

located ?

should I edit the files before uploading them for the upgrade ?
Reply With Quote
  #7  
Old 06-20-2010, 07:50 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They're in the root folder of the download package (zip file).

You can do the upgrade first and then edit the two files and re-upload them - this will avoid any version checks done by the installer.
Reply With Quote
  #8  
Old 06-20-2010, 07:52 PM
fogjuice fogjuice is offline
 
Join Date: May 2009
Location: Toronto, Canada
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sulasno View Post
where are

showthread.php and forumdisplay.php

located ?

should I edit the files before uploading them for the upgrade ?
You can probably edit them before you upload htem for the upgrade, however, I did it after I upgraded. I just used adobe dreamweaver to edit the files live but you can just use notepad and edit the files then replace the old showthread.php and forumdisplay.php files.
Reply With Quote
  #9  
Old 07-16-2010, 09:08 AM
thisgeek thisgeek is offline
 
Join Date: Dec 2005
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is STILL broken in 4.0.5.
Reply With Quote
  #10  
Old 07-16-2010, 09:14 AM
sulasno sulasno is offline
 
Join Date: Feb 2010
Posts: 588
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you do a comparison of the upgraded and the existing files ?
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 10:08 AM.


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.04940 seconds
  • Memory Usage 2,285KB
  • 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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete