View Full Version : Preventing RSS From Being Disabled When View Forum Set to No
btlewand
12-16-2010, 10:26 PM
In vBulletin when you set permissions to view a forum to "NO" the program is also configured to disable the RSS feed in that forum and any child forums. While I want to prevent any unregistered users from entering the forum, I would still like to be able to have RSS feeds enabled (or at least for the child forums) so the feeds can be streamed back via RSS to a LinkedIn group.
I was told by support at vBulletin that keeping the RSS feeds enabled can be done via the external.php file but do not know what to edit in the file. Seems like an easy edit of changing code from no to yes but just need to be pointed in the right direction.
I've tried to use the Advanced Permissions Based On Post Count hack posted on vBulletin.org but am not able to get it to fully work on vB 4.08. If there is any easier fix, I'm open to hearing what it is.
Lynne
12-17-2010, 03:40 AM
On my 3.8 forum, I have a couple of forums I have closed off to unregistered users (spiders basically), but I did want my users to be able to have access to the rss feed. So, I modified these lines which look the same in 4.x. You can try it and see.
Find:
foreach ($forumids AS $forumid)
{
$forumid = intval($forumid);
$forumperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];
if (isset($vbulletin->forumcache["$forumid"])
AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canview'])
AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'])
AND (($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR in_array($vbulletin->GPC['type'], array('JS', 'XML'))) // JS/XML only shows titles
AND verify_forum_password($forumid, $vbulletin->forumcache["$forumid"]['password'], false)
)
{
$forumchoice[] = $forumid;
}
}
Change to:
foreach ($forumids AS $forumid)
{
$forumid = intval($forumid);
$forumperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];
if ($forumid != 'x') {
if (isset($vbulletin->forumcache["$forumid"])
AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canview'])
AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'])
AND (($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR in_array($vbulletin->GPC['type'], array('JS', 'XML'))) // JS/XML only shows titles
AND verify_forum_password($forumid, $vbulletin->forumcache["$forumid"]['password'], false)
)
{
$forumchoice[] = $forumid;
}
}
if ($forumid == 'x')
{
if (isset($vbulletin->forumcache["$forumid"]))
{
$forumchoice[] = $forumid;
}
}
}
Change X to your forumid (in a couple of places). Try it and see if it's what you want. Remember that this will NOT check permissions for users in those forums, so anything that is posted is now viewable.
btlewand
12-17-2010, 05:24 AM
Thanks for giving me these edits. However, I tried with just a single forum id in the two places where you would replace the 'x' and it didn't prevent me from entering the forum as an unregistered user.
I do want to mention two hacks that are on vBulletin.org which I tried and had a very unusual situation. Both hacks allow you to enter a forum based on a number of posts (so I can set the post to '1' and as long as all registered users have '1' post they can enter and the RSS feed issue is not affected. These are the two mods (I tried each individually):
https://vborg.vbsupport.ru/showthread.php?t=233979 and
https://vborg.vbsupport.ru/showthread.php?t=249977
One forum I have set up worked using either one of the above hacks separately, but I haven't been able to get a second forum on my site to work. I checked/compared the working forum with another forum set up and the configuration was the same. Then, thinking that there was something in the saved working forum template that I couldn't see, I copied the working forum and created a new forum presuming the entire configuration would copy over. That didn't work either. So both of the above hacks work but on just one forum and copying the working forum to create another did not work. Also tried disabling other plugins without success but didn't think plugins were an issue anyway since one forum was not allowing access to the unregistered usergroup and working as expected. So now I''m completely perplexed trying to troubleshoot this issue.
Lynne
12-17-2010, 03:38 PM
Thanks for giving me these edits. However, I tried with just a single forum id in the two places where you would replace the 'x' and it didn't prevent me from entering the forum as an unregistered user.
All those edits do is allow unregistered users to see the rss feed for a forum that you have set to not allowed unregistered users to see. That is what you said you wanted - no? These edits are in the external.php page which is your rss feed. It does absolutely nothing to the forums.
"While I want to prevent any unregistered users from entering the forum, I would still like to be able to have RSS feeds enabled (or at least for the child forums) so the feeds can be streamed back via RSS to a LinkedIn group."
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.