vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to make user tooltips work with plugins (https://vborg.vbsupport.ru/showthread.php?t=104996)

BenSkiddle 01-10-2006 06:32 PM

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


All times are GMT. The time now is 05:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01525 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete