vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Disallow guests to view threads, must register first (https://vborg.vbsupport.ru/showthread.php?t=59859)

Gary King 01-06-2004 10:00 PM

Disallow guests to view threads, must register first
 
Yes I know that there is already a a feature to stop guests from viewing threads, but then this also shows all the posts and threads counters to zero, and under Last Post it will say never (which sucks :)). But, with my hack, it just asks guests to either login or register when viewing a thread and still shows all the right numbers :D

Instructions

Open archive/index.php and find
PHP Code:

    $title .= ' - ' $foruminfo['title'];
}
else
{
    
$do 'index';


Below, add
PHP Code:

if ($bbuserinfo['userid'] == AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si"$_SERVER['HTTP_USER_AGENT'])) 

    
print_no_permission(); 


Open showthread.php and find
PHP Code:

globalize($_REQUEST, array('perpage' => INT'pagenumber''highlight' => STR'goto')); 

Below, add:
PHP Code:

if ($bbuserinfo['userid'] == AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si"$_SERVER['HTTP_USER_AGENT']))
{
    
print_no_permission();


Open template threadbit and find:
PHP Code:

<td class="alt1Active" id="t$thread[threadid]title="$thread[preview]"

Replace it with
PHP Code:

<td class="alt1Active" id="t$thread[threadid]<if condition="$show['member']">title="$thread[preview]"</if>> 

Done! :D

Amiga-uk 01-07-2004 07:49 PM

So.. it makes your forum look REALLY inactive, unless you register? Which you wont, because its not even had a single post in it..

O_o;

base 01-07-2004 08:11 PM

i think the idea is that the current feature shows 0 threads / posts etc, and this hack shows the correct number of threads / posts, but asks for registration when a user clicks on a thread / post.

this, imo, is better than the current way of going about things, don't know why this isn't how vb did it in the first place :)

Amiga-uk 01-07-2004 08:52 PM

^ohh, the current one shows 0 posts..

Right, this is decent then.

Sorry for the misunderstanding ^^;

C.Birch 01-07-2004 09:25 PM

i think vb sould do it this way because now guests can infact see how busy your forum is but can not view the topics what means more will become members other then just viewing all your topics has a guest.

aliencode 01-07-2004 10:20 PM

Wow nice - woah this really SHOULD be the default hmm wonder what Vbulletin was thinking when they wrote the original.

Razor-X 01-07-2004 10:50 PM

Thank you for this tip. It was something I had been wanting for a while!

Zachery 01-07-2004 10:52 PM

could also be done via a template mod :)
in a slightly differnt way of course ;D

Gary King 01-08-2004 11:15 AM

Quote:

Originally Posted by Amiga-uk
So.. it makes your forum look REALLY inactive, unless you register? Which you wont, because its not even had a single post in it..

O_o;

First post edited to clarify things a bit :)

eddiec 01-08-2004 01:42 PM

thank you!!!


All times are GMT. The time now is 09:58 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.01226 seconds
  • Memory Usage 1,746KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete