Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-25-2001 Last Update: Never Installs: 0
 
No support by the author.

Ok situation:

Someone i know has a website, they get people to register at their site. We want at the same time they register there to be registered into the vbulletin user database, auutomatically.

how?

What could be put inside a cgi or php script on a different server that sends a request to the database to register someone to it?

Any ideas?

thanks

Show Your Support

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

Comments
  #2  
Old 01-25-2001, 05:20 PM
Guest
 
Posts: n/a
Default

The basics (no code)

1. Take the "registration" part of member.php and put it into its own file i.e. register.php

2. Remove the templates in it.

3. Add a variable (i.e. $redirect) to the form so that you can use it. They can put this as a hidden form field and it should contain the page of their thank you page.

4. Instead of calling standard_redirect template after you do the insert, use Header(location:$redirect) to redirect them back to the proper place.

if you need the exact code, let me know.
Reply With Quote
  #3  
Old 01-25-2001, 06:13 PM
Guest
 
Posts: n/a
Default

i am slightly confused, i get the bit about the register part of member.php but not how it would work.

someone goes to my friend's site and submits say username, password and email. There script deals with the stuff in whatever way it does.

but then how do i get that information into my database as well? do you mean they should get their script to send to my script instead of a thank you page with the info along with it? (how would this work in the form of signup.php?name=sfsdf&password=sdfdsfsdf&emailnoti fication=y etc?

it is that bit i don't really know how to do, how to get a form submitted to one script and then that script submit a form automatically to another.
Reply With Quote
  #4  
Old 01-26-2001, 02:26 PM
Guest
 
Posts: n/a
Default

<a href="http://tech.irt.org/articles/js063/index.htm#4" target="_blank">http://tech.irt.org/articles/js063/index.htm#4</a>

Passing data from one form to another
Reply With Quote
  #5  
Old 01-26-2001, 02:48 PM
Guest
 
Posts: n/a
Default

don't think this is really what we want,

this appears to be just work like a hidden form field in a php script but instead using javascript.

I want to submit the results of 1 form to 2 different scripts. this just passes form to form.. aka hidden values.
Reply With Quote
  #6  
Old 03-04-2001, 08:05 PM
Guest
 
Posts: n/a
Default

Did you ever get this to work?

I would like to have a more complex membership app which not only updates the "home" database, but then also automatically registers them as a user in my same site's forum.
Reply With Quote
  #7  
Old 03-04-2001, 08:07 PM
Guest
 
Posts: n/a
Default

I would be very interested in this as well!
Reply With Quote
  #8  
Old 03-04-2001, 08:52 PM
Guest
 
Posts: n/a
Default

im working on something very similar for my site, and here is what i've pieced together..
register.php
PHP Code:
<?
/*********************************************************************************************
Checking remote post-registering temp file
register.php

*********************************************************************************************/
if($Submit) {
$db_reg=PostToHost("www.yoursite.com","/path/to/forums/register.php","username=".urlencode($username)."&password=".urlencode($password)."&passwordconfirm=".urlencode($password)."&email=".urlencode($email)."&emailconfirm=".urlencode($email)."&homepage=".urlencode($homepage)."&icq=".urlencode($icq)."&aim=".urlencode($aim)."&yahoo=".urlencode($yahoo)."&allowmail=".urlencode($allowmail)."&invisible=".urlencode($invisible)."&showemail=".urlencode($showemail)."&cookieuser=yes&nosessionhash=yes&receivepm=no&emailonpm=no&pmpopup=no&prunedays=-1&umaxposts=-1&startofweek=1&timezoneoffset=-5&emailnotification=no&newstyleset=1&action=addmember&submit=submit"); 
header("Location: http://www.yoursite.com/yay.shtml");
exit;
} else {
include "./registerinc.php";
exit;
}
/*********************************************************************************************
variables sent to registration for forum for future reference in easy to read format ;D
username=".urlencode($username)."&
password=".urlencode($password)."&
passwordconfirm=".urlencode($password)."&
email=".urlencode($email)."&
emailconfirm=".urlencode($email)."&

homepage=".urlencode($homepage)."&
icq=".urlencode($icq)."&
aim=".urlencode($aim)."&
yahoo=".urlencode($yahoo)."&

allowmail=".urlencode($allowmail)."&
invisible=".urlencode($invisible)."&
showemail=".urlencode($showemail)."&
cookieuser=yes&
nosessionhash=yes&
receivepm=no&
emailonpm=no&
pmpopup=no&
prunedays=-1&
umaxposts=-1&
startofweek=1&
timezoneoffset=-5&
emailnotification=no&
newstyleset=1&
action=addmember&
submit=submit.""
*********************************************************************************************/

function PostToHost($host, $path, $data_to_send) { 
  $fp = fsockopen($host,80); 
  fputs($fp, "POST $path HTTP/1.1\n"); 
  fputs($fp, "Host: $host\n"); 
  fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); 
  fputs($fp, "Content-length: ".strlen($data_to_send)."\n"); 
  fputs($fp, "Connection: close\n\n"); 
  fputs($fp, $data_to_send); 
  while(!feof($fp)) { 
    return fgets($fp, 128); 
  } 
  fclose($fp); 

?>
and then we need to have the form, so make registerinc.php
Code:
<html>
<head>
<title>Register</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#000000" text="#FFFFFF"><FORM METHOD=POST ACTION="register.php"><table border=0 cellspacing=1 cellpadding=4 width="100%">
<tr bgcolor="#333366">
<td colspan=2>
<FONT face="verdana, arial, helvetica, sans-serif" size="2"  color="#99cccc" class=thtcolor><b>Registration: Required Information </b></font><FONT face="verdana, arial, helvetica, sans-serif" size="1"  color="#99cccc" class=thtcolor>All fields are required.  Please note that passwords are case sensitive.</font></td>
</tr>

<tr bgcolor="#000033">

<TD><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>User Name:</B></font></TD>
<TD><INPUT TYPE="TEXT" NAME="username" SIZE=25 MAXLENGTH=25>
</TD>
</TR>

<TR bgcolor="#111144">
<TD><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>Password:</B></font></TD>
<TD><INPUT TYPE="PASSWORD" NAME="password" SIZE=25 MAXLENGTH=15> </TD></TR>

<TR bgcolor="#000033">
<TD><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>Email:</B></font><br>
<FONT face="verdana, arial, helvetica, sans-serif" size="1" >Please enter a valid email address. You can choose to hide it below in the preferences section.</font></TD>
<TD><INPUT TYPE="TEXT" NAME="email" SIZE=25 MAXLENGTH=50>
</TD>
</TR>

<tr bgcolor="#333366">
<td colspan=2>
<FONT face="verdana, arial, helvetica, sans-serif" size="2"  color="#99cccc" class=thtcolor><b>Optional Information </b></font><FONT face="verdana, arial, helvetica, sans-serif" size="1"  color="#99cccc" class=thtcolor>All information will be viewable by other Tribalwar Forums members.</font>
</td></tr>

<TR bgcolor="#111144">
<TD><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>Homepage:</B></font></TD>
<TD><INPUT TYPE="TEXT" NAME="homepage" VALUE="http://" SIZE=25 MAXLENGTH=100>
</TD></tr>

<TR bgcolor="#000033">
<TD><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>ICQ Number:</B></font></TD>
<TD><INPUT TYPE="TEXT" NAME="icq" SIZE=25 MAXLENGTH=20>
</TD></tr>

<tr bgcolor="#111144">
<td>
<B><FONT face="verdana, arial, helvetica, sans-serif" size="2" >AOL Instant Messenger Handle:</font></B>
</td>
<td>
<INPUT TYPE="TEXT" NAME="aim" SIZE=25 MAXLENGTH=20>
</td></tr>

<tr bgcolor="#000033">
<td>
<B><FONT face="verdana, arial, helvetica, sans-serif" size="2" >Yahoo Messenger Handle:</font></B>
</td>
<td>
<INPUT TYPE="TEXT" NAME="yahoo" SIZE=25 MAXLENGTH=20>
</td></tr>

<tr bgcolor="#333366">
<td colspan=2>
<FONT face="verdana, arial, helvetica, sans-serif" size="2"  color="#99cccc"><b>Preferences</b></font></td>
</tr>

<TR bgcolor="#111144">
<TD><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>Allow Bulletin Board Administrators and Moderators To Send You Email Notices?</B></font></TD>
<TD><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><INPUT TYPE="RADIO" NAME="allowmail" VALUE="yes" CHECKED> yes <INPUT TYPE="RADIO" NAME="allowmail" VALUE="no"> no</font>
</TD></tr>

<tr bgcolor="#000033">
<TD valign=top><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>Invisible Mode:</b><br>
<FONT face="verdana, arial, helvetica, sans-serif" size="1" >Selecting yes allows you to surf the forums without appearing in the 'Logged In Users' list.</font>
</font></TD>
<TD valign=top><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><INPUT TYPE="RADIO" NAME="invisible" VALUE="yes" > yes <INPUT TYPE="RADIO" NAME="invisible" VALUE="no" checked>
 no</font></TD>
</TR>

<tr bgcolor="#111144">
<TD valign=top><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><B>Hide Email Address:</b><br>
<FONT face="verdana, arial, helvetica, sans-serif" size="1" >Clicking yes hides your email address in your public profile, so that it is not accessible by other users.</font>
</font></TD>
<TD valign=top><FONT face="verdana, arial, helvetica, sans-serif" size="2" ><INPUT TYPE="RADIO" NAME="showemail" VALUE="no" > yes <INPUT TYPE="RADIO" NAME="showemail" VALUE="yes" checked>
 no</font></TD>
</TR>
</TABLE>

<p align="center">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="addmember">
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit">
<INPUT TYPE="RESET" NAME="Reset" VALUE="Reset">
</p>
</form>

</body>
</html>
works for me. what i like about it, is that if i want to i can just add more function calls to 'posttohost' utilizing whatever vars the registration for any given form needs (the above is for vb2.0, and it auto-sets some things to default, so the base register page is more generic) but you can modify it easilly to work for most anything
Reply With Quote
  #9  
Old 03-04-2001, 08:57 PM
Guest
 
Posts: n/a
Default

Awesome, thank you so much. Since I'm no pro, I'll need a few days to check it out. Wish me luck!!

Thanks again,
Reply With Quote
  #10  
Old 03-04-2001, 09:04 PM
Guest
 
Posts: n/a
Default

cool, thanks, that is great.
Reply With Quote
Reply

Thread Tools

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 01:19 AM.


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.04185 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (1)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)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
  • 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