Print Page | Close Window

Custom Pages in Active Users

Printed From: S2H.co.uk
Category: Web Wiz Forums
Forum Name: Modifications Support
Forum Description: Support for modifications and add-ons for Web Wiz Forums from S2H.
URL: http://www.s2h.co.uk/forum/forum_posts.asp?TID=182
Printed Date: 24 Apr 2024 at 6:44am


Topic: Custom Pages in Active Users
Posted By: JohnLug
Subject: Custom Pages in Active Users
Date Posted: 25 Jun 2010 at 1:37pm
Can't seem to get this working in WWF 9.68
 
Trying to pull pages from other folders and nothing shws in Active Users.
 
No errors either.
This is what I used...
 
<!-- #include virtual="/mb/common.asp" -->
<%
'If active users is enabled update the active users application array
If blnActiveUsers Then
 'Call active users function
 saryActiveUsers = activeUsers("", test, "test.asp", 0)
End If
%>



Replies:
Posted By: Matt
Date Posted: 26 Jun 2010 at 10:44am
Is that the exact code that you have in your page?

If so, you will need quote tags around the second parameter, as you can see in the ../wwf/tips/intergration/custom-pages-in-active-users.asp - Custom Pages in Active Users tutorial.

Like so:
<!-- #include virtual="/mb/common.asp" -->
<%
'If active users is enabled update the active users application array
If blnActiveUsers Then
 'Call active users function
 saryActiveUsers = activeUsers("", "test", "test.asp", 0)
End If
%>


Also, you will not be able to see this working if you are looking at the custom page and Active Users page on the same computer, or the same internal network. Even with different browsers.

As the Active Users function will overwrite the custom page entry with the Active Users page entry.


Posted By: JohnLug
Date Posted: 26 Jun 2010 at 1:22pm
I have two computers on two different IP addresses. :)
 
Weird, the script works if it's in the same folder.
But if I move it to a dfferent folder, it doesn't.
 
Example..
folder/sub/test.asp  -  shows in Active Users
folder2/sub/test.asp  -  does not show in Active Users


Posted By: Matt
Date Posted: 27 Jun 2010 at 1:09pm
Im not sure about that.

What are your cookie settings in the "includes/setup_options_inc.asp" file?


Posted By: JohnLug
Date Posted: 27 Jun 2010 at 1:35pm
I've tried it both of these ways now...
 
strCookiePath = "/mb/"
and
 
strCookiePath = Left(Request.ServerVariables("HTTP_URL"), InstrRev(Request.ServerVariables("HTTP_URL"), "/"))


Posted By: Matt
Date Posted: 27 Jun 2010 at 3:48pm
try simply:

strCookiePath = "/"


Posted By: JohnLug
Date Posted: 27 Jun 2010 at 3:58pm
But my Forum is in a sub folder, not the root.


Posted By: JohnLug
Date Posted: 27 Jun 2010 at 4:27pm
BTW, also tried your suggestion, same thing


Posted By: JohnLug
Date Posted: 28 Jun 2010 at 3:47am
Actually tired your suggestion and had to leave for a couple hours and buy did I catch heat!!
Using " / " messed everything up Dead
People couldn't post or anything.
Not your fault, I should have changed it back. Confused
 
Still would like to get this to work


Posted By: Matt
Date Posted: 02 Jul 2010 at 2:01pm

Im not sure if the Active Users function works off the cookies or not, but i know that if you try to use, say the login function in an area outside of your forums folder, it will fail as by default the cookie is set for the forum folder.

I generally set the cookie to be "/" so that it will work anywhere on my site, for example on this site there are sections which require a user to be logged in.

The reason your users are unable to post maybe due to the conflict in cookies, as they will have on for the forum location ("/mb/"?) and for the root folder ("/").

To fix this, users will either have to remove all their cookies (for your site at the very least)
or log out and then back in again - though I dont know if that option would correct it.



Print Page | Close Window