PDA

View Full Version : Update the "Who's Online" viewing location for new PHP files & Hacks


!!!
25 Nov 2002, 00:01
This is simple, and I apologize for it being a pathetic one...but it's useful.

Open up online.php (in your root folder), and search for this code:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Place below it the following code:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



MAKE SURE YOU REPLACE "TITLEOFPAGE" WITH THE NAME OF THE PAGE (JUST LETTERS; NO FANCY CHARACTERS OR SPACES) -- a good idea might be to end it with "funfun" or something so that you don't replicate an already existing title.

The "DESCRIPTION OF PAGE..." part will be what shows up in the location menu on the "Who's Online" page.

Now, to add the final altering to make the whole thing work, find:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



After it, add:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Make sure you replace "TITLEOFPAGE" with the one you used above. Then, replace "NAMEOFPHPFILE" with the name of the file that the viewer is actually at.

I did it on my boards for "toplist.php" & "attach.php." Their codes were:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



and



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



I'm going to do it for the shoutbox as well, but I think you get the idea. So, have fun.

Link14716
25 Nov 2002, 00:07
I personally consider this more of a reference than a hack. But hey, it qaulifies. ;)

Erwin
25 Nov 2002, 00:09
Or you can just install Firefly's "Who's Online Location via Admin CP" hack, and do all this via your Admin CP without needing to hack your online.php each time you have a new file. :)

LOD-squa
25 Nov 2002, 00:10
I knew about this but it's a good idea to tell users how to do it.

Link14716
25 Nov 2002, 01:22
Originally posted by Erwin
Or you can just install Firefly's "Who's Online Location via Admin CP" hack, and do all this via your Admin CP without needing to hack your online.php each time you have a new file. :)

I prefer hand-editing the file to tell you the truth. That way I have more control over it ;)

zajako
25 Nov 2002, 16:21
hand editing something like this is only 2 lines that need not be custminzed, otehr than the name, so fireflys hack is rather good even if you like to have more control.

Brad
25 Nov 2002, 17:49
Fireflys hack would never work for me, so ive always done it by hand.

SpeedStreet
26 Nov 2002, 16:26
Im in agreement with Anime-Loo. For quick and dirty and easy, say if you only have one page or so to add, this is a useful tool. Thanks!

John
27 Nov 2002, 23:43
This method is great when you need to add different names for different GET strings :)