PDA

View Full Version : MSN & .js - New Window


ssdevious
03-15-2012, 08:10 PM
Hello,

after 3 days of desperate attempts to explain vBulletin support staff that I don't need any help with writing any code, only a simple advice, where is located script and code to MSN / Yahoo / AIM pop-out window, I've decided to give up and create a topic here.

User's postbit --> small MSN icon --> you click it --> new, small window pops out...

This is what I want to figure out, how is this being done. Apparently a .js, right? But which .js and where is located the appropriate file, containing the code, which makes it attached to user profile fields - to those 4 default ones.

Thanks,
~tEh'Pâr4d0x

Iain M
03-15-2012, 09:05 PM
Hey Paradox,

The function is in clientscript/vbulletin-core.js, called imwindow. (around line 1253)

The templates are:
http://img14.imageshack.us/img14/7098/22743df218ad45b38a2d097.png

ssdevious
03-15-2012, 09:32 PM
Oi, thanks again.

I will play a bit with it, see, if I can port it into my new "User Profile Fields".

Best Regards,
~tEh'P?r4d0x

--------------- Added 1331911261 at 1331911261 ---------------

I've got one additional question.

"{vb:raw block_data.imbits}" - how come that the .js is somewhat automatically linked to this?

It seems to have a problem with getting user's id in my 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>


Giving me:
No User specified. If you followed a valid link, please notify the administrator


Thanks in advance,
~tEh'P?r4d0x