The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
userid for posts/attachments
Ok, I am trying to take a watermark modification that creates a watermark on the hook of attachment_display. The mod works fine the way it is, but I would like to add the posting username to the watermark on the fly. On our previous forum, I was able to write the code so it did it upon upload. Due to technical (security) reasons it messes up the image doing it this way... so I figured doing it upon view will work.
Here is my issue. I need the way to pull the userid variable for the post... so that I can create the watermark for that user. I have tried everything I can think of, and nothing yet has worked. What would the variable be for this??? |
#2
|
||||
|
||||
The name of the variable depends on what hook location you are using (which you didn't state). You should find the hook in the php pages and look at the variable names called around it.
|
#3
|
|||
|
|||
I did state the hook name: attachement_display
|
#4
|
||||
|
||||
Ah, it sounded like you were modifying it and moving it to another hook location.
If you find the hook in the code (make sure you spell it correctly ), you'll see that they make reference to $attachmentinfo['userid']. Is that the userid you were looking for? |
#5
|
|||
|
|||
I believe so... I will try it :-)
--------------- Added [DATE]1251052965[/DATE] at [TIME]1251052965[/TIME] --------------- AWESOME!! That did the trick... THANK YOU VERY MUCH! --------------- Added [DATE]1251062725[/DATE] at [TIME]1251062725[/TIME] --------------- Couple more questions... What file did you find this info in? (not sure where to find hooks in the code :-) ) Also, would the username be $attachmentinfo['username'] ?? --------------- Added [DATE]1251069745[/DATE] at [TIME]1251069745[/TIME] --------------- Also... maybe the date the post was created (or attachment was created) --------------- Added [DATE]1251085631[/DATE] at [TIME]1251085631[/TIME] --------------- Ok.... I found there is no username listed (also found the date....) I will start a new thread on a quick way to obtain the username from userid. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|