PDA

View Full Version : Add an option to use lite registration page in admin cp


Chen
12 Sep 2001, 20:18
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
12 Sep 2001, 20:58
GOOD HACK! Big thx!:) :D ;)

LuBi
13 Sep 2001, 01:02
What's this lite page this hacks lets us select?

Chen
13 Sep 2001, 12:26
It's a new template that only displays the required fields and some others. Just look at the template I attached.

squawell
13 Sep 2001, 17:55
have any picture can see what kind of this hack look like after install??

Chen
13 Sep 2001, 18:06
Yeah sure, I'll get a screen shot right away.

Chen
13 Sep 2001, 18:25
There you go! :)

squawell
13 Sep 2001, 19:08
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~~

Chen
13 Sep 2001, 19:10
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
15 Sep 2001, 20:10
Very nice. THANKS!

Kengan
05 Oct 2001, 07:20
Looks good ! Thanks for the hack !

Mike Gaidin
05 Oct 2001, 22:08
I get this...

Parse error: parse error in /*****/*********/public_html/forums/register.php on line 614

Chen
06 Oct 2001, 15:13
It would help if you give me lines, let's say 610-620.

Mike Gaidin
06 Oct 2001, 15:56
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")."\");");

}

?>

Chen
06 Oct 2001, 16:07
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
07 Oct 2001, 03:13
I figured it out. :)

It was a missing }

Thanks for your help and the great hack!

RobAC
25 Oct 2001, 04:10
PDF version?

Chen
25 Oct 2001, 12:34
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
25 Oct 2001, 15:00
Chen,

I'm getting a blank page. I've sent you a PM with more details.

-Rob

Chen
25 Oct 2001, 15:03
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
25 Oct 2001, 15:07
geez....no....it's my usual morning, pre-coffee....DUHHHHH moment! :(

inetd
18 Nov 2001, 21:52
Tell, please, a code for vb 2.2.1. I at pressing on Submit again have a form for registration

Chen
19 Nov 2001, 06:37
This is compatible with 2.2.x.

inetd
24 Nov 2001, 11:52
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
22 Feb 2002, 05:00
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
06 Mar 2002, 15:50
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

Chen
06 Mar 2002, 15:54
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
06 Mar 2002, 15:57
Hey firefly,

you're the best! Thanks!

Chen
06 Mar 2002, 16:02
No problems Birdie. :)

Birdie501
06 Mar 2002, 16:11
@ 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?

Chen
06 Mar 2002, 16:18
You can delete it if it's empty.

bill-t
07 Mar 2002, 13:44
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
16 Apr 2002, 21:36
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
20 May 2002, 01:55
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

Chen
20 May 2002, 13:25
This is how people get killed, Gamer. ;)

N!ck
25 May 2002, 20:20
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
20 Jun 2002, 00:50
Works great on 2.2.6, thanks! :D And please don't kill me FireFly, I'm still young! ;)

Webmasta XT
14 Jul 2002, 21:24
ok, I am confused, both of those are eXactly the same, b4 the hack and after the hack...

Webmasta XT
14 Jul 2002, 21:25
woops, I made the same mistake as GamerForums, lol

freeshares1
20 Jul 2002, 22:58
thanks.

EchoHype.com
25 Jul 2002, 02:26
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
29 Oct 2002, 14:40
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
10 Mar 2003, 08:18
Thanks, I'd noticed every new user wasn't being signed up to updates and now I know why. :)

hotshot
12 Mar 2003, 00:57
Thanks, this hack rocks. I hated all those option, most users are overwhelmed by all of that!

TMM
31 Mar 2003, 17:35
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
09 Apr 2003, 17:59
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
19 Apr 2003, 06:41
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
22 Apr 2003, 00:03
bump

gmarik
24 May 2003, 09:25
How is it with 2.3, Chen?