The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
[high]THIS HACK WILL NOT WORK IN VB 2.2.0 AND UP! DO NOT ATTEMPT TO INSTALL IT!
Go to https://vborg.vbsupport.ru/showthrea...threadid=33068 for the appropriate hack[/high] This is something I've wanted to do for a long time, and since someone mentioned it in the Suggestions forum, I figured I'd write the hack Purpose: When a new user regsiters, he is e-mailed a password generated randomly. He will not be able to log in until he receives this e-mail and uses that password. (the same happens if an existing user changes his e-mail address). After installing this hack, you will have three options essentially: 1) Don't verify the e-mail is valid. In this case the user selects his own password and nothing is sent to him. 2) Verify the e-mail is valid by sending an activation code This is how vBulletin works now: a user selects his own password during registration, and the BB Mailer sends him an activation code / link that he needs to use before he's able to post 3) Verify the e-mail is valid by sending a random password In this case the user DOES NOT select a password but instead he receives a randomly generated password by e-mail. He will not be able to log in / post until he receives and uses this password. The installation includes: 1) Running a script that updates your database (adds an option "Send New Users Random Password?" with default "NO" -- to preserve your currect state). 2) Editing three scripts (register.php, member.php, admin/functions.php) 3) Editing two templates (registeradult, registercoppa) and adding three new templates (small ones). If you have questions, I'm here Cheers, Bira Show Your Support
|
Comments |
#22
|
|||
|
|||
bira
Thank you very very much It was a dream to have this hack I have RC1 and it is working wounderfull |
#23
|
||||
|
||||
Glad to have helped, Remi
|
#24
|
|||
|
|||
This is an awesome hack as I just tested it out on my forums, but it breaks Tubedogg's automatic welcome message upon registration hack.
|
#25
|
||||
|
||||
RobAC, if you give me the URL to that hack, I'll check where they collide and how you can use them together.
|
#26
|
|||
|
|||
|
#27
|
||||
|
||||
RobRAC,
I checked tubedogg's hack and there's no reason the two hacks should collide, provided you insert the code right. Here's what you need to make sure: If you already hacked the file register.php then the end result should be like this. Find (in the ORIGINAL file): Code:
if ($verifyemail) { $getjoindate=$DB_site->query_first("SELECT joindate FROM user WHERE userid='$userid'"); $activateid=$getjoindate[joindate]; eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";"); eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";"); mail ($email,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>"); } Code:
if ($verifyemail) { if ($randpassword=="0") { $getjoindate=$DB_site->query_first("SELECT joindate FROM user WHERE userid='$userid'"); $activateid=$getjoindate[joindate]; eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";"); eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";"); } else { eval("\$message = \"".gettemplate("email_lostpw",1,0)."\";"); eval("\$subject = \"".gettemplate("emailsubject_lostpw",1,0)."\";"); } mail ($email,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>"); } // send a welcome email using email_welcome and emailsubject_welcome templates, but don't // send it now if they need to activate their account if ($welcomeuser) { eval("\$message = \"".gettemplate("email_welcome",1,0)."\";"); eval("\$subject = \"".gettemplate("emailsubject_welcome",1,0)."\";"); mail($newuseremail,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>"); } // end send mail By the way, out of curiosity: if you are using email verification, be it with activation code or with random password, why on earth do you need a separate Welcome E-mail? Simply add your welcome message and whatever text you want to the already existing e-mail templates that are sent to the new users. |
#28
|
|||
|
|||
Bira,
I'll double check this....actually, you've made a good point here. Thanks. |
#29
|
|||
|
|||
Bira,
Instead of using the email_lostpw template, how can I use a different email template? I want to add in the welcome message to this template, but don't want to make that kind of addition to the lostpw template. |
#30
|
||||
|
||||
Rob, create a new template (eg: email_newpw) and in my hack, wherever it mentions email_lostpw change it to your new template's name.
p.s. But make sure that the variables from email_lostpw (the variables for the username and password at least!) also appear in your new template. |
#31
|
||||
|
||||
Actually, Rob, there is only one place you need to replace email_lostpw with your new template's name, and that is in register.php.
In my hack instructions it says: Code:
Find: $getjoindate=$DB_site->query_first("SELECT joindate FROM user WHERE userid='$userid'"); $activateid=$getjoindate[joindate]; eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";"); eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";"); REPLACE it with: if ($randpassword=="0") { $getjoindate=$DB_site->query_first("SELECT joindate FROM user WHERE userid='$userid'"); $activateid=$getjoindate[joindate]; eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";"); eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";"); } else { eval("\$message = \"".gettemplate("email_lostpw",1,0)."\";"); eval("\$subject = \"".gettemplate("emailsubject_lostpw",1,0)."\";"); } So, to sum this up: 1) Create two new template, say email_newpw and emailsubject_newpw. These two templates should resemble in content the lostpw templates, only with your Welcome text. 2) Add my hack EXACTLY like the instructions says, but before you upload the hacked files run a SEARCH/REPLACE in register.php for _lostpw and replace it with _newpw. That's it. Am I making any sense? Sorry, I'm tired |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|