The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Auto Insert Username
I'm making a timeslip database for one of my car sites. On the page where a user can submit their own timeslip I would like the "driver" name field to automatically fill in with the persons screen name from the vbulletin forum. Is this possible? Can anyone shed some light on how I would go about this? In the displayed results I would also like to have the username linked to their profile as well if possible.
|
#2
|
||||
|
||||
Will this file be in your vB directory? If so:
Make sure your php file contains this: Code:
require('./global.php'); Code:
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid">$bbuserinfo[username]</a> |
#3
|
|||
|
|||
Ok, I added that, but when I display the results it is just showing $bbuserinfo[username]. Now does it matter if i'm using a different database for this hack apart from my vbulletin db? Should I just go ahead and add the contents of this database to my vb? Maybe that is the problem
|
#4
|
|||
|
|||
btw, sorry i'm pretty new to all of this
|
#5
|
||||
|
||||
The file has to be in PHP format (.PHP) also, if you arent using HTML in the file, you use
PHP Code:
PHP Code:
|
#6
|
|||
|
|||
here are the contents of my timeslipadd.php which is the part that actually adds the timeslip info to the database. The part that i'm trying to get to display the username is "DRIVER"
PHP Code:
|
#7
|
|||
|
|||
Then this is the main file that displays the results (I haven't worked on it too much).
PHP Code:
|
#8
|
||||
|
||||
Apologies but I thought you were doing something else, so my code won't work.
|
#9
|
|||
|
|||
Not a problem. That's why I just went ahead and put the code up so you guys know what i'm trying to do
|
#10
|
|||
|
|||
Ok, so when I use
PHP Code:
http://www.mywebsite.com/vbulletin/m...etinfo&userid= it leaves the userid off from what I can tell. When I use PHP Code:
$bbuserinfo[username] Which then links to : http://www.mywebsite.com/vbulletin/member.php?s=$session[sessionhash]&action=getinfo&userid=$userid which isn't correct. Any idea's? I'm trying everything I can think of. I plan to just use the echo command to display the username on the timeslipadd page, then a hidden form to actually insert into the database, or can I actually use an insert command to get the username into that field at the same time they submit the rest of teh data via the form? Thanks for all the help guys. I think we are close |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|