Connecting Tech Pros Worldwide Help | Site Map

Blocking out new membership?

nomad's Avatar
Expert
 
Join Date: Mar 2007
Location: CA.
Posts: 570
#1: Mar 26 '08
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
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#2: Mar 26 '08

re: Blocking out new membership?


Cant you just remove the code that inserts new users into the database?
nomad's Avatar
Expert
 
Join Date: Mar 2007
Location: CA.
Posts: 570
#3: Mar 26 '08

re: Blocking out new membership?


Quote:

Originally Posted by markusn00b

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
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#4: Mar 26 '08

re: Blocking out new membership?


Quote:

Originally Posted by nomad

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.
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 913
#5: Mar 26 '08

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 ;)
nomad's Avatar
Expert
 
Join Date: Mar 2007
Location: CA.
Posts: 570
#6: Mar 27 '08

re: Blocking out new membership?


Quote:

Originally Posted by TheServant

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
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 913
#7: Mar 27 '08

re: Blocking out new membership?


Quote:

Originally Posted by nomad

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?
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#8: Mar 27 '08

re: Blocking out new membership?


Quote:

Originally Posted by TheServant

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.
Newbie
 
Join Date: Mar 2008
Posts: 1
#9: Mar 27 '08

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.
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#10: Mar 27 '08

re: Blocking out new membership?


Quote:

Originally Posted by crazymusic

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:

Originally Posted by markusn00b

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
Member
 
Join Date: Mar 2008
Posts: 90
#11: Mar 27 '08

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.
nomad's Avatar
Expert
 
Join Date: Mar 2007
Location: CA.
Posts: 570
#12: Mar 28 '08

re: Blocking out new membership?


Quote:

Originally Posted by arggg

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.

[PHP]
// 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));
?>
[/PHP]

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
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 913
#13: Mar 30 '08

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.
Member
 
Join Date: Mar 2008
Posts: 90
#14: Apr 1 '08

re: Blocking out new membership?


Quote:

Originally Posted by TheServant

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
Expand|Select|Wrap|Line Numbers
  1. 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.
nomad's Avatar
Expert
 
Join Date: Mar 2007
Location: CA.
Posts: 570
#15: Apr 2 '08

re: Blocking out new membership?


Quote:

Originally Posted by arggg

I would comment out the actual

Expand|Select|Wrap|Line Numbers
  1. 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
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#16: Apr 2 '08

re: Blocking out new membership?


No probs!

Good luck dude!
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 913
#17: Apr 2 '08

re: Blocking out new membership?


Quote:

Originally Posted by nomad

thanks everyone for help

nomad

How did you do it? If you don't mind me asking ;)
Reply