PDA

View Full Version : Signup from non-VB page


dreamache
05-01-2004, 05:05 PM
I looked around hard and only found one script and it only worked with vb 2.x... I have vb3 and I need this ability, I don't want to have to make my members signup on my site AND the messageboard seperately. I'm sure it exists, just having a hard time finding it ;)

If anyone could point me to the correct script/link that'll help me do this I'll give ya a free acct on my site. I won't paste it here for spamming reasons, but for the first person who can help me out on that I'll PM ya the link to the site and you can choose to signup if ya want and i'll flag the acct as a full free acct.

Thanks.

Pseudomizer
05-01-2004, 10:05 PM
I looked around hard and only found one script and it only worked with vb 2.x... I have vb3 and I need this ability, I don't want to have to make my members signup on my site AND the messageboard seperately. I'm sure it exists, just having a hard time finding it ;)

If anyone could point me to the correct script/link that'll help me do this I'll give ya a free acct on my site. I won't paste it here for spamming reasons, but for the first person who can help me out on that I'll PM ya the link to the site and you can choose to signup if ya want and i'll flag the acct as a full free acct.

Thanks.

Hi,

this is not so easy. Do you have 2 databases for login ? Then it will be difficult. Or do you want to implement a login for a specific page ? Please specify and we will see what we can do here for you.

Cheers,

Liquid1ce
05-02-2004, 01:08 AM
Im working on one atm
But im making it so it posts on a hidden forum the data thas submitted
& a random pass it sent to the user should their reg be accepted

dreamache
05-02-2004, 07:24 AM
well the form they signup from my site, already asks them the necessary information that I want to store in the vbulletin database.. so all I need is just the queries necessary to create a new user when they create their account with me... I dont want anything fancy like a special login page or whatever. my script will just tell them within the email it sends out, that they can login with their selected username/password on the normal community login form.

Liquid1ce
05-02-2004, 07:27 AM
hmmm i made a page but the data i want posted on a forum say id 20
I tried using this code to submit that data

$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "thread(threadid, title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible, attach, similar)
VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','0')");

But i just get a error sayin
Fatal error: Call to a member function on a non-object in /var/www/signup.php on line 172

line 172 = $DB_site->query("
on the above code
Any help>?

Liquid1ce
05-02-2004, 07:56 AM
This is all the code i use
& im trying to get it so it posts the info into a forum id XXX

$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "thread(threadid, title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible, attach, similar)
VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','0')");


$threadid=$DB_site->insert_id();


$DB_site->query("INSERT INTO post (
postid,threadid,title,username,userid,dateline,att achmentid,pagetext,allowsmilie,showsignature,ipadd ress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','0','".addslashes($message)."','1','1','','0','1')");


$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($forumid)");


all i get is a error see above post

Pseudomizer
05-02-2004, 10:53 AM
This is all the code i use
& im trying to get it so it posts the info into a forum id XXX

$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "thread(threadid, title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible, attach, similar)
VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','0')");


$threadid=$DB_site->insert_id();


$DB_site->query("INSERT INTO post (
postid,threadid,title,username,userid,dateline,att achmentid,pagetext,allowsmilie,showsignature,ipadd ress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','0','".addslashes($message)."','1','1','','0','1')");


$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($forumid)");


all i get is a error see above post

Hi,

if this is really ALL your code in your non-vb page then you have to include global.php to get this running. It does not know what $DBsite is.

Cheers,

Liquid1ce
05-02-2004, 11:40 AM
ok done that & i get this error

Invalid SQL: INSERT INTO thread(threadid, title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible, attach, similar) VALUES (NULL,'TEST user','1083501486','42','1','0','RegSystem','23',' RegSystem','1083501486','1','1','0')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Now This data is put onto a forum for admin views only I use

$forumid = 42;
$postusername = "RegSystem";
$bbuserinfo[userid] = "23";
$iconid = "1";
$visible = "1";
For The Bot/Poster
Anyone see what else is wrong?

Pseudomizer
05-02-2004, 02:07 PM
ok done that & i get this error

Invalid SQL: INSERT INTO thread(threadid, title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible, attach, similar) VALUES (NULL,'TEST user','1083501486','42','1','0','RegSystem','23',' RegSystem','1083501486','1','1','0')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Now This data is put onto a forum for admin views only I use

$forumid = 42;
$postusername = "RegSystem";
$bbuserinfo[userid] = "23";
$iconid = "1";
$visible = "1";
For The Bot/Poster
Anyone see what else is wrong?

The SQL error message tells you exactly where the problem lies. Your thread table has either more or less entries then your statement.

Please try:


Select * from thread limit 1;


And compare what you see and what you want to put into.

Cheers,