PDA

View Full Version : Restore working vbCMS Comments on vB 4.0.4


fogjuice
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.

//if ($thread['forumid'] == $vbulletin->options['vbcmsforumid'] AND !can_moderate($thread['forumid']))
//{
//eval(standard_error(fetch_error('invalid_comment_f orum', $vbphrase['forum'], $vbulletin->options['contactuslink'])));
//}


Step 2:
Open forumdisplay.php, scroll down to line 138.

Replace the following

if (!$foruminfo['forumid'] OR ($foruminfo['forumid'] == $vbulletin->options['vbcmsforumid'] AND !can_moderate($foruminfo['forumid'])))
with this:

//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.

Charlie98902
06-19-2010, 09:20 PM
Thanks and this does work! Wouldn't this fit better in the articles or template mod edits?

Paul M
06-19-2010, 09:36 PM
Moved to vb4 articles.

fogjuice
06-19-2010, 10:21 PM
Thanks for putting it in the correct section. :)

Charlie98902
06-20-2010, 12:26 AM
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.

sulasno
06-20-2010, 07:38 PM
where are

showthread.php and forumdisplay.php

located ?

should I edit the files before uploading them for the upgrade ?

djbaxter
06-20-2010, 07:50 PM
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.

fogjuice
06-20-2010, 07:52 PM
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.

thisgeek
07-16-2010, 09:08 AM
This is STILL broken in 4.0.5. :mad:

sulasno
07-16-2010, 09:14 AM
did you do a comparison of the upgraded and the existing files ?