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
Quick Registration Form on a non-vB page Details »»
Quick Registration Form on a non-vB page
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-17-2003 Last Update: Never Installs: 23
 
No support by the author.

Requested Here: https://vborg.vbsupport.ru/showthrea...954#post394954

What does this hack do?
  • It allows people to register at your website (to your vBulletin board) on a non-vBulletin page
  • It provides a much quick method of registration, compared to the usual way
  • only Guests can see this registration form. If the user is already registered, then he/she will see a message instead, such as Welcome back Gary!

Bugs
Found a bug? Please reply back and let me know!

Instructions
Be sure to place the attached code wherever you want the quick registration form to show up.

Enjoy!

Show Your Support

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

Comments
  #12  
Old 06-02-2003, 07:05 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 10:19 PM Nebby said this in Post #8
EDIT: NM, i tested it, it just goes back to quickreg.php
Where would you want it to go?
Reply With Quote
  #13  
Old 06-02-2003, 11:20 PM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 09:04 PM Gary W said this in Post #10
Yes, it is. Some minor modifications would have to be made to the file, though. For example, the config.php variables would not be accessible, so you would have to add those manually.
To be clear, PHP files would be necessary for this hack to work? Or could it be done via HTML only? The website uses .shtml extensions is why I ask, and there isn't any PHP files on it. Don't really want to add any.
Reply With Quote
  #14  
Old 06-02-2003, 11:29 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The PHP file that processes the registration could be located somewhere else, just as long as the HTML file has access to it.
Reply With Quote
  #15  
Old 06-02-2003, 11:36 PM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you give me an example? Sorry to bug you but I don't exactly have the greatest of knowledge of this stuff, and it seems you know a LOT about this. (Been viewing a lot of your posts/threads.)
Reply With Quote
  #16  
Old 06-02-2003, 11:41 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe the PHP file is accessible via FTP, or on the same server.

P.S.
Why not simply place the PHP file that processes the script, in the same directory as the HTML file, if you don't want to use a PHP file for the quick registration page?
Reply With Quote
  #17  
Old 06-02-2003, 11:50 PM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 01:41 AM Gary W said this in Post #15
Maybe the PHP file is accessible via FTP, or on the same server.
I am sure they're on the same server but just a separate domain. (I do not 'own' the site, I just run the forums.)

Quote:
Today at 01:41 AM Gary W said this in Post #15
P.S.
Why not simply place the PHP file that processes the script, in the same directory as the HTML file, if you don't want to use a PHP file for the quick registration page?
Wouldn't you still have to click onto another page? I simply would like the quick registration to be on the page rather than it having its very own page. You know, having the form on the HTML page?

The only reason for this is the site receives about 15,000-25,000 unqiue hits per day. The forums have 22,000-some odd members, but we're really looking to expand even more.
Reply With Quote
  #18  
Old 06-02-2003, 11:57 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, you can have the form on the HTML page. So, you do not wish to have the form on a .PHP page? That is not at all possible? (May I ask why not?)

You can simply have the PHP file process the actual registration, while the HTML only "tells" the PHP page to register the user.
Reply With Quote
  #19  
Old 06-03-2003, 12:04 AM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you could use HTML to "call" for the script's form, correct? And the script could be on a separate domain as well, right?

If so, would you find giving an example of the HTML? I have no experience working with forms... : (
Reply With Quote
  #20  
Old 06-03-2003, 12:21 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As long as the PHP script is accessible by the HTML file.

Example that you could use:

HTML file

PHP Code:
<form action='quickreg.php' method='post'>
Username: <input type='text' name='username'>
<
br>Password: <input type='password' name='password'>
<
br>Email: <input type='text' name='email'>
<
br><input type='submit' name='submit' value='Submit' accesskey='s'
<
input type='reset' name='reset' value='Reset' accesskey='r'>
</
form
PHP file (name it quickreg.php, otherwise you must change the action='' in the HTML file to whatever this file is called)

PHP Code:
<?php

////////////////////////////////////////////////////////////////////////////////////////////
// VARIABLES
// $config = relative path to your vBulletin's /admin/config.php (must be on same server)
// $groupid = user group ID for people who register using this form
// $redirect = leave it as "yes" if you want to redirect the user to the vBulletin after he/she registers
////////////////////////////////////////////////////////////////////////////////////////////

// board information
$config="forum/admin/config.php";
$groupid="2";
$redirect="yes";

///////////////////////////////////////////////////////////////////////////
// DO NOT MODIFY ANYTHING BELOW HERE 
// UNLESS YOU KNOW WHAT YOU ARE DOING
///////////////////////////////////////////////////////////////////////////

$config=strtolower($config);
require(
$config);

$connect=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);

if (
$submit) {
    
$unique=mysql_query("SELECT username FROM user WHERE username='$username'");
        
$user=mysql_query("INSERT INTO user (usergroupid, username, password, email, joindate, 
        lastvisit, lastactivity) VALUES ('"
.$groupid."', '".htmlspecialchars(addslashes($username)).
        
"', '".addslashes(md5($password))."', 
        '"
.addslashes(htmlspecialchars($email))."', '".time()."', '".time()."', '".time()."')",$connect);
        
$userid=mysql_insert_id();
        
$userfields=mysql_query("INSERT INTO userfield (userid) VALUES ($userid)");
        if ((
$user==TRUE) and ($userid==TRUE) and ($userfields==TRUE)) {
            
header("Location: index.html");
        }
        if (
$redirect=="yes") {
            
$board=str_replace("admin/config.php","index.php",$config);
            print 
"<meta http-equiv='refresh' content='0;URL=".$board."'>";
        }
    
mysql_close($connect);
    }
}

?>
Try that, tell me if it works. I simply modified some things from the original code.
Reply With Quote
  #21  
Old 06-03-2003, 12:29 AM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got a parse error.

http://www.weforums.com/quickreg3.php

Only thing I changed was...

forum/admin/config.php

to

forums/admin/config.php
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 03:11 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.05287 seconds
  • Memory Usage 2,334KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_php
  • (4)bbcode_quote
  • (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_postinfo_query
  • fetch_postinfo
  • 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