News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Using SMF code to help external site

Started by jdispensa, October 16, 2006, 02:21:42 PM

Previous topic - Next topic

jdispensa

I want to use the code inside SMF to help with the whole rest of the site.
Basicaly I want to use the ability to show the number of online viewers and increment the count... from outside of the forum.
I have included the ssi.php in the php page and the code <?php ssi_logOnline(); ?>

Kindred

yes?    You have the way to do it...  use the various SSI functions...

Quote from: jdispensa on October 16, 2006, 02:21:42 PM
I want to use the code inside SMF to help with the whole rest of the site.
Basicaly I want to use the ability to show the number of online viewers and increment the count... from outside of the forum.
I have included the ssi.php in the php page and the code <?php ssi_logOnline(); ?>


Doing that should show the online users...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jdispensa

Thanks for the quick response. The count only seems to show forum hits not the general website. I would like to see the pages they are on inside the admin page of the forum.
such as - Forum
  Who's Online
User   Time    Action

admin (83.147.xxx.xxx)   08:15:44 PM   Viewing Who's Online.
Guest (66.249.66.47)   07:58:41 PM   Viewing the board index of Forum.
Guest (66.249.65.142)   07:43:05 PM   Viewing the board index of Forum.
Guest (192.168.1.239)   07:21:19 PM   Viewing the board index of Forum.
Pages: [1]
But from external pages of the site itself.
To do this properly I would need to declare to the SMF a name of the page they are on, and to increment it.
I am using 1.1 rc3 at the moment.
I do see the hits but only for the forum. IE if I put the code on our main index.php the online hits do not change for the smf.
www.gracefellowship.ie is the site, hxxp:www.gracefellowship.ie/grace/index.php [nonactive] is the main index page.
Any help would be greatly appreciated and just to let you know we would purchase this when we get it working 100% I have tried many many others and this is by far one of the best I have seen. I am also just tired of trying to get online users to show properly and my own code attempts were too buggy. So again.. thanks in advance for help!

Kindred

1- yes. The SMF who's online only shows people who are logged in to SMF.  That's the nature of it...   It can't track sites/pages outside of SMF.

2- Showing the actual LOCATION of someone is slightly more difficult, but you can probably steal some code from the who.template.php


however, this will still not track people's connections to any page on the site that is NOT part of SMF...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: