Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-11-2002, 09:09 PM
hadley hadley is offline
 
Join Date: Mar 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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...
Reply With Quote
  #2  
Old 11-12-2002, 07:45 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<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>
Reply With Quote
  #3  
Old 11-12-2002, 02:31 PM
hadley hadley is offline
 
Join Date: Mar 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #4  
Old 11-12-2002, 02:58 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #5  
Old 11-12-2002, 03:03 PM
hadley hadley is offline
 
Join Date: Mar 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 11-12-2002, 03:10 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope.. you are all set..
Reply With Quote
  #7  
Old 11-12-2002, 09:14 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instead of typing out everysingle forumid number how do I make it work so it just works for every single forum.
Reply With Quote
  #8  
Old 11-12-2002, 09:22 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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 05:54 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.04464 seconds
  • Memory Usage 2,234KB
  • 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
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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