PDA

View Full Version : Extending Who's Online


reefland
06-01-2003, 09:41 PM
Hi All!

I have been integrating my site with our forums and have a questions regarding WOL. It is easy enough to add another page into the online.php file but how can I add multiple pages into one case? The purpose is for a featured member series on my site and instead of adding a new case for each featured member page (once per month) I would like to be able to add them into one case.

Here is the current code:
case 'featured603.php':
$userinfo[activity] = 'currentfeature';
break;

And:

case 'currentfeature':
$userinfo[where] = "Viewing HRG's <a href='URL.php?s=$session[sessionhash]'>Featured Member</a>";
break;

Can I add multiple files like this:
case 'featured603.php, feature703':
$userinfo[activity] = 'currentfeature';
break;

Or would I have to add ianother way? How would that be? I am just trying to prevent from having to add the two codes each time I add a new featured member.

My second question is about using the case for index.php. Obviously my sites homepage and forum both use index.php so how can I separate them in the online.php file so it shows accurately? Currently if someone is on the homepage it says on the forum main index in WOL. would I add it like this:


case '/index.php':
$userinfo[activity] = 'homepage';
break;

Thanks for any help folks; greatly appreciated!
Scott Z.
Reefland.com
Hotroddersgarage.com

Xenon
06-02-2003, 06:52 PM
instead of this:case 'featured603.php, feature703':
$userinfo[activity] = 'currentfeature';
break;

you have to use this:

case 'featured603.php':
case 'feature703.php':
case 'featurexxx.php':
$userinfo[activity] = 'currentfeature';
break;

and so on :)

reefland
06-03-2003, 12:03 AM
Thanks Xenon; I am pretty new to PHP but steadily learning. :)

Any thoughts on this piece and how to get it to display a separate case on WOL than the Forums Main Index?

case 'index.php':
$userinfo[activity] = 'homepage';
break;

Again, this instance is for who is on the home page of the site, not the main page of the forums.

Thanks again,
Scott Z.
Reefland.com
Hotroddersgarage.com

Xenon
06-03-2003, 09:33 AM
AFAIK there are some threads about this, but i don't know if any has solved this problem with easy methods

Brad
06-03-2003, 05:25 PM
Yesterday at 09:03 PM reefland said this in Post #3 (https://vborg.vbsupport.ru/showthread.php?postid=403628#post403628)
Thanks Xenon; I am pretty new to PHP but steadily learning. :)

Any thoughts on this piece and how to get it to display a separate case on WOL than the Forums Main Index?

case 'index.php':
$userinfo[activity] = 'homepage';
break;

Again, this instance is for who is on the home page of the site, not the main page of the forums.

Thanks again,
Scott Z.
Reefland.com
Hotroddersgarage.com

Try using this:

case '../index.php':
$userinfo[activity] = 'homepage';
break;

gmarik
06-11-2003, 10:09 AM
reefland, will you release a hack with that?

reefland
06-14-2003, 07:42 PM
Sorry for the delayed reply here, been real busy with VB3. :) Although none of it is supported here, I thought that I would mention that my site integration has went very well with VB3, in fact, it was much easier. :)

After rebuilding the site using the VB3 code, I still cannot get the homepage to log in WOL correctly, even trying the suggeted code:

case '../index.php':
$userinfo[activity] = 'homepage';
break;


I also tried to hardcode the entire URL in but it displays "Viewing Index" (the forums homepage) no matter what. I guess I'll have to live with that.

As far as releasing a hack, I am no where near good enough for that. Basically what I did was utilized most of the code from the index.php file included with VB3 and built all of my pages using the template system. Obviously it was very nice to use the variables included with the forum home page. Since global.php was included, the session is stored (I guess) and able to track visitors across most of the site. Obviously other 3rd party software utilized doesn't show up but what I have is great I think.

Feel free to check it out if you like, it may be one of the first complete sites ingrated with VB3 although not likely.
http://www.hotroddersgarage.com

If there is anything I can help you out with specifically, I'd be happy to do so or detail how I integrated my site. I still have another one to do.

If anyone has any other ideas on logging the homepage on WOL, I'd be interested in trying them.

Regards,
Scott Z.