Page 5 of 33

Posted: Sat May 28, 2005 12:00 pm
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 :)

Haha lol......

Posted: Sat May 28, 2005 3:32 pm
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?

Posted: Sat May 28, 2005 3:40 pm
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.

Sweet!!!

Posted: Sat May 28, 2005 4:25 pm
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?

Posted: Sat May 28, 2005 6:09 pm
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

Got it working!

Posted: Sat May 28, 2005 10:53 pm
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?

Posted: Sun May 29, 2005 4:06 am
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.

Posted: Sun May 29, 2005 8:21 am
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

good but problem

Posted: Sun May 29, 2005 10:12 am
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:

Posted: Mon May 30, 2005 3:59 pm
by ycl6
MOD Updated to version 1.0.7
See first post for Download Link

Great MOD but i have a hew questions

Posted: Fri Jun 10, 2005 4:47 am
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

BTW

Posted: Fri Jun 10, 2005 4:54 am
by caseman247
can you more than one email address in the invite, if so what character is used to seperate the email addresses?

Posted: Fri Jun 10, 2005 8:26 am
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 ';'

Posted: Fri Jun 10, 2005 9:10 pm
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?

Posted: Fri Jun 10, 2005 9:23 pm
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)