The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using userid on a Different Page
Hello again,
I've completely written my hack in PHP, and now I'm actually looking to integrate it into vBulletin 3. So far I have created a vBulletin page which executes my php code. However, in order for this to work as intended, I'll to add a link to this page somewhere on thread display. I'll also need to pass the userid of the original poster, the threadid, and the userid of the user who is using this hack. However, I'm not certain how I might accomplish this. Thanks for any help you can provide. |
#2
|
|||
|
|||
When you say thread display do you mean the output of showthread.php? If so, you could edit the template SHOWTHREAD and put in your link, and use $threadinfo[postuserid], $threadinfo[threadid], and $bbuserinfo[userid] for the data you need to pass.
|
#3
|
|||
|
|||
Oops, yes - sorry. I got it mixed up with forum display. Anyway, using those variables, how would I pass the correct data contained in $threadinfo[postuserid] and $threadinfo[threadid] to my PHP file? Thanks for your help so far.
|
#4
|
|||
|
|||
Well, I guess the same way you'd do it for any html, like put the info in the url, or submit a form. For example, you could put this somewhere in the template:
Code:
<a href="myscript.php?threaduser=$threadinfo[postuserid]&threadid=$threadinfo[threadid]&userid=$bbuserinfo[userid]">Link to my script</a> Hopefully I'm understanding what you want to do. ETA: just realized, if you did include global.php in your custom script then you don't need to pass the "current" user's id, you can get it in your script by using $vbulletin->userinfo['userid']; |
#5
|
|||
|
|||
That's exactly what I needed. I just tested it and it works perfectly. Thanks for your help!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|