vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Buddies online/offline on non-vb page (https://vborg.vbsupport.ru/showthread.php?t=49416)

Sebastian 02-26-2003 10:00 PM

Buddies online/offline on non-vb page
 
This hack will allow your members to see when their buddies are online or offline on any page.

To Use:
1) edit variable $path to the path of your forums, including trailing slash at the end.
2) edit variable $path2 to the name of your forum directory.
3) to display on any page add include("/path/to/buddy.php"); to your page.

If you get include errors check you have the correct path to your forums directory
If you get safe mode errors delete: chdir("$path");

Hack information:
If you have no members on your buddies list then "none" appears.
If you do have buddies on your list but they aren't online "none" appears as well.
If you aren't logged in or not registered, nothing appears.

Hack Requirements:
1) some HTML knowledge to edit the way you want the buddies online to appear.

Other information:
Clicking the red X will remove the buddy, just like in the user cpanel.
Clicking the user's name will take you to the Send PM page.

As always, I will support this hack only in this thread.

Cheers :)

Sebastian 02-27-2003 01:59 AM

when a user is online:

Sebastian 02-27-2003 01:59 AM

when a user is offline:

sabret00the 02-27-2003 04:29 PM

nice it just so happens that for what i'm working on this could really come in handy and released at the right time too

Dean C 02-27-2003 05:40 PM

Nice hack Sebastien.

- miSt

sabret00the 02-27-2003 08:48 PM

funny thing, it wouldn't work when i included it, so i c&p'd the data straight into the file, then it said something about it's already got the header and can't include it again and now it's just refusing to work 0_o

Lionel 02-28-2003 03:45 AM

works nicely everywhere... php, shtml... thanks

VeoMorphine 03-01-2003 09:45 PM

I get this error:
Parse error: parse error, unexpected T_STRING in c:\wwwroot\www\buddy.php on line 6

Sebastian 03-01-2003 11:29 PM

@VeoMorphine, line 6 is $path2 = "forums";
I see you are using windows, what did you put for $path?


@sabret00the, if you are including into a .php file that is sending a header then remove these two lines from buddy.php:

PHP Code:

chdir("$path");
require(
"./global.php"); 

and add this to the top of the .php file that you are including buddy.php into, under <?php

if you need more help, post the file that you are adding buddy.php to.

PHP Code:

chdir("/path/to/forums/");
require(
"./global.php");

// rest of your file... 


VeoMorphine 03-02-2003 07:57 PM

Fixed it!

Works great.


All times are GMT. The time now is 10:03 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
  • Page Generation 0.01209 seconds
  • Memory Usage 1,727KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete