The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
How to make user tooltips work with plugins
Hi
Sorry for double posting this but just realised it was in the wrong forum, and you can't move your posts!! :disappointed: I have worked out a way of getting tooltips with photos working for each member in the 'users currently online' section but could do with a hand putting this into a plugin if possible? http://www.skiddle.com/forum/online.php I've used the online.php file to test it out, and I've worked out the following: The query fetching online members needs to change. For example mine is now (line 185): PHP Code: $allusers = $db->query_read(" SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, user.profilepicrevision, FLOOR((YEAR(NOW()) - YEAR(birthday_search) - (DAYOFYEAR(birthday_search) - DAYOFYEAR(NOW())) / 365)) as age, postcodes.posttown, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM " . TABLE_PREFIX . "session AS session ". iif($vbulletin->options['WOLguests'], " LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid) ", ", " . TABLE_PREFIX . "user AS user") ." LEFT JOIN vb3_userfield ON user.userid=vb3_userfield.userid LEFT JOIN postcodes ON TRIM(UCASE(substring(REPLACE(field10,' ',''),1,length(REPLACE(field10,' ',''))-3 ))) = postcodes.postcode WHERE session.lastactivity > $datecut ". iif(!$vbulletin->options['WOLguests'], " AND session.userid = user.userid", "") ." ORDER BY $sqlsort $sortorder "); As you can see this pulls back a lot more info about the user so we can show this on their tooltip. Then in the 'whosonlinebit' template I add the following to the user's name link: onMouseOver="sktt('$userinfo[musername]','$userinfo[userid]','$userinfo[profilepicrevision]','$userinfo[age]','$userinfo[posttown]','true','false')" onMouseOut='htm()' Now ideally I'd like to: *Not alter the online.php file if possible and just use plugins *Call a function to return the onMouseover string, something like: $usertooltipstr = getUserTT($user) (this returns the onMouseover attributes) *Make it work with the 'whos online' in the main forum homepage any help would be appreciated. I'm a competent coder but not too sure about the new Plugin system!!! BenSkiddle is online now Report Bad Post Edit/Delete Message |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|