vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Require registration to view posts (https://vborg.vbsupport.ru/showthread.php?t=45637)

hadley 11-11-2002 09:09 PM

Require registration to view posts
 
This hack may already exist, but in an hour of searching I've not been able to find exactly what I want:

I want unregistered users to be able to see my forums page and the descriptions of the 12 forums it contains, and I want them to be able to click on a particular forum and view all the titles of threads. However, when they click on a thread to view the posts inside that thread, I want them to get a prompt asking them to register.

vB can't do this for me -- anybody got a hack that will? Thanks in advance for any help...

Logician 11-12-2002 07:45 AM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=41815&highlight=showthr ead.php" target="_blank">https://vborg.vbsupport.ru/showt...showthread.php</a>

hadley 11-12-2002 02:31 PM

Thank you -- but there are a couple things I don't understand in that thread:
Quote:

(Replace X with the forum id and Y with user group id)
You mean the id of the group I wish to keep out, right? So, if there are three, how do I name them? (COPPA, unregistered, and awaiting email confirm)

Quote:

Create a new template named "error_youdonthavepermission" and specify your custom message for no permission..
Okay, I understand this, but...

Quote:

(Dont forget to enable their permissions in Admin CP)
..whose permissions do I need to enable? I already have registered users' permissions set to read posts; will this hack change something for them? Or do I need to set permissions differently for unregistered users? Sorry, I'm confused...

Logician 11-12-2002 02:58 PM

Quote:

Originally posted by hadley
You mean the id of the group I wish to keep out, right? So, if there are three, how do I name them? (COPPA, unregistered, and awaiting email confirm)
its the usergroup of the group which can list the threads but can not view them.. If there are more than 1, apply the line in this context:
PHP Code:

if ($forumid==AND ($bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==W)) 

Now you can replace Y, Z and W with the usergroupids..(COPPA, unregistered, and awaiting email confirm in your example)

Quote:

Originally posted by hadley
..whose permissions do I need to enable? I already have registered users' permissions set to read posts; will this hack change something for them? Or do I need to set permissions differently for unregistered users? Sorry, I'm confused...
You have to enable access permissions for these 3 usergroups (COPPA, unregistered, and awaiting email confirm) in that forum so that they can view other's threads.. Then apply the hack..

Otherwise your board will not display the thread list to them so hack will be pointless..

hadley 11-12-2002 03:03 PM

Gotcha -- many thanks.

Btw, the permissions are already enabled for those non-registered groups -- i.e., they now can do everything except post -- so I shouldn't have to change anything prior to the hack.

Logician 11-12-2002 03:10 PM

nope.. you are all set..

BigJohnson 11-12-2002 09:14 PM

Instead of typing out everysingle forumid number how do I make it work so it just works for every single forum.

Logician 11-12-2002 09:22 PM

Quote:

Originally posted by BigJohnson
Instead of typing out everysingle forumid number how do I make it work so it just works for every single forum.
just remove
PHP Code:

$forumid==AND 

part


All times are GMT. The time now is 04:01 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01637 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete