[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

thefish_uk
Registered User
Posts: 2
Joined: Fri Feb 27, 2004 8:17 pm

Post by thefish_uk »

bonelifer wrote: Or you could email them the passcode.


Well I don't know their e-mail addresses... and they'd be suspicious of me collecting them.

Ah well it doesn't matter, it's just too easy to fire up phpmyadmin :)
watchadoin
Registered User
Posts: 7
Joined: Sat May 28, 2005 7:55 am

Haha lol......

Post by watchadoin »

Thanks Kellanved, I did have http:// in the configuration. Ok, looking at thefish_uk's reply, I took a stab at just sending the passcode to my users. My configuration is as follows: Invitation Only=yes, Enable Visual Confirmation=yes, Enable account activation=no, I even set this to, users/admin, When I go to the register screen from mod_login, there's no field to insert a passcode, and from the forums when I hit register the same error comes up, ' Parse error: parse error, unexpected ',' in /xxxx/xxxx/xxxx/xxx/xxxxxx.com/forums/includes
/usercp_register.php on line 51 '.......

Any sugguestions?
watchadoin?
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

Ok, let's see.

Your description seems to indicate some trouble with the installation.

First question: do you use subSilver?

Second:
In your previous post, you wrote that your usercp_register looks like this:
Line 50, function show_coppa()
Line 51, {$invite_code, $email




It should be something like this:

Code: Select all

function show_coppa($invite_code, $email)
{
	global $userdata, $template, $lang, $phpbb_root_path, $phpEx;

I hope that helps.
Nocando is in Idontwanna county. No support via PM
watchadoin
Registered User
Posts: 7
Joined: Sat May 28, 2005 7:55 am

Sweet!!!

Post by watchadoin »

Ok Kellanved you're the greatest, that solved my problem. One last thing, how am I able to restrict users to only signing up by invitation? The normal mod_login still works for registration??

Thanks,
watchadoin?
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

Well, that sounds like another clash in the usercp_register. Registrations without code should be impossible.
I've uploaded a modded usercp_register, compare that to your one.
http://www.filepub.com/view.php?file=6_1117303707
Nocando is in Idontwanna county. No support via PM
watchadoin
Registered User
Posts: 7
Joined: Sat May 28, 2005 7:55 am

Got it working!

Post by watchadoin »

Ok, I went in to mambo administration and disabeled 'allow user registration', and it worked. the complete Invitation only package works just fine, thanks for all your help Kellanved!!!

-watchadoin?
TreeSprite
Registered User
Posts: 49
Joined: Mon Jun 30, 2003 9:56 pm
Contact:

Post by TreeSprite »

I didn't like that someone who clicked the register link on my board would not be informed that membership was by invitation only, so I added the following to lang_main.php:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Reg_agreement'] = ' 
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<FONT COLOR=RED><CENTER><B>ATTENTION! REGISTRATION TO THIS FORUM IS BY INVITATION ONLY!<BR />If you have not received an invitation containing an invitation code then you will not be able to register!</B></CENTER></FONT><BR /><BR /> 
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Now here's a big question: Is there a way to make it so that were I to change the configuration from "Invitation Only" to a standard registration and back again that I could have that warning text appear and disappear?

I'm really starting to feel like an expert at adding in other people's mods, and as you can see by the above code post I'm gaining an understanding of where things are and in some small part how they work inside my board, but I'm no expert at php yet. Please be kind and don't scream at me to re-read my php book, as I have read it four times and I don't quite grasp it all yet.
TreeSprite
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

Yup, that's not too difficult. You could do this by either a) defining a new template switch, or b) a simple if statement. Either way, it is a good idea not to overwrite the old language entry. I've named it "Invitation_info" in this example. Also, I would use as little HTML as possible in the lang files. :D



a)
In the php for the page you want to show the info:

Code: Select all

if (!empty($board_config['invite_only']))
	{
		$template->assign_block_vars('switch_invitation_only', array());
// should you need the negative:$template->assign_block_vars('switch_invitation_free", array());

	}  

Code: Select all

$template->assign_vars(array(
 ...
'BOARD_INVITATION_ONLY'=> $lang['Invitation_info'],
...

then assign a new template variable; the rest is a template matter.

Code: Select all

<!-- BEGIN switch_invitation_only -->

<FONT COLOR=RED><CENTER><B>ATTENTION! REGISTRATION TO THIS FORUM IS BY INVITATION ONLY!<BR />  {BOARD_INVITATION_ONLY}
</B></CENTER></FONT><BR /><BR /> 


<!-- END switch_invitation_only-->




Or b)

Code: Select all

$agreement_text = lang['Reg_agreement'];
if  (!empty($board_config['invite_only'])) 
{
    $agreement_text = lang[Invitation_info'];
}

$template->assign_vars(array(
		...
		'AGREEMENT' =>  $agreement_text ,
		"...
	);

Kell
Nocando is in Idontwanna county. No support via PM
maddude
Registered User
Posts: 96
Joined: Sat Apr 23, 2005 6:55 pm

good but problem

Post by maddude »

good mod i have had to stop using it tho cause i sent out an invite indivdually to all my mates, and all of them reported the e-mail as unwanted and i got a 24hr ban by my host for spamming unwanted e-mails, apparently even though i did not send each one to multiple recipients and didnt send more than one per person i still got done little tip tho they could just follow a referral link so the user clicks generate invite and it makes a long url for them to give the link to a mate via MSN or AIM or something and not be accused of spam altho for those who manage not to get a person accuse you of spam are lucky im using a free host who says he'll ban me if it happens again. :roll:
ycl6
Registered User
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

MOD Updated to version 1.0.7
See first post for Download Link
caseman247
Registered User
Posts: 5
Joined: Fri Jun 10, 2005 4:43 am

Great MOD but i have a hew questions

Post by caseman247 »

My host uses postgrSQL. so i could not use auto_increment in the tables. i finally figured it out by using a sequence the same way the do to count posts. everythin works fine except when i list the invites it does not show "User who used this invite" and it is not writing data to the invite_users table but i still get a list. why would that be? i dont like postgreSQL...Argg!
Thanks.
Joe Casey
Last edited by caseman247 on Fri Jun 10, 2005 4:54 am, edited 1 time in total.
caseman247
Registered User
Posts: 5
Joined: Fri Jun 10, 2005 4:43 am

BTW

Post by caseman247 »

can you more than one email address in the invite, if so what character is used to seperate the email addresses?
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

everythin works fine except when i list the invites it does not show "User who used this invite" and it is not writing data to the invite_users table but i still get a list. why would that be? i dont like postgreSQL...Argg!

Excellent question. I have little experience with Postgres. However, the invite_users table only responsibility is the "users who used this invite" column.
Is the "uses" number decremented correctly? Because it sounds a little like the database update part doesn't get executed for some reason.

an you more than one email address in the invite, if so what character is used to seperate the email addresses?


',' or ';'
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 »

Excellent question. I have little experience with Postgres. However, the invite_users table only responsibility is the "users who used this invite" column.
Is the "uses" number decremented correctly? Because it sounds a little like the database update part doesn't get executed for some reason.


No the uses number does not decrement correctly. i have to look at the mod again maybe i need to do something else different for postgreSQL. any thoughts?
User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Post by Kellanved »

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)
Nocando is in Idontwanna county. No support via PM
Post Reply

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