Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-11-2001 Last Update: Never Installs: 22
 
No support by the author.

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):

Requested by inetd and so many more.

Pretty simple really:
1) Run this query using Telnet or phpMyAdmin:
Code:
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:
PHP Code:
  if ($who=="adult") {
    eval(
"dooutput(\"".gettemplate("registeradult")."\");");
  } else {
    eval(
"dooutput(\"".gettemplate("registercoppa")."\");");
  } 
with
PHP 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")."\");");
    }
  } 
3) Add a new template named registerlite and use the file I attached for its contents (template done by kier ).

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-05-2001, 05:20 AM
Kengan's Avatar
Kengan Kengan is offline
 
Join Date: Nov 2001
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks good ! Thanks for the hack !
Reply With Quote
  #13  
Old 10-05-2001, 08:08 PM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this...

Parse error: parse error in /*****/*********/public_html/forums/register.php on line 614
Reply With Quote
  #14  
Old 10-06-2001, 01:13 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would help if you give me lines, let's say 610-620.
Reply With Quote
  #15  
Old 10-06-2001, 01:56 PM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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")."\");" );

}

?>
Reply With Quote
  #16  
Old 10-06-2001, 02:07 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok looks like a missing } or {.

Are you sure you replace this code: (and only this code)
PHP Code:
if ($who=="adult") {
    eval(
"dooutput("".gettemplate("registeradult")."");");
  } else {
    eval(
"dooutput("".gettemplate("registercoppa")."");");
  } 
with this:
PHP 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")."");");
    }
  } 
and that you didn't accidentally removed a { or } from that part?

If you are sure, please post that area of the code.
Reply With Quote
  #17  
Old 10-07-2001, 01:13 AM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured it out.

It was a missing }

Thanks for your help and the great hack!
Reply With Quote
  #18  
Old 10-25-2001, 02:10 AM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PDF version?
Reply With Quote
  #19  
Old 10-25-2001, 10:34 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use this code:
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:
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.
Reply With Quote
  #20  
Old 10-25-2001, 01:00 PM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Chen,

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

-Rob
Reply With Quote
  #21  
Old 10-25-2001, 01:03 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04592 seconds
  • Memory Usage 2,326KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete