The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Im working on customizing my vbulletin so that it will be more of a community script, and i wont use the forum itself.
Ok, i have found a way to give all the users a guestbook each, but i dont know how to do this technicaly. When a user signs up a thread is created, this thread will work as a guestbook for this user. The threadid will be the same as the userid, and therefore it will be easy linking to it from the profile. Now what i need is the mysql quiry for creating a thread, anybody who can help out with that? Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
The query for creating a thread would be easy. What won't be easy is that unless you don't allow any other posts or threads, you're gonna have conflicts from the first user in terms of the threadid. (e.g. If user #2 signs up and there's already 5 threads, does threadid #2 get overwritten?) What would work better is if you added a field to the user table and stored the threadid for each user there. It might not correspond with the user's user #, but it would avoid the conflicts that are guaranteed to arise doing it the way you suggested.
|
|
#3
|
|||
|
|||
|
As i said i wont be using the forums, so there wont be any conflicts.
So can you help me out by writing the quiries and tell me where they should go, because i tried myself and i only got errors. |
|
#4
|
|||
|
|||
|
Sorry, I wasn't reading that carefully.
![]() In register.php, find Code:
// insert custom user fields Code:
$DB_site->query("INSERT INTO thread(threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($username))."\'s Guestbook"','".time()."','FORUMIDHERE','1','0','".addslashes(htmlspecialchars($username))."',NULL,'".addslashes(htmlspecialchars($username))."','".time()."','1','1','0')");
|
|
#5
|
|||
|
|||
|
Thanks, it worked.
|
|
#6
|
|||
|
|||
|
Quote:
|
![]() |
|
|