vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Guests may view thread counts, etc... must register to view threads. (https://vborg.vbsupport.ru/showthread.php?t=104544)

Barryp 01-05-2006 06:24 PM

Guests may view thread counts, etc... must register to view threads.
 
I found the mod for vb2 but i am running vb3 and they seem to be different. I would like Unregistered / Not Logged In (ID:1) users to be able to see the homepage (Where all the forums are listed). If you simply "Not Allow" those users to not view the forums, they cannot see the actual post count, giving them no incentive for them to register. I hope someone can help. Thanks


- Barry
- icq. 35389708

Alright, I figured it out.

Open showthread.php, and find:
PHP Code:

if (!($forumperms CANVIEWOTHERS) AND ($thread['postuserid'] != $bbuserinfo['userid'] OR $bbuserinfo['userid'] == 0))
{
    
print_no_permission();


then add directy UNDER that:
PHP Code:

 if ($bbuserinfo['usergroupid']==1
{
header("Location: register.php");
exit; 


That will allow users to view threads, but not posts of threads.


To block users from even viewing your threads and will only be able to see forum titles, post counts, etc.. Use this as well!

Open forumdisplay.php and find:
PHP Code:

// get permission to view forum
$_permsgetter_ 'forumdisplay';
$forumperms fetch_permissions($forumid);
if (!(
$forumperms CANVIEW))
{
    
print_no_permission();


then add directy UNDER that:
PHP Code:

 if ($bbuserinfo['usergroupid']==1
{
header("Location: register.php");
exit; 


This forces users in the Unregistered / Not Logged In usergroup to be redirected to the registration page.


All times are GMT. The time now is 02:42 AM.

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.01095 seconds
  • Memory Usage 1,717KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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