Blocking out new membership?
Question posted by: nomad
( Expert)
on
March 26th, 2008 02:36 PM
Hello everyone:
I have a forum in which we have 100 members and we wish to block out any new memberships. I was thinking of write a query that would block out any new memberships and I need a little help doing this.
this is what i have
the table is phpbb_users
the field name is user_id note this use id is made automatically
Should this be a sql or a php.
Would also need to change this if there is a new member that we approve.
thanks
nomad
|
|
March 26th, 2008 03:37 PM
# 2
|
Re: Blocking out new membership?
Cant you just remove the code that inserts new users into the database?
|
|
March 26th, 2008 05:14 PM
# 3
|
Re: Blocking out new membership?
Quote:
Cant you just remove the code that inserts new users into the database?
|
Never thought of that, but it might effect the db.
There is a premade hack that I can use. I just thought my ideal would be better.
nomad
|
|
March 26th, 2008 06:55 PM
# 4
|
Re: Blocking out new membership?
Quote:
Never thought of that, but it might effect the db.
There is a premade hack that I can use. I just thought my ideal would be better.
nomad
|
I don't understand how it would affect the DB - all you need to do is remove what the end-user would use to sign up, and that is the PHP code used for the sign up.
Good luck!
Regards.
|
|
March 26th, 2008 10:40 PM
# 5
|
Re: Blocking out new membership?
Are the forums your design and code? If they are some sort of package like phpbb or something, you could just require email and admin confirmation and then just ignore/reject those who apply for memebership. No hacks ;)
|
|
March 27th, 2008 05:00 AM
# 6
|
Re: Blocking out new membership?
Quote:
Are the forums your design and code? If they are some sort of package like phpbb or something, you could just require email and admin confirmation and then just ignore/reject those who apply for memebership. No hacks ;)
|
Hello TheServant:
Yes the site is phpbb. Really can not ignore them and I do have the admin confirmation. The reason I want the block is because of all the porn sites. When a user signs up their membership name is shown along with a website if they chose to add one.
I'm going to try to make a query to block the id number to only 101. or use a hack.
nomad
|
|
March 27th, 2008 05:50 AM
# 7
|
Re: Blocking out new membership?
Quote:
Hello TheServant:
Yes the site is phpbb. Really can not ignore them and I do have the admin confirmation. The reason I want the block is because of all the porn sites. When a user signs up their membership name is shown along with a website if they chose to add one.
I'm going to try to make a query to block the id number to only 101. or use a hack.
nomad
|
Fair enough. Can you not filter them or something? I just feel that if you're limiting your member number at 100, the forums won't be all that active? What about if some one leaves? Will they give thir account to someone? Or will you prune inactive members often?
|
|
March 27th, 2008 12:41 PM
# 8
|
Re: Blocking out new membership?
Quote:
Fair enough. Can you not filter them or something? I just feel that if you're limiting your member number at 100, the forums won't be all that active? What about if some one leaves? Will they give thir account to someone? Or will you prune inactive members often?
|
To prevent spam, surely you could implement a mathmatical question for the user to answer, or have them confirm an email address OR EVEN use those awful captcha's!
Regards.
|
|
March 27th, 2008 06:47 PM
# 9
|
Re: Blocking out new membership?
Uhh, I have one suggestion.
Why don't you just remove the sign-up link? Then put it back when you need it. To me that seems to be the easiest way to take care of it if you don't want anyone new signing up.
|
|
March 27th, 2008 06:59 PM
# 10
|
Re: Blocking out new membership?
Quote:
Uhh, I have one suggestion.
Why don't you just remove the sign-up link? Then put it back when you need it. To me that seems to be the easiest way to take care of it if you don't want anyone new signing up.
|
That has already been suggested
Quote:
Cant you just remove the code that inserts new users into the database?
I don't understand how it would affect the DB - all you need to do is remove what the end-user would use to sign up, and that is the PHP code used for the sign up.
|
Ronald
|
|
March 27th, 2008 10:22 PM
# 11
|
Re: Blocking out new membership?
There are plugins for phpbb that require an image code on registration. This will prevent spambots from creating accounts with spam site links in them. Or you can add names of sites to the bad words list which will block them out.
|
|
March 28th, 2008 05:57 PM
# 12
|
Re: Blocking out new membership?
Quote:
There are plugins for phpbb that require an image code on registration. This will prevent spambots from creating accounts with spam site links in them. Or you can add names of sites to the bad words list which will block them out.
|
OK I going to use this ideal.
here is the code that I found on this page line 18 contains the path to the Registration. (should have usercp_register )
How do I omit that section. Can I use Comments (//) to omit it.
-
-
// Start of program proper
-
//
-
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
-
{
-
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
-
$mode = htmlspecialchars($mode);
-
if ( $mode == 'viewprofile' )
-
{
-
include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
-
exit;
-
}
-
else if ( $mode == 'editprofile' || $mode == 'register' )
-
{
-
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
-
{
-
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
-
}
-
include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
-
exit;
-
}
-
else if ( $mode == 'confirm' )
-
{
-
// Visual Confirmation
-
if ( $userdata['session_logged_in'] )
-
{
-
exit;
-
}
-
include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
-
exit;
-
}
-
else if ( $mode == 'sendpassword' )
-
{
-
include($phpbb_root_path . 'includes/usercp_sendpasswd.'.$phpEx);
-
exit;
-
}
-
else if ( $mode == 'activate' )
-
{
-
include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
-
exit;
-
}
-
else if ( $mode == 'email' )
-
{
-
include($phpbb_root_path . 'includes/usercp_email.'.$phpEx);
-
exit;
-
}
-
}
-
redirect(append_sid("index.$phpEx", true));
-
?>
thanks, sorry for being a pain in the butt, but I don't want to mess up the team forum site and get picked on...
nomad
PS I think there is another page the use the usercp_register
Last edited by nomad : March 28th, 2008 at 06:00 PM.
Reason: Add more detail
|
|
March 30th, 2008 10:23 PM
# 13
|
Re: Blocking out new membership?
Yes, you can, or /* and */ if you want to do multiple lines. The problem is, something will require that included file, so if ity can't find it, it will chuck out an error. Find out what calls that file, or variables in that file and see if you can track it so you don't get errors. Alternatively, just comment it out, see what happens, and deal with errors as you get them.
|
|
April 1st, 2008 08:25 PM
# 14
|
Re: Blocking out new membership?
Quote:
Yes, you can, or /* and */ if you want to do multiple lines. The problem is, something will require that included file, so if ity can't find it, it will chuck out an error. Find out what calls that file, or variables in that file and see if you can track it so you don't get errors. Alternatively, just comment it out, see what happens, and deal with errors as you get them.
|
I would comment out the actual
- include('path/to/include');
in the files that are calling the registration page tha way any files such as the profile edit or anything that does call it like Servant said will not get an error.
|
|
April 2nd, 2008 03:09 PM
# 15
|
Re: Blocking out new membership?
Quote:
I would comment out the actual
- include('path/to/include');
in the files that are calling the registration page tha way any files such as the profile edit or anything that does call it like Servant said will not get an error.
|
thanks everyone for help
nomad
|
|
April 2nd, 2008 05:44 PM
# 16
|
Re: Blocking out new membership?
No probs!
Good luck dude!
|
|
April 2nd, 2008 09:56 PM
# 17
|
Re: Blocking out new membership?
Quote:
thanks everyone for help
nomad
|
How did you do it? If you don't mind me asking ;)
Not the answer you were looking for? Post your question . . .
189,285 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).
|
|
|
Latest Articles: Read & Comment
Top PHP Forum Contributors
|