vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   "Express" Registration (https://vborg.vbsupport.ru/showthread.php?t=27372)

DarkManX_19 10-30-2001 12:44 AM

well, not all of us are as web savy as others.....some things aren't as easy to peice together....and since you obviously already know the answer...why cna't ya just help a guy out??

veedee 11-27-2001 12:07 PM

Arrggh

So sorry for forgetting about this. I have changed jobs and lost the code. I will re-do it and *promise* to post everything I have done.

Cheers,

veedee

Wolf42 02-05-2002 01:45 PM

I tryed it for myself, but I have a little problem. I added the following code into register.php:
PHP Code:

// ############################### start fast signup ###############################
if ($action=="fast") {

  if (!
$allowregistration) {
    eval(
"standarderror(\"".gettemplate("error_noregister")."\");");
    exit;
  }

  if (
$bbuserinfo[userid]!=and !$allowmultiregs) {
    
$getuser=$DB_site->query_first("SELECT username FROM user WHERE userid='$bbuserinfo[userid]'");
    
$username=$getuser[username];

    eval(
"standarderror(\"".gettemplate("error_alreadyregistered")."\");");

    exit;
  }

  
$coppadate=vbdate($dateformat,mktime(0,0,0,date("m"),date("d"),date("Y")-13));

  if (!
$usecoppa) {
    
$who="adult";
  }

  if (
$who=="coppa") {
    eval(
"dooutput(\"".gettemplate("signupcoppa")."\");");
  } else {
    if (
$who=="adult") {
      eval(
"dooutput(\"".gettemplate("signupadult_fast")."\");");
    } else {
      eval(
"dooutput(\"".gettemplate("signupverify")."\");");
   }
 }
}
// ############################### start register fast ###############################
if ($action=="registerfast") {
  if (!
$allowregistration) {
    eval(
"standarderror(\"".gettemplate("error_noregister")."\");");
    exit;
  }

  if (
$bbuserinfo[userid]!=and !$allowmultiregs) {
    
$getuser=$DB_site->query_first("SELECT username FROM user WHERE userid='$bbuserinfo[userid]'");
    
$username=$getuser[username];

    eval(
"standarderror(\"".gettemplate("error_alreadyregistered")."\");");

    exit;
  }

  if (
$allowhtml) {
    
$htmlonoff=$ontext;
  } else {
    
$htmlonoff=$offtext;
  }
  if (
$allowbbcode) {
    
$bbcodeonoff=$ontext;
  } else {
    
$bbcodeonoff=$offtext;
  }
  if (
$allowbbimagecode) {
    
$imgcodeonoff=$ontext;
  } else {
    
$imgcodeonoff=$offtext;
  }
  if (
$allowsmilies) {
    
$smiliesonoff=$ontext;
  } else {
    
$smiliesonoff=$offtext;
  }
  
//MaxPosts by User
  
$optionArray explode(","$usermaxposts);
  while (list(
$key$val) = each($optionArray))
  {
     eval (
"\$maxpostsoptions .= \"".gettemplate("modifyoptions_maxposts")."\";");
  }
  
$postsdefaultselected "selected";
  
// Referrer
  
if ($usereferrer and $bbuserinfo['userid']==0) {
    if (
$bgcolor=="{firstaltcolor}") {
      
$bgcolor="{secondaltcolor}";
      
$bgclass="alt2";
    } else {
      
$bgcolor="{firstaltcolor}";
      
$bgclass="alt1";
    }
    if (
$bbreferrerid) {
      if (
$referrername=$DB_site->query_first("SELECT username FROM user WHERE userid = '".addslashes($bbreferrerid)."'")) {
        
$referrername $referrername['username'];
      }
    }
    eval(
"\$referrer = \"".gettemplate("register_referrer")."\";");
  }
  
//Birthday
  
if ($calbirthday == 1) {
     if (
$bgcolor=="{firstaltcolor}") {
        
$bgcolor="{secondaltcolor}";
        
$bgclass="alt2";
     } else {
        
$bgcolor="{firstaltcolor}";
        
$bgclass="alt1";
     }
     eval(
"\$birthday = \"".gettemplate("register_birthday")."\";");
  }
  
// get extra profile fields
  
$profilefields=$DB_site->query("SELECT *
                                  FROM profilefield
                                  WHERE editable = 1
                                  ORDER BY displayorder"
);
  while (
$profilefield=$DB_site->fetch_array($profilefields)) {
    
$profilefieldname="field$profilefield[profilefieldid]";
    if (
$profilefield[required] == 1) {
      if (
$bgcolor1=="{firstaltcolor}") {
        
$bgcolor1="{secondaltcolor}";
        
$bgclass1="alt2";
      } else {
        
$bgcolor1="{firstaltcolor}";
        
$bgclass1="alt2";
      }
      
$temp $bgcolor;
      
$tempclass $bgclass;
      
$bgcolor $bgcolor1;
      
$bgclass $bgclass1;
      eval(
"\$customfields_required .= \"".gettemplate("register_customfields")."\";");
      
// vBPortal Begin
      
$showleftcolumnchecked="checked";
      
$showleftcolumnnotchecked="";
      eval (
"\$leftcolumncell = \"".gettemplate("P_leftcolumncell")."\";");
      
// vBPortal End
      
$bgcolor $temp;
      
$bgclass $tempclass;
    } else { 
// Not Required
      
if ($bgcolor=="{firstaltcolor}") {
        
$bgcolor="{secondaltcolor}";
        
$bgclass="alt2";
      } else {
        
$bgcolor="{firstaltcolor}";
        
$bgclass="alt1";
      }
      eval(
"\$customfields .= \"".gettemplate("register_customfields")."\";");
    }
  }

  
$bgcolor "{secondaltcolor}";
  
// User selectable style sets
  
$stylesetlist "";
  if (
$allowchangestyles==1) {
    
$stylesets=$DB_site->query("SELECT * FROM style WHERE userselect=1");
    while(
$thisset=$DB_site->fetch_array($stylesets)) {
      if (
$bbuserinfo[styleid]==$thisset[styleid]) {
        
$selected "selected";
      } else {
        
$selected "";
      }
      
$thisid $thisset[styleid];
      
$thisstylename $thisset[title];

      eval (
"\$stylesetlist .= \"".gettemplate("modifyoptions_styleset")."\";");
      eval (
"\$stylecell = \"".gettemplate("register_stylecell")."\";");
      
$bgcolor "{firstaltcolor}";
    }
  } else {
    
$stylecell "";
  }

  if (
$avatarenabled) {
    
$avatars $DB_site->query("SELECT avatarid, title, avatarpath
                                    FROM avatar
                                    WHERE minimumposts = 0
                                    ORDER BY title"
);
    if (
$DB_site->num_rows($avatars) > 0) {
      while (
$avatar $DB_site->fetch_array($avatars)) {
        if (!
$avatar['title']) {
          
$avatar['title'] = $avatar['avatarpath'];
          if (
strstr($avatar['title'], '/')) {
            
$avatar['title'] = substrstrrchr($avatar['title'], '/') , 1);
          }
          
$avatar['title'] = str_replace('_'' '$avatar[title]);
          
$dotpos strrpos($avatar[title], '.');
          
$avatar[title] =  substr($avatar[title], 0$dotpos);
        }
        eval(
"\$avatarbits .= \"".gettemplate("register_avatarbit")."\";");
      }
      eval(
"\$avatarbit = \"".gettemplate("register_avatar")."\";");
    }
  }

  if (
$who=="adult") {
    eval(
"dooutput(\"".gettemplate("register_fast")."\");");
  } else {
    eval(
"dooutput(\"".gettemplate("registercoppa")."\");");
  }
}
  
$adminemail=1;
  
$showemail=0;
  
$invisible=1;
  
$cookieuser=0;
  
$nosessionhash=0;
  
$emailnotification=1;
  
$options=1;
  
$options+=2;
  
$options+=4;
  
$options+=8;
  
$receivepm=0;
  
$emailonpm=1;
  
$pmpopup=0

Also I added two new templates register_fast and signupadult_fast.

Now my problem: If I set $adminemail=1 it becomes NO. If I set $adminemail=0 it becomes NO. WHY?? :confused:

Please help.

veedee 02-05-2002 01:54 PM

I have made enough excuses. Here is another one. I was made redundant and forgot about all this stuff. I need this for my site and will spend the rest of the day gathering info on this. I will post up any updates.

Cheers,

Ben

veedee 02-05-2002 03:15 PM

ok here goes...


In global.php add

PHP Code:

if ($bbuserinfo['userid']==0) {
  eval(
"\$headexpressreg = \"".gettemplate('head_expressreg')."\";");


right after

PHP Code:

$newpmmsg=1;
  eval(
"\$headnewpm = \"".gettemplate('head_newpm')."\";");


now create a new template, head_expressreg and put this in it:

Code:

<script language="javascript"><!--
window.open('http://www.yoursite.com/forum/file.php');
// --></script>

Now go to your style set area. Find the text area where you enter content to go in the <head> of the page. Enter in $headexpressreg under $headnewpm

This will pop file.php up. Now to make file.php

Try this:

Code:

<html>
<title>Welcome to visordown.com - register today</title>
<head>
<STYLE type=text/css>
.nf { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt }
.sf { font-family: verdana,arial,helvetica,sans-serif; font-size: 8pt; color: #ffffff; }
</style>
</head>
<body bgcolor="#000000">

<!-- content table -->
<font class="sf">Registration is required if you want to post messages on visordown.com</font>
<table bgcolor="#000000" width="100%" cellpadding="10" cellspacing="0" border="0"><tr><td>
<form action="http://www.visordown.com/forums/register.php" method="post">
<input type="hidden" name="s" value="">

<table border="0" cellspacing="1" cellpadding="4" width="100%" bgcolor="#555576">
<!-- *** -->
<tr>
        <td bgcolor="#0000ee" colspan="2"><font face="verdana" size="2" color="#ffffff" class="thtcolor"><b>Registration</b></font>
        <font face="verdana" size="1" color="#ffffff" class="thtcolor">(*) fields are required.  Please note that passwords are case sensitive.</font></td>
</tr>
<!-- *** -->
<tr>
        <td bgcolor="#AAAAE6"><font class="nf"><b>*User Name:</b></font></td>
        <td bgcolor="#AAAAE6"><font class="nf"><input type="text" name="username" size="25" maxlength="15"></font></td>
</tr>
<tr>
        <td bgcolor="#C3C3EB"><font class="nf"><b>*Password:</b></font></td>
        <td bgcolor="#C3C3EB"><font class="nf"><input type="password" name="password" size="25" maxlength="15"></font></td>
</tr>
<tr>
        <td bgcolor="#C3C3EB"><font class="nf"><b>*Enter Password Again:</b></font></td>
        <td bgcolor="#C3C3EB"><input type="password" name="passwordconfirm" size="25" maxlength="15"></td>
</tr>
<tr>
        <td bgcolor="#AAAAE6"><font class="nf"><b>*Email:</b></font><br>
        <font color="#000000" face="verdana" size="1">Please enter a <b>valid</b> email address.</font></td>
        <td bgcolor="#AAAAE6"><font class="nf"><input type="text" name="email" size="25" maxlength="50"></font></td>
</tr>
<tr>
        <td bgcolor="#AAAAE6"><font class="nf"><b>*Enter Email Again:</b></font></td>
        <td bgcolor="#AAAAE6"><font class="nf"><input type="text" name="emailconfirm" size="25" maxlength="50"></font></td>
</tr>


<tr><td bgcolor="#113274">
&nbsp;
</td><td bgcolor="#113274"><input type="hidden" name="allowmail" value="yes">
<input type="hidden" name="invisible" value="no">
<input type="hidden" name="showemail" value="yes">
<input type="hidden" name="cookieuser" value="yes">
<input type="hidden" name="nosessionhash" value="yes">
<input type="hidden" name="emailonpm" value="yes">
<input type="hidden" name="prunedays" value="-1">
<input type="hidden" name="umaxposts" value="-1">
<input type="hidden" name="startofweek" value="1">
<input type="hidden" name="timezoneoffset" value="-5">
<input type="hidden" name="emailnotification" value="yes">
<input type="hidden" name="showsignatures" value="yes">
<input type="hidden" name="showavatars" value="yes">
<input type="hidden" name="showimages" value="yes">
<input type="hidden" name="vbcode" value="yes">
<input type="hidden" name="pmpopup" value="yes">
<input type="hidden" name="receivepm" value="yes">
<input type="hidden" name="url" value="http://www.visordown.com/forums/thanks.html">
<input type="hidden" name="action" value="addmember">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset"></td>
</tr></font>
</td></tr></table>
</form>
<font class="sf">By pressing the registration button above you declare that you have read and agree with the <a href="/" target="blank">Community Guidelines</a></font>
<!-- End content area table -->
</td></tr></table>
</body>
</html>

Obviously modify the colours and the paths to your site. It should work a treat. Just visit my site now www.visordown.com/forums as a guest and it should pop up. It isn't perfect, however it works !

Does this help?

Ben

Wolf42 02-06-2002 08:10 AM

Thank you very much!! :up:

veedee 02-06-2002 09:55 AM

Great - Now all I need to work out is how to make the pop up only pop up once per user visit. I would also like to make it pop up in a nicer looking window.

Hmmm can we get together on this one ?

Wolf42 02-06-2002 10:34 AM

For the windowsize: How about a little change in your head_expressreg template:
Code:

<script language="javascript">
window.open("file.php?, "Register now!!", "toolbar=no,scrollbars=yes,resizable=yes,width="300",height="600");
</script>

For once per visit: How about setting a cookie with lifetime i.e. 1 day.

veedee 02-06-2002 10:51 AM

Superb!

How do I set a cookie. I have had a go but it doesn't work.

Any code going?

Cheers!

Ben

Wolf42 02-06-2002 01:25 PM

How to set a cookie:
Code:

<script language="javascript">
document.cookie = "your-cookie-settings";
</script>

I have tryed to figure out how vB is setting the cokkies, but I didn't. Sorry.


All times are GMT. The time now is 02:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01183 seconds
  • Memory Usage 1,861KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete