Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Disallow guests to view threads, must register first Details »»
Disallow guests to view threads, must register first
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-06-2004 Last Update: Never Installs: 89
 
No support by the author.

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

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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 03-02-2004, 04:14 PM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #63  
Old 03-03-2004, 07:02 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 
Reply With Quote
  #64  
Old 03-04-2004, 06:15 PM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, thanks!
Reply With Quote
  #65  
Old 03-05-2004, 11:15 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad I could help
Reply With Quote
  #66  
Old 03-09-2004, 01:55 PM
zennifer zennifer is offline
 
Join Date: Jan 2004
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #67  
Old 03-16-2004, 03:14 AM
Skaterscafe.com Skaterscafe.com is offline
 
Join Date: Mar 2004
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #68  
Old 03-16-2004, 07:51 AM
alkahf alkahf is offline
 
Join Date: Mar 2004
Location: Moscow
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #69  
Old 03-16-2004, 01:24 PM
contramontanum contramontanum is offline
 
Join Date: Feb 2004
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

God bless all the makers of "fancy" hacks (I've installed a few myself ), but this one is really useful. Thanks!
Reply With Quote
  #70  
Old 03-16-2004, 02:17 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #71  
Old 03-18-2004, 08:56 PM
hasan2k hasan2k is offline
 
Join Date: Jan 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #72  
Old 03-19-2004, 12:26 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hasan2k
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.
Google can still browse the archive pages, which is what they normally browse anyhow.
Reply With Quote
  #73  
Old 03-19-2004, 01:00 PM
Symbian.info Symbian.info is offline
 
Join Date: Nov 2001
Location: Netherlands
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W
Google can still browse the archive pages, which is what they normally browse anyhow.
Great script! Just what the doctor orderd!!
Reply With Quote
  #74  
Old 03-19-2004, 11:11 PM
hasan2k hasan2k is offline
 
Join Date: Jan 2004
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W
Google can still browse the archive pages, which is what they normally browse anyhow.
Well the my forum pages that are cached in google are not from the archive pages, they are from the main forums pages. So please address the issue regarding that.
Reply With Quote
  #75  
Old 03-21-2004, 01:32 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hasan2k
Well the my forum pages that are cached in google are not from the archive pages, they are from the main forums pages. So please address the issue regarding that.
Problem solved, check new instructions (The part where you have to add new code)
Reply With Quote
  #76  
Old 03-22-2004, 02:03 AM
bluecat's Avatar
bluecat bluecat is offline
 
Join Date: Apr 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know if vb changed this in Gold (so I don't have to add this)?
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 01:53 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.05342 seconds
  • Memory Usage 2,395KB
  • Queries Executed 30 (?)
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
  • (15)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete