The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Is there anyway that I can put some sort of code on the pages of my actual site (not the message boards) so that it adds each person to the # of users online? And then put something on each page of my site:
"XXX Users Currently Online" I think it would be pretty easy to do something like this, but if anybody can let me know, I would appreciate it a lot. |
#2
|
||||
|
||||
I believe to do this all you need to do is do:
PHP Code:
|
#3
|
|||
|
|||
I just tried that and it's not working.....Is it just me, or does that not work?
|
#4
|
||||
|
||||
What doesn't work about it?
|
#5
|
||||
|
||||
We include a pseudo-total on many of our pages at SitePoint. We do it by running a cron job every 5 minutes and putting the results into a text file. We then include that text file where ever we want the information to display. Mainly in the various active topic sections throughout the network. This text file is stored in our admin directory as is the code to generate it.
Here is the script we use: PHP Code:
|
#6
|
|||
|
|||
wluke, thanks for that script, but that is not exactly what I was looking for, although part of it. Let me give an example.
Say you head to my site, systemlogic.net to read a review. That user is not in the forums, but I would like them to be added to the online list (so if they are not registered or logged on they are guests). So basically to add the users online functionality to the actual site. And then with that, do what you did to include the total number of users online. This seems like it would be possible by just doing whatever kind PHP code or cookie code onto each page that I want to be included, right? |
#7
|
|||
|
|||
James gave you the code to do it.
I need to know how do you put a PHP code such as James of Luke's, into a .shtml file? |
#8
|
|||
|
|||
Alright well I added global.php and saw no difference. And then I tried putting some stuff from index.php in but I kept getting errors. So I have no clue what sort of PHP code to put, so if anybody that knows how to code, could you help me out?
Also, I don't think it's possible to parse PHP in a .shtml file right? |
#9
|
||||
|
||||
<!--#include file="file.php"-->
That will include the file.php and parse whatever is in file.php. (you would put this in a .shtm or .shtml file). |
#10
|
|||
|
|||
Alright I put this on some pages:
PHP Code:
Is this wrong? Because it still doesn't show all the other users on the main page of the forum. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|