News:

Wondering if this will always be free?  See why free is better.

Main Menu

Invitation-only mod?

Started by s², November 03, 2005, 07:27:07 PM

Previous topic - Next topic

((I want to give a quick shout-out to whoever helped me with my phpbb conversion problem that I posted on the temp support board.  Thank you.))

I would like to use SMF as a private web forum...where current members can generate invitation codes to give to friends and in turn these friends can register, as long as the invitation code is passed into the database and gives the 'OK' to register said friend.

Phpbb already has a mod to do this [nofollow] and I would of stuck with phpbb if it wasn't so damn un-safe.  I would hack this mod for it to work with SMF but I only know enough PHP coding to just get by.  You know...the simple stuff; just enough for me to make simple WordPress/SMF templates as well as any other very small and minor PHP things.

I see that there is a password registration mod for SMF but to me that is a bit unsafe if you want to allow the current members to invite people.  If the code/password never changes then people can just start passing around the code/password and it would defeat the purpose of the privacy of the forum.

If anyone out there is willing to help me, I would very much appreciate it.  If someone goes ahead and writes a full mod for SMF to do this, I might be so inclined to offer up something like a WordPress blog layout or header image for your blog/forum (I am desperate!).

I am also thinking of using SMF's permission system to coordinate my WordPress blog posts by putting a login session on the front-end WordPress pages and if the logged-in person checks with a certain membergroup, then they will be able to see the blog posts as well as reading the SMF cookie to automagically fill out the comment form...but more on that another time.

Anyone willing to lend a hand?


kadhumia_flo

I don't think i've come across one, although you could have a password for registering, if it helps

Kindred

no... what he wants is a one-time generated code for each time a user sends an invite. Once the code is used, it can not be used again...

I'd suggest writing some code to seed the "invite password" using the current system time, hashed...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kadhumia_flo

ahh well, it aint done, and i dont think its easy to make,,,,,

Kindred

Actually, if you take the current invite mod (the one that uses a single password to access the board), add a field to the database to track sent invitiations and then write some code in the new user registration that requires a user to enter the user who invited them (which then checks the db for the activation code that was generated at the time of the original invite...)

It's not really that HARD to do... just time-consuming.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

#6
Quote from: Kindred on November 06, 2005, 10:25:02 AM
no... what she wants is a one-time generated code for each time a user sends an invite. Once the code is used, it can not be used again...

Yes, that is exactly what I am aiming for.

QuoteI'd suggest writing some code to seed the "invite password" using the current system time, hashed...

I am looking up information on that right now.  One-time passwords would be great as well.

Quote from: Kindred on November 06, 2005, 10:31:39 AM
Actually, if you take the current invite mod (the one that uses a single password to access the board), add a field to the database to track sent invitiations and then write some code in the new user registration that requires a user to enter the user who invited them (which then checks the db for the activation code that was generated at the time of the original invite...)

It's not really that HARD to do... just time-consuming.

I have been trying to figure out how to do this and like I said, I am a php idiot when it comes to this.  I only know your basic if() else() statements and such.  I combed through the modsettings file and saw all the notes commented into it so I am really trying to just "get it".

I have all the time in the world right now to do this.  I REALLY need this coded...it's not a want, it's a need.

Any kind of direction you can push me into to get started?  Any opensource common coding that I can use and edit to do this?  I am ready and willing to learn and to work!

Okay, I found this encrypter; I think it might help with this ...but I have no idea how I could implement this.  ((I hope that when you mean "seed" you mean "encrypt"))

Here's the description of what it does:

QuoteJoe's Encrypter is an encrypter for PHP. It is not very useful by itself, but rather, it is ment to be implemented into a script. It can encrypt text using a md5 hash and the current time. The generated md5 hash is different every time because it includes the time inside it. This means the encryption is very hard to crack. This version includes a bug fix that allows you to use this script with register_globals on or off!

Here's the actual stuff:


<?php
//
// Joe's Encrypter
// Version 1.0
//
// Copyright 2003 Joe Burianek
// [email protected]
// http://www.jbcorps.com
//
// Now works with register globals off!
//
if (isset($_POST['string'])) {
$string $_POST['string'];
$time localtime();
$new_time "$time[2]$time[1]$time[0]";
$b_time base64_encode($new_time);
$to_crypt "$b_time$string";
$crypted md5($to_crypt);
$crypted "$b_time$crypted";
}
if (isset(
$_POST['check2'])) {
$check2 $_POST['check2'];
$check1 $_POST['check1'];
$old_time substr($check208);
$to_crypt "$old_time$check1";
$crypted2 md5($to_crypt);
$crypted2 "$old_time$crypted2";
if (
$check2 == $crypted2) {
$same "They are the same!";
} else {
$same "They are not the same.";
}
}
$msg "<form action='jcrypter.php' method='POST'>
<input type='text' name='string' length='30'>
<br>
<input type='submit' value='Encrypt'>
</form>
<br><br>
<form action='jcrypter.php' method='POST'>
Original String:<input type='text' name='check1' length='60'><br>
Crypted String:<input type='text' name='check2' length='60'>
<br>
<input type='submit' value='Check'>
</form>"
;
?>

<html>
<head>
<Title>Joe's Encrypter 1.1</Title>
</head>

<body>
<h3>Joe's Encrypter 1.1</h3>
<?php
echo $msg;
echo 
"
<br><br>
"
;
if (isset(
$crypted)){echo "<p>$crypted</p>";}
if (isset(
$same)){echo "<p>$same</p>";}
?>

</body>
</html>


It's a start in the right direction, I think...

DuckFat

I could really use this mod.  Has there been any progress?
-- DuckFat


Advertisement: