Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 07-30-2003, 07:55 PM
Heffe2000 Heffe2000 is offline
 
Join Date: Nov 2001
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Forum access by member registration date?

Is there a hack out there that will, after a user has been registered on the forum allow them to see a specific forum?

What I'm wanting is, say, 3 months after they have been registered, they have access to a specific forum. This was requested by a clan on our server as a way to 'reward' long term users. They also requested that they could bypass the registration date for people they want to give immediate access to the forum.
Reply With Quote
  #2  
Old 07-31-2003, 09:51 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is not easy to change the forum behaviour because it is not only forumlisting page that you can access a forum. It appears in searching page, user cp etc. so it would normally require a lot of hacking.

However you can apply this clever trick:
Create 2 new usergroups other than "registered" (usergroup 2).
Set permission so that first new usergroup can not access to this forum and the second new usergroup can access this forum.

Then add this line to your forum/global.php: (say at the end before ?>)

PHP Code:
if ($bbuserinfo['usergroupid']==AND $bbuserinfo['joindate']>strtotime("-3 months") )
{
 
$DB_site->query("UPDATE user SET usergroupid=X WHERE userid=$bbuserinfo[userid]");

Replace X with the new usergroupid that can access the forum.

This hack will make sure registered users usergroup will automatically change to X when they are 3 months old. If you don't want this for specific users, put them in your other new usergroup. If you want to grant immediate access for certain users, change their usergroup to X in your admin CP.

Hack is not tested, use at your own risk.

Enjoy.
Reply With Quote
  #3  
Old 08-01-2003, 08:06 AM
Royal's Avatar
Royal Royal is offline
 
Join Date: Jan 2002
Location: Netherlands
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so this hack changes the usersgroups ?
hmmm .. i guess that wont work on my site, cause some functions on my site (not forum) are using the registerd usergroup id
Reply With Quote
  #4  
Old 08-09-2003, 12:38 AM
Heffe2000 Heffe2000 is offline
 
Join Date: Nov 2001
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, it won't work for mine either. I was hoping for something that could be set that woudln't adjust the members group, just something that would allow access or deny access by date.
Reply With Quote
  #5  
Old 08-09-2003, 08:27 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your call. But if you ask a good advice I say stick with this one. It is very simple, clean and effective and does exactly what you want in the end.

Your request (if coded) will be very awkard, buggy and hard to implement. As I mentioned before, it is not forum listing page you will be hacking only. Permission system applies to many sections in your board and if you plan to change its structure, you have to hack all these sections and in the end you may wind up with a buggy structure.

My 2 cents. :glasses:
Reply With Quote
  #6  
Old 08-09-2003, 11:17 PM
Heffe2000 Heffe2000 is offline
 
Join Date: Nov 2001
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We decided to go a different route, and just used access flags. Currently I have one of my supermods doing it on a weekly basis.
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:08 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.03607 seconds
  • Memory Usage 2,204KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete