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)

dontpanic 03-02-2004 04:14 PM

Quote:

Originally Posted by Gary W
PHP Code:

if ($bbuserinfo['userid'] == and $forumid != X

    
print_no_permission(); 


Replace X with the guest forum ID :)

OK, this works like a champ...so let's make it even more complex. :)

How about configuring multiple forums that a user CAN view as a guest? Is there a simpler way than writing a statement for each forum? I tried the code below with no luck.
PHP Code:

if ($bbuserinfo['userid'] == and ($forumid != 102 or $forumid != 103)) 

I'd ideally like to prevent guests and awaiting email confirmation from seeing all but a few select forums.

Gary King 03-03-2004 07:02 PM

Quote:

Originally Posted by dontpanic
OK, this works like a champ...so let's make it even more complex. :)

How about configuring multiple forums that a user CAN view as a guest? Is there a simpler way than writing a statement for each forum? I tried the code below with no luck.
PHP Code:

if ($bbuserinfo['userid'] == and ($forumid != 102 or $forumid != 103)) 

I'd ideally like to prevent guests and awaiting email confirmation from seeing all but a few select forums.

Replace
PHP Code:

$forumid != 102 or $forumid != 103 

with
PHP Code:

$forumid != 102 and $forumid != 103 


dontpanic 03-04-2004 06:15 PM

Great, thanks! :)

Gary King 03-05-2004 11:15 AM

Glad I could help :D

zennifer 03-09-2004 01:55 PM

I have installed this and it is working great for us. I have one question though is there any way to get the thread title to appear in the title or in the actual text of the error page? The thread/forum/post ID# is in the url. I have tried a couple of things with out any success.

Skaterscafe.com 03-16-2004 03:14 AM

Great hack! My question is this, I have about 3 forums with a few selected sub-forums I want to allow. How do I deperate them?

I tried the above and can only get one or two to work.

alkahf 03-16-2004 07:51 AM

Thank you for this good hack, but....
Very important:

Open template:threadbit and find:
PHP Code:

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

Replace with:
PHP Code:

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

save edit.

Notice: Make this change with all your styles.

Best regards

contramontanum 03-16-2004 01:24 PM

God bless all the makers of "fancy" hacks (I've installed a few myself ;)), but this one is really useful. Thanks!

Gary King 03-16-2004 02:17 PM

Quote:

Originally Posted by alkahf
Thank you for this good hack, but....
Very important:

Open template:threadbit and find:
PHP Code:

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

Replace with:
PHP Code:

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

save edit.

Notice: Make this change with all your styles.

Best regards

Thanks, added that :)

hasan2k 03-18-2004 08:56 PM

Quote:

Originally Posted by Gary W
Thanks, added that :)

I have one concern about the hack. With this hack implemented, will google media bot and adsense bot be able to spider...I have adsense in my forums and also would like my pages cached in the google.

Please respond.


All times are GMT. The time now is 11:57 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.01468 seconds
  • Memory Usage 1,761KB
  • 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
  • (9)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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