Quote:
Originally posted by Kars10
BtW: Here on vborg is a hack where you can have the buddys as a Dropdown on the index.php.
I tested this hack and get about 15 Querys more like without the buddylist...
|
You dont need to query the db for buddy list as its already loaded into the memory when a member logs in.
If you go through buddy list of the member and query the session table for each of the buddies to get their status, this will produce additional queries.
However you can achieve your goal with 1 query with a simple trick: Instead of getting online status of each buddies seperately, get the entire list of visible online members from session table inside global.php, then compare the list with your buddy list to produce online buddy list. This will add 1 query to any vb page and you can use the list in all vb pages by adding it to header, footer etc.