The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Detecting User's ID
Hello,
I'm having sort of a problem with the following - I created a custom user field and linked a JavaScript to it, however, when it opens, it doesn't recognize the user. Anybody any ideas? Code:
<vb:if condition="$social['msn']"> <a href="javascript://" onclick="imwindow('msn', '{vb:raw userinfo.userid}', 440, 270); return false;"><img src="images/postbit_social/msn.png" onmouseover="this.src='images/postbit_social/msn_a.png'" onmouseout="this.src='images/postbit_social/msn.png'" alt="{vb:rawphrase send_message_via_msn_to_x, {vb:raw post.username}}." /></a> </vb:if> Will be grateful for any ideas. Best Regards, ~tEh'P?r4d0x |
#2
|
|||
|
|||
What does it look like when you view the page html source? You have {vb:raw post.username} near the end, maybe it should be {vb:raw userinfo.username} .
|
#3
|
|||
|
|||
Quote:
HTML: Code:
<a href="javascript://" onclick="imwindow('msn', '', 440, 270); return false;"><img src="images/postbit_social/msn.png" onmouseover="this.src='images/postbit_social/msn_a.png'" onmouseout="this.src='images/postbit_social/msn.png'" alt="Send a message via MSN to Admin." /></a> The "{vb:raw userinfo.userid}" displays as (, '',), which indicates my problem. The "{vb:raw userinfo.username}" is fine, it's just a Var for this yellow Windows box, when you mouse the icon in postbit, it displays the: "Send a message via MSN to *Your Forum Username*." Any ideas on how the vBulletin .js or the code recognizes the user? When I'm using custom "User Profile Fields", the mod itself was using {vb:raw social.facebook} for example, but it registered its own template and the concept was to simply redirect and I want to modify parts of it to pop out. Not sure, if you can still follow this. Well, thanks for some more suggestions anyway, ~tEh'P?r4d0x |
#4
|
|||
|
|||
OK, it looks like the phrase in the alt tag is showing the user as "Admin", so maybe what you want to use for the userid is {vb:raw post.userid} (is this going in the postbit? If so then that's definitely what you want).
|
#5
|
|||
|
|||
Quote:
Many thanks, ~tEh'P?r4d0x |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|