[2.0.19] Invitation Only

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply

Rating:

Excellent!
48
63%
Very Good
19
25%
Good
6
8%
Fair
1
1%
Poor
2
3%
 
Total votes: 76

caseman247
Registered User
Posts: 5
Joined: Fri Jun 10, 2005 4:43 am

Post by caseman247 »

Kellanved wrote: Hmm. Let's check another thing first.

Check if an invalid code causes the registration to fail (as it should). If so, then the problem is almost certainly in the addition after this block in usercp_register:

Code: Select all

	$emailer->reset();
				}
				$db->sql_freeresult($result);
			}

Double check that the code got added after the first closing brace behind "$db->sql_freeresult($result);" .

That's just because it sounds to me like the code doesn't get executed at all; but as I've mentioned before: I don't know much about Postgres and the troubles to expect with it. (The mod uses the dbal, though)


It was entered after the second bracket, it look like what i saw in your when i printed it out. i put the code after the first closed bracket and still same result though.
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

Well, it might be another issue in the user_cp register. This sounds a lot like some mod/version conflict. Have you tried using easymod?
Nocando is in Idontwanna county. No support via PM
caseman247
Registered User
Posts: 5
Joined: Fri Jun 10, 2005 4:43 am

Post by caseman247 »

Kellanved wrote: Well, it might be another issue in the user_cp register. This sounds a lot like some mod/version conflict. Have you tried using easymod?


I redid all my file edits and it looks like everything is working the way it should. sorry for the bother. in case anyone asks here is the SQL code i had to create for postgreSQL

Code: Select all

CREATE SEQUENCE phpbb_invitation_users_id_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 1
  CACHE 1;

and the invitiations table had be done like this

ALTER TABLE phpbb_invitations ADD COLUMN invitation_id int8;
ALTER TABLE phpbb_invitations ALTER COLUMN invitation_id SET STORAGE PLAIN;
ALTER TABLE phpbb_invitations ALTER COLUMN invitation_id SET NOT NULL;
ALTER TABLE phpbb_invitations ALTER COLUMN invitation_id SET DEFAULT nextval('phpbb_invitations_invitation_id_seq'::text);

Thanks for all your help.

GREAT MOD or did i already say that
:)
periwinker
Registered User
Posts: 3
Joined: Tue Jun 14, 2005 5:02 pm

Post by periwinker »

Kellanved wrote: ...Registrations without code should be impossible...

How hard would it be to change the code to allow registrations without a code? These people could then at least access public sections. Those who DID have an invitation could be automatically added to a certain group, giving them access to different private sections, depending on their invitation code and your permissions. This seems like it would address buntyindia's earlier concern, as well.

Great MOD.
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

That should be pretty easy. I don't have the time to test it properly right now, but I'd say replaceing this part in usercp_register:

Code: Select all

if (empty($invitation_code))
		{
			$error = TRUE;
			$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invitation_code_invalid'];
		}


with this:

Code: Select all

if (empty($invitation_code))
		{
			//$error = TRUE;
			//$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invitation_code_invalid'];
		}

Should do the trick.
Nocando is in Idontwanna county. No support via PM
periwinker
Registered User
Posts: 3
Joined: Tue Jun 14, 2005 5:02 pm

Post by periwinker »

that seemed to do the trick... thanks! i suppose you would know where i could remove that asterisk (indicating a required field) next to "Invitation Code:" on the registration form...?
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

NP. Incidentally, I do know how to remove that one ;-) .
It's this asterix in templates/subSilver/profile_add_body.tpl :

<td class="row1"><span class="gen">{L_INVITATION}: * </span><br />
Nocando is in Idontwanna county. No support via PM
periwinker
Registered User
Posts: 3
Joined: Tue Jun 14, 2005 5:02 pm

Post by periwinker »

perfect! just what i've been looking for! thanks again...
intrim
Registered User
Posts: 4
Joined: Mon Jul 07, 2003 6:34 am

Post by intrim »

Thanks for this mod..it fits my needs perfectly apart from one thing....for some reason it isn't auto adding users to the specified group relating to a given code. I've read in earlier posts that a couple of people are experiencing the same problem. Just wondering if anyone has found the route of the problem and created a fix for it. Everything else regarding the mod is working perfect. I'm using phpbb 2.0.15.
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

Well, it does auto-add people as it should ( at least it does for me). However, it does not activate the group-membership, but justs sends an email to the group moderator.
That's the intended behavior; a future version will probably come with an option to change that, but at the moment I can't say when that'll be.

So, check if the new users are listed as pending group members and if so:


You can change the global setting by replacing

Code: Select all

$invite_group_sql = "INSERT INTO " . USER_GROUP_TABLE . 
								"(user_id, group_id, user_pending)
								VALUES ('".intval($user_id) ."', '". intval($invite_data['invitation_group'])."', '1')";	
with

Code: Select all

$invite_group_sql = "INSERT INTO " . USER_GROUP_TABLE . 
								"(user_id, group_id, user_pending)
								VALUES ('".intval($user_id) ."', '". intval($invite_data['invitation_group'])."', '0')";
in the modded usercp_register.

Also you might want to comment out the email part a few lines further down.
Nocando is in Idontwanna county. No support via PM
intrim
Registered User
Posts: 4
Joined: Mon Jul 07, 2003 6:34 am

Post by intrim »

Kellanved wrote: Well, it does auto-add people as it should ( at least it does for me). However, it does not activate the group-membership, but justs sends an email to the group moderator.
That's the intended behavior; a future version will probably come with an option to change that, but at the moment I can't say when that'll be.

So, check if the new users are listed as pending group members and if so:


You can change the global setting by replacing

Code: Select all

$invite_group_sql = "INSERT INTO " . USER_GROUP_TABLE . 
								"(user_id, group_id, user_pending)
								VALUES ('".intval($user_id) ."', '". intval($invite_data['invitation_group'])."', '1')";	
with

Code: Select all

$invite_group_sql = "INSERT INTO " . USER_GROUP_TABLE . 
								"(user_id, group_id, user_pending)
								VALUES ('".intval($user_id) ."', '". intval($invite_data['invitation_group'])."', '0')";
in the modded usercp_register.

Also you might want to comment out the email part a few lines further down.


Thanks for your reply Kellanved. As you rightly say the mod does add the user to a group as pending, me not fully looking at things sorry. The ammendment you posted though works a treat and just as I need. Thankyou very much for your time.
LordLegendz
Registered User
Posts: 7
Joined: Thu Jun 16, 2005 8:17 am

Post by LordLegendz »

Kellanved wrote: Well, the mod includes only the templates for subsilver.

To use it with other skins, you need to edit the respective files( board_config_body.tpl and profile_add_body.tpl) and add invite_add_body.tpl and invites_list_body.tpl to the admin folder.

What fields do you need to edit?
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

LordLegendz wrote: What fields do you need to edit?


Just repeat all the "subsilver" steps in the .mod file for all your installed templates.

Basically it means to add thse two new files to the other template folders as well:
templates/subSilver/admin/invites_list_body.tpl
templates/subSilver/admin/invite_add_body.tpl

and adapting the edits (in the .mod) for those :

templates/subSilver/profile_add_body.tpl
templates/subSilver/admin/board_config_body.tpl
Nocando is in Idontwanna county. No support via PM
Her Gorgeousness
Registered User
Posts: 22
Joined: Thu Jun 16, 2005 5:04 am

Post by Her Gorgeousness »

i have installed the Invitations Only mod, everything worked well up to the point where the user gets the email & they click on the link in order to register, they get redirected to a blank page.

I don't use subSilver, but i have run a Find/Replace the string 'subsilver' to my template name in each & every single file.

I have the invitations link in my Admin CP, & email works fine.. it's just that tiny little thing to do with the registration page -- any idea what's going on?

my forums are here, & the registration page is here
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

It looks like something went wrong during the installation, most likely in the usercp_register.php .

8)
Nocando is in Idontwanna county. No support via PM
Post Reply

Return to “[2.0.x] MOD Database Releases”