Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2010, 10:26 PM
btlewand btlewand is offline
 
Join Date: Jul 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Preventing RSS From Being Disabled When View Forum Set to No

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.
Reply With Quote
  #2  
Old 12-17-2010, 03:40 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
PHP Code:
    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:
PHP Code:
    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.
Reply With Quote
  #3  
Old 12-17-2010, 05:24 AM
btlewand btlewand is offline
 
Join Date: Jul 2010
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 12-17-2010, 03:38 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by btlewand View Post
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."
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 02:04 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.08356 seconds
  • Memory Usage 2,216KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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