vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Forum access by member registration date? (https://vborg.vbsupport.ru/showthread.php?t=55742)

Heffe2000 07-30-2003 07:55 PM

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.

Logician 07-31-2003 09:51 AM

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.

Royal 08-01-2003 08:06 AM

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

Heffe2000 08-09-2003 12:38 AM

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.

Logician 08-09-2003 08:27 AM

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:

Heffe2000 08-09-2003 11:17 PM

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.


All times are GMT. The time now is 12:34 AM.

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.00961 seconds
  • Memory Usage 1,722KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete