Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Limit guests to viewing 5 threads max. Details »»
Limit guests to viewing 5 threads max.
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-31-2002 Last Update: Never Installs: 7
 
No support by the author.

This hack allows a guest to view 5 threads within the forums. After the 5th
thread, the hack will bring up the error_nopermission_loggedout template
to force them to register with the board.

This hack was requested by frozt and jjj0923.

Templates affected: 0
Files affected: showthread.php and admin/sessions.php
Tables affected: session

How to install this hack:

You need to alter the session table using the following command:

alter table session add visitcount smallint(5) unsigned DEFAULT 0;

The rest of the instructions are in the attached file.

Your comments will be greatly appreciated.

Show Your Support

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

Comments
  #12  
Old 04-02-2002, 05:51 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will be able 5 threads every 15 minutes, or whatever the admin set the cookie timeout for.
Reply With Quote
  #13  
Old 04-02-2002, 05:57 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Membership has its privileges.
Reply With Quote
  #14  
Old 08-27-2002, 01:03 AM
kevinsdh kevinsdh is offline
 
Join Date: Jan 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get parsing errors in "session" when trying to run this on 2.2.6 Please give me a hand to get it right. This is a great hack and I reaaaaallllllllllllyyyyyyy need it! session table altered (visitcount added) and code in both php scripts changed and verified.

Thanks!!!!!!
Reply With Quote
  #15  
Old 08-27-2002, 01:14 AM
Matt87 Matt87 is offline
 
Join Date: Mar 2002
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wouldn't it be better to go to a template that says: "You cannot view any more than 5 threads"?
Reply With Quote
  #16  
Old 08-27-2002, 05:53 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Matt87
Wouldn't it be better to go to a template that says: "You cannot view any more than 5 threads"?
Yes it would. But I have a few different template sets, and blame this on my laziness, but I used what was already available.
Reply With Quote
  #17  
Old 08-27-2002, 05:54 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by kevinsdh
I get parsing errors in "session" when trying to run this on 2.2.6 Please give me a hand to get it right. This is a great hack and I reaaaaallllllllllllyyyyyyy need it! session table altered (visitcount added) and code in both php scripts changed and verified.

Thanks!!!!!!
Please Email me a copy of your sessions.php.

My Email is edwink@seebeyond.com
Reply With Quote
  #18  
Old 09-01-2002, 08:36 PM
SgtSling SgtSling is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can this be altered to come up with a different template thanerror_nopermission_loggedout template ?

I want to specify a different template..
Reply With Quote
  #19  
Old 02-18-2003, 11:34 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought this was a wonderful idea, and installed it. Then I remembered the googlebot and uninstalled it. I think I need to come back some time when I have a few brain cells working and see if I can't code it so that google and other bots that I like can stay and crawl.

Amy
Reply With Quote
  #20  
Old 04-15-2003, 07:22 AM
Cluster One Cluster One is offline
 
Join Date: Sep 2002
Location: Tulsa, Oklahoma
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to change the value from say 5 to 10 or 15?
Reply With Quote
  #21  
Old 04-15-2003, 07:32 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look for all instances of the following code. There are 2 of them:

Code:
if($session[visitcount] > 5)
And replace the number 5 with any number you want.
Reply With Quote
Reply

Thread Tools

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 12:38 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.04434 seconds
  • Memory Usage 2,294KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_code
  • (2)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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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