View Full Version : [release] Tiny hack: Custom nopermission message to unactivated users
Mas*Mind
Fri 25th May '01, 8:22pm
Description: This hack prints a custom message to users that want to take an action they can't because they didn't activated their account yet. This probably saves you alot of emails from users who didn't properly read their activation-email asking you why they can't post while they did register.
VB-Version: Probably every version, certainly every 2.0 version
Instructions:
open (and backup first) admin/functions.php
Do a search for ###################### Start show_nopermission #######################
replace
if ($bbuserinfo[userid]==0) {
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
} else {
eval("standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
}
exit;
with
if ($bbuserinfo[userid]==0) {
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
} else {
if($bbuserinfo[usergroupid] == 3) {
eval("standarderror(\"".gettemplate("error_nopermission_awaiting_moderation")."\");");
}
else {
eval("standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
}
}
exit;
create a new template called error_nopermission_awaiting_moderation
add the following content in it:
You have recently registered at $bbtitle but not yet activated your account. You can find the link to activate your account in your welcome-email.
<p align="center">
<table border="0" bgcolor="#555576" cellpadding="4" cellspacing="1" align="center">
$logincode
</table>
</p>
<p><smallfont>If you didn't received the activation-email <a href="register.php?s=$session[sessionhash]&action=requestemail">click here</a> to resend it. <a href="member.php?s=$session[sessionhash]&action=lostpw">Forgotten your password?</a></smallfont>
save and upload admin/functions.php
enjoy :)
eva2000
Fri 25th May '01, 8:30pm
great :D
Mas*Mind
Fri 25th May '01, 9:46pm
For those who allready installed this hack: You might wanna remove the
You can activate your account <a href="register.php?s=$session[sessionhash]&a=act&u=$bbuserinfo[userid]&i=$bbuserinfo[joindate]">here</a> in case you deleted the email. bit from your template because it totally defeats the purpose of email-verification :o. Totally forgot about that :D
Put this bit in it instead:
If you didn't received the activation-email <a href="register.php?s=$session[sessionhash]&action=requestemail">click here</a> to resend it.
eva2000
Fri 25th May '01, 9:50pm
Originally posted by Mas*Mind
because it totally defeats the purpose of email-verification :o. Totally forgot about that :D LOL :D
Mas*Mind
Sat 26th May '01, 8:33am
Doesn't anyone (besides eva ;)) find this hack usefull?
eva2000
Sat 26th May '01, 9:41am
Originally posted by Mas*Mind
Doesn't anyone (besides eva ;)) find this hack usefull? probably for most people the default template message is sufficient :)
Joshs
Sat 26th May '01, 10:38pm
I installed it, Thanks!
Mas*Mind
Mon 28th May '01, 4:55pm
I'm quite surprised this hack isn't that popular. Since I installed this hack I haven't got any email from members who are asking why they can post while they registered just because they didn't read their activation email properly (thus didn't activated their account). Before that I got a couple of them each day... Saves me alot of explanation.
Robert Basil
Mon 28th May '01, 8:49pm
Mas,
I just added this hack, thanks!
BluSmurf
Tue 29th May '01, 11:41am
installed in mine :D cheers!
kirck
Mon 4th Jun '01, 5:43pm
I installed it too! Thanks!:D
Devices
Wed 6th Jun '01, 4:39pm
So far so good.
This should be very usefull. I am getting loads of emails at the moment from people who can not be bothered to read their emails or they may have not recieved it for some reason. Now they can help themselfs by getting the email resent.
I have added it in and tested it and all seems well.
One thing though which is not this hack but a problem with VB in general.
If you do not allow viewing to unregistered or users awaiting confirmation then they are asked to login when they come to your VB. So they are allowed to login but then get the above permission hack displayed.
When they go to the resend activation email link they just keep getting the same page as they do not have permission to view the remail page ?
Maybe i missed a setting.
Devices
Wed 6th Jun '01, 5:00pm
So far so good.
This should be very usefull. I am getting loads of emails at the moment from people who can not be bothered to read their emails or they may have not recieved it for some reason. Now they can help themselfs by getting the email resent.
I have added it in and tested it and all seems well.
One thing though which is not this hack but a problem with VB in general.
If you do not allow viewing to unregistered or users awaiting confirmation then they are asked to login when they come to your VB. So they are allowed to login but then get the above permission hack displayed.
When they go to the resend activation email link they just keep getting the same page as they do not have permission to view the remail page ?
Maybe i missed a setting.
kdog316
Thu 7th Jun '01, 1:51am
ok iget these erorrs after i installed it and now i try to access my board and here is what comes up
Parse error: parse error in ./functions.php on line 1805
Warning: Cannot add header information - headers already sent by (output started at ./functions.php:1805) in ./functions.php on line 1187
Warning: Cannot add header information - headers already sent by (output started at ./functions.php:1805) in ./functions.php on line 1187
Fatal error: Call to undefined function: vbdate() in ./sessions.php on line 354
:confused:
Mas*Mind
Thu 7th Jun '01, 4:01am
you backed up your functions.php right?
Then revert it and apply the changes again...You did something wrong (can't figure out what)
kdog316
Thu 7th Jun '01, 11:06am
it works thanks
Typhon
Thu 7th Jun '01, 4:10pm
I'm about to install it.. but I just wanted to let youknwo this is a nice hack... will certainly save me the trouble of resending them manually. Thanks!
daydreamer
Thu 7th Jun '01, 7:08pm
Installed the hack. Went to test it, "clicked here" to resend it and got a 404:(
Any ideas?
dd
Mas*Mind
Thu 7th Jun '01, 7:31pm
do the same as kdog316: revert and re-apply...
You probably did something wrong...
btw: Since I installed this hack I never got one of those emails again, so it definitely helps :)
daydreamer
Thu 7th Jun '01, 7:35pm
DUH!
I didn't change the file extensions to .php3...:rolleyes:
dd
daydreamer
Thu 7th Jun '01, 9:29pm
Hello again,
I think this hack may have caused some problems with links on showthread pages such as this:
http://forums.dreamsweb.net/showthread.php3?s=&threadid=12
Notice the "general forums" and "Sales Questions" links at top. The refer to .php33 pages.
Anyone who has installed this hack please check to see if you are having the same problem.
Thankx
dd
daydreamer
Thu 7th Jun '01, 9:46pm
DUH! AGAIN... I need some sleep.
Okay, As in my post earlier. I forgot to rename all file extensions to .php3
I am usually very careful when doing so while using Note Tab Lite. Having said that, I rename all to .php33
All is not my fault as that was the first thing I thought of to check, but the program's search feature did not find them. I had to locate them all myself. Only about nine or so.
I will now reinstall Note Tab Lite....
Mods, please delete my post here today :D
dd
Castel
Fri 8th Jun '01, 1:48am
Wow, didn't see this til now. Very useful Mas*Mind, I will install it shortly. Even after adding additional lines to the normal error template I still get mail daily about stuff like this. Great little hack!
Mas*Mind
Fri 8th Jun '01, 4:55am
Glad y'all like it :)
I slightly changed the error_nopermission_awaiting_moderation -template to make it even more clear:
You have recently registered at $bbtitle but not yet activated your account.
You can find the link to activate your account in your welcome-email.
If you didn't received the activation-email or you've allready deleted it, <a href="register.php?s=$session[sessionhash]&action=requestemail&email=$bbuserinfo[email]">click here</a> to resend it to you're email-adress ($bbuserinfo[email]).
If you still don't receive it then, you probably have entered an incorrect addres, you can correct it by editing your <a href="member.php?s=$session[sessionhash]&action=editprofile">profile</a>.
<p align="center">
<table border="0" bgcolor="#555576" cellpadding="4" cellspacing="1" align="center">
$logincode
</table>
</p>
<p><smallfont><a href="member.php?s=$session[sessionhash]&action=lostpw">Forgotten your password?</a></smallfont>
then change
<input type="text" class="bginput" name="email" size="35" maxlength="90">
to
<input type="text" class="bginput" name="email" size="35" maxlength="90" value="$email">
in your activate_requestemail-template
Dakota
Fri 8th Jun '01, 5:01am
I have to say that I like your hack too. Good Job :D
robertusss
Sun 10th Jun '01, 2:06pm
great one!
this one must be in 2.1 - no doubt!
jookido
Sun 1st Jul '01, 4:10am
Thanks Mas! Was thinking of pouring through the code to get something like this to work, but you've done everything already!
Great stuff. :)
Alex
Sat 11th Aug '01, 4:51am
Just installed it... works like a charm and (my oppinion) is a very helpful thing for User awaiting Email Confirmation. :-)
JJR512
Sat 11th Aug '01, 2:52pm
I have taken the liberty of re-wording the new template, as well as adding a new part to it. The re-wording was done to improve the English a bit (and that is not said to be critical). I added a line to say that maybe the user supplied the wrong address, and should contact the webmaster if he/she still does not get the activation email.
You have recently registered at $bbtitle, but have not yet activated your account. You can find the link to activate your account in your welcome-email.
<p align="center">
<table border="0" bgcolor="#555576" cellpadding="4" cellspacing="1" align="center">
$logincode
</table>
</p>
<p><smallfont>If you haven't received the activation email, <a href="register.php?s=$session[sessionhash]&action=requestemail">click here</a> and it will be resent. If you still do not receive the activation email, you may have mistyped your email address. If you suspect you used the incorrect email address, please contact the <a href="mailto:webmaster@jjr512.com">Webmaster</a>. <a href="member.php?s=$session[sessionhash]&action=lostpw">Forgotten your password?</a>
Does anyone know the variable to use for the webmaster email, rather than hard-coding it as I have done?
pran
Wed 29th Aug '01, 1:02am
Thanks Mas*Mind, great hack!
aldamon
Thu 30th Aug '01, 10:05am
Great stuff! Thanks!
MarkB
Fri 31st Aug '01, 2:31am
I finally got around to adding this to my forums, and it's been a godsend. Thanks! :D
web
Mon 3rd Sep '01, 12:42am
Nice job. This was the first hack I installed since I start using vBulletin. It works fine with one exception. The link to go to 'profile' and edit the password did not work. It kept returning to the new 'not activated' page. Not a problem, I just removed that portion of the template. I also removed the portion for "forgot password." The user is already logged in, so they could not have forgotten their password ;) .
Thanks for sharing the work and it will definitely save me some time responding to emails and voice mails.
Regards,
web
Grover
Wed 19th Sep '01, 3:23am
Hi Mas*Mind,
Are there plans to release this very useful hack in a future version of Vbulletin? I think that this HAS TO BE part of the standard VBulletin-features in the future: it is one of the most useful (and can I even say: NECESSARY) hacks I have ever seen.
I hope they put it in! It really just saves us so much work........
Grover.
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights