![]() |
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']"> Will be grateful for any ideas. Best Regards, ~tEh'P?r4d0x |
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} .
|
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 |
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).
|
Quote:
Many thanks, ~tEh'P?r4d0x |
All times are GMT. The time now is 04:46 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|