vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   certain Threads readable only to registered users (https://vborg.vbsupport.ru/showthread.php?t=118257)

wezoo 06-10-2006 08:34 PM

certain Threads readable only to registered users
 
hi all
im trying to find something that will make threads (contents) only visible to registered users, so you can tease them into registering by letting them view the odd thread.

does this exist at all ?

many thanks

calorie 06-10-2006 10:09 PM

vB ACP -> Usergroup Manager -> Edit Usergroup -> Forum Viewing Permissions
Code:

Can View Forum                Yes
Can View Thread Content        No
Can View Others' Threads      Yes


wezoo 06-10-2006 10:33 PM

Hi calorie
Thanks, but i know this
i want to ba able to choose which thread in a forum to be accesible !!

calorie 06-10-2006 11:10 PM

Untested but maybe a start...
Code:

// hook: showthread_getinfo

if (
        $vbulletin->userinfo['usergroupid'] == 1 // unregistered
                AND
        in_array($threadid, array(1, 2, 3)) // blocked threadids
)
{
        $vbulletin->bf_ugp_forumpermissions['canviewthreads'] = 0;
}


wezoo 06-10-2006 11:13 PM

hehe ermmm
Im an artist, and this stuff looks scary, could you explain a little ?

thanks all tha same tho :)

calorie 06-10-2006 11:31 PM

See bolded comments within:
Code:

// hook: showthread_getinfo

if (
        $vbulletin->userinfo['usergroupid'] == 1                  // if the user is unregistered or not logged in
                AND                                                // and
        in_array($threadid, array(1, 2, 3))                        // the user is trying to see threadids 1, 2, or 3
)
{
        $vbulletin->bf_ugp_forumpermissions['canviewthreads'] = 0; // then the user gets a no permission page
}

Check here for how to add a plugin to your board. :)

wezoo 06-11-2006 08:24 AM

Calorie !!!!!

Thnaks very much for taking the time :)
I'll try it and lety you know..

Calorie
may seem like a strange request
but do you know if you can impose a restriction on thread ?

like a guest can only view the 200 words in a thread ?
sort of a tease to register ?

many thanks


All times are GMT. The time now is 08:08 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.01083 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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