View Full Version : Add an option to use lite registration page in admin cp
Admin
09-11-2001, 10:00 PM
This hack will let you select whether to use a lite registration page or not, directly from the admin control panel.
Using this will make your page look like this (with the header and footer of course):
http://www.vbulletin.com/forum/attachment.php?s=&postid=171102
Requested by inetd and so many more.
Pretty simple really:
1) Run this query using Telnet or phpMyAdmin:
INSERT INTO setting VALUES (NULL,6,'Use lite registration page?','litereg','0','Using this option will only display required fields for users when signing up.','yesno','18')
2) In register.php replace this code:
if ($who=="adult") {
eval("dooutput(\"".gettemplate("registeradult")."\");");
} else {
eval("dooutput(\"".gettemplate("registercoppa")."\");");
}
with
if ($who=="adult") {
if ($litereg) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registeradult")."\");");
}
} else {
if ($litereg) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registercoppa")."\");");
}
}
3) Add a new template named registerlite and use the file I attached for its contents (template done by kier (http://www.vbulletin.com/forum/showthread.php?s=&threadid=26376) :)).
That's it. Now you'll have an option for this in your options page, under "User and registration options".
Hope you like this, please feedback. :)
inetd
09-12-2001, 06:58 PM
GOOD HACK! Big thx!:) :D ;)
What's this lite page this hacks lets us select?
Admin
09-13-2001, 10:26 AM
It's a new template that only displays the required fields and some others. Just look at the template I attached.
squawell
09-13-2001, 03:55 PM
have any picture can see what kind of this hack look like after install??
Admin
09-13-2001, 04:06 PM
Yeah sure, I'll get a screen shot right away.
Admin
09-13-2001, 04:25 PM
There you go! :)
squawell
09-13-2001, 05:08 PM
but i have one question for your picture~~
that's i can't see what different look like before install this hack??
can you show before install picture and after picture??
thanks ~~~
sorry~~bother you too much time~~
Admin
09-13-2001, 05:10 PM
Before is just the standard page. Log out from this forum, and click register - that's what it looks like before installing this hack.
Lordmusic
09-15-2001, 06:10 PM
Very nice. THANKS!
Kengan
10-05-2001, 05:20 AM
Looks good ! Thanks for the hack !
Mike Gaidin
10-05-2001, 08:08 PM
I get this...
Parse error: parse error in /*****/*********/public_html/forums/register.php on line 614
Admin
10-06-2001, 01:13 PM
It would help if you give me lines, let's say 610-620.
Mike Gaidin
10-06-2001, 01:56 PM
Well, 614 is the last line of code so here is 592-614
// ############################### start coppa form ###############################
if ($action=="coppaform") {
if ($bbuserinfo[userid]!=0) {
$bbuserinfo[signature]=nl2br($bbuserinfo[signature]);
if ($bbuserinfo[showemail]) {
$bbuserinfo[showemail]="no";
} else {
$bbuserinfo[showemail]="yes";
}
} else {
$bbuserinfo[username]="";
$bbuserinfo[homepage]="http://";
}
eval("dooutput(\"".gettemplate("coppaform")."\");");
}
?>
Admin
10-06-2001, 02:07 PM
Ok looks like a missing } or {.
Are you sure you replace this code: (and only this code)
if ($who=="adult") {
eval("dooutput(\"".gettemplate("registeradult")."\");");
} else {
eval("dooutput(\"".gettemplate("registercoppa")."\");");
}
with this:
if ($who=="adult") {
if ($litereg) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registeradult")."\");");
}
} else {
if ($litereg) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registercoppa")."\");");
}
}
and that you didn't accidentally removed a { or } from that part?
If you are sure, please post that area of the code.
Mike Gaidin
10-07-2001, 01:13 AM
I figured it out. :)
It was a missing }
Thanks for your help and the great hack!
RobAC
10-25-2001, 02:10 AM
PDF version?
Admin
10-25-2001, 10:34 AM
Use this code:
if ($who=="adult") {
if ($litereg or $uselite) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registeradult")."\");");
}
} else {
if ($litereg or $uselite) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registercoppa")."\");");
}
}
instead of this code:
if ($who=="adult") {
if ($litereg) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registeradult")."\");");
}
} else {
if ($litereg) {
eval("dooutput(\"".gettemplate("registerlite")."\");");
} else {
eval("dooutput(\"".gettemplate("registercoppa")."\");");
}
}
in register.php.
(you will need to install the hack first)
Then you will be able to link to register.php?action=xxx&uselite=1.
RobAC
10-25-2001, 01:00 PM
Chen,
I'm getting a blank page. I've sent you a PM with more details.
-Rob
Admin
10-25-2001, 01:03 PM
I thought it's obvious you need to change xxx in the URL I gave.
I've sent you the right address to link to...
RobAC
10-25-2001, 01:07 PM
geez....no....it's my usual morning, pre-coffee....DUHHHHH moment! :(
inetd
11-18-2001, 07:52 PM
Tell, please, a code for vb 2.2.1. I at pressing on Submit again have a form for registration
Admin
11-19-2001, 04:37 AM
This is compatible with 2.2.x.
inetd
11-24-2001, 09:52 AM
The last version of the code without bugs is necessary for me. Which works with version 2.2.1. Where it to take?
bill-t
02-22-2002, 03:00 AM
I installed the hack, following the directions exactly since this is one of the things I needed most and it looked pretty simple... (I'm brand new to vB, to scripting as well...) This is my second attempt at installing a hack and the first failed as well... I think I'm probably missing something pretty basic... I installed MyphpAdmin and ran the query... went to the file on the server and changed the code in step 2... Created the new template and copied the code to it... went to a different machine and killed all cookies and went to log in as new user... It gave me the basic same old registration screen... Question 2 is; once I get this up, how can I hide the question about the time zone and make it default to my choice? All my users live in same town... The server is actually set so if user doesn't make any choice they're good to go... 3rd... will custom questions added on that normally show up at bottom of regular template show up on bottom of this? TIA
Birdie501
03-06-2002, 01:50 PM
Hi,
I want to change the registerlite form for my needs. Can I just delete the fields i don't want to use?
How can I set the options to what i want?
example:
I only want to display username, email and password!
But all the other options i want to be automatically set to the value I want.
How can i do that?
Thanks!
Birdie501
Admin
03-06-2002, 01:54 PM
Use hidden form fields. For example, instead of this:
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Use 'Email Notification' by default</b></normalfont><br>
<smallfont>Using this option emails you whenever someone replies to a thread that you have participated in.</smallfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>
<input type="radio" name="emailnotification" value="yes" checked> yes
<input type="radio" name="emailnotification" value="no" > no
</normalfont></td>
</tr>
You can use this:
<input type="hidden" name="emailnotification" value="yes" />
(where yes can also be no, depends on what you want :))
Birdie501
03-06-2002, 01:57 PM
Hey firefly,
you're the best! Thanks!
Admin
03-06-2002, 02:02 PM
No problems Birdie. :)
Birdie501
03-06-2002, 02:11 PM
@ firefly
is it the same with textarea fields? do i always have to put the above string for each variable? Or if the value is empty can i delete it instead?
Admin
03-06-2002, 02:18 PM
You can delete it if it's empty.
bill-t
03-07-2002, 11:44 AM
Thanks to a couple of your hacks I've been able to figure out enough of the scripting to customize quite a bit... Thanks!
JoeHarrison
04-16-2002, 07:36 PM
Hi.
Is there any way that I can use the lite registration page but also have my Custom Profile Fields on this lite page?
Thanks in advance,
Joe
FleaBag
05-19-2002, 11:55 PM
I was about to complain that this hack didn't work - then I realised I hadn't re-uploaded register.php. Silly me! Working like a dream on 2.2.5! :D
Admin
05-20-2002, 11:25 AM
This is how people get killed, Gamer. ;)
to use this with the hack by firefly to show times in the timezone selection menu, just open up the "registeradult" template and copy that select menu and replace it in "registerlite".
FleaBag
06-19-2002, 10:50 PM
Works great on 2.2.6, thanks! :D And please don't kill me FireFly, I'm still young! ;)
Webmasta XT
07-14-2002, 07:24 PM
ok, I am confused, both of those are eXactly the same, b4 the hack and after the hack...
Webmasta XT
07-14-2002, 07:25 PM
woops, I made the same mistake as GamerForums, lol
freeshares1
07-20-2002, 08:58 PM
thanks.
EchoHype.com
07-25-2002, 12:26 AM
Hey FireFly...possible addition/feature that may be cool to see(if nobody already asked, or it doesn't do it)
if it's set for it to use lite registration....then any users who signed up using lite registrations(which requires just email, username, and password I assume) those users would get a popup, or a PM informing them to update their profile info(icq, aim, msn, etc, etc, etc)
I think it would be pretty cool
Littlebit
10-29-2002, 12:40 PM
I noticed that the default for receiving email from admins is now set to 'no'.
To fix it, in the lite template, I changed this:
<input type="hidden" name="allowemail" value="yes">
to this:
<input type="hidden" name="allowmail" value="yes">
after checking the regular registration template and noticing the difference.
Will this be all that I need to do to make sure the default is set to yes for receiving email from admins again?
FleaBag
03-10-2003, 06:18 AM
Thanks, I'd noticed every new user wasn't being signed up to updates and now I know why. :)
hotshot
03-11-2003, 10:57 PM
Thanks, this hack rocks. I hated all those option, most users are overwhelmed by all of that!
Nice hack, FireFly...
One question: My forums will only be targeting people on CET (Central European Time) - is this all I have to do to set this as a hidden value (CET as standard):
<input type="hidden" name="timezoneoffset" value="+1">
This while deleting the rest of the time zone related code...
Wild guess, could it be correct?
Regards,
TMM
ryancooper
04-09-2003, 03:59 PM
AWESOME Hack. One question, how can you use the image verification with this. If you have it enabled it dosn't show up and tells you that the image is wrong.
Thanks
dotagious
04-19-2003, 04:41 AM
Yes, could someone get this to work with image verification please? I would also like to make it so only the username, password, and email fields are required to be completed. Could someone post the template contents to achieve this?
dotagious
04-21-2003, 10:03 PM
bump
gmarik
05-24-2003, 07:25 AM
How is it with 2.3, Chen?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.