Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Active Topics Filter broken?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Active Topics Filter broken?

 Post Reply Post Reply Page  <123>
Author
D__G View Drop Down
Newbie
Newbie


Joined: 07 May 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote D__G Quote  Post ReplyReply Direct Link To This Post Posted: 09 May 2004 at 12:58pm
Ok thanks -boRg-, I will speak to my hosts and see what they can do, and report back. Thanks again
Back to Top
D__G View Drop Down
Newbie
Newbie


Joined: 07 May 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote D__G Quote  Post ReplyReply Direct Link To This Post Posted: 09 May 2004 at 2:29pm

Message from my hosts is that all components/drivers are up to date, and that the machine is restarted weekly.

Anything else you can suggest I check? Please?

Back to Top
D__G View Drop Down
Newbie
Newbie


Joined: 07 May 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote D__G Quote  Post ReplyReply Direct Link To This Post Posted: 09 May 2004 at 5:37pm

Could it be a cookie problem? As far as I understand (I may be wrong ), the database stores time of last login and time of last post, but is there a cookie which is read to indicate also the time you logged in?

 If something is wrong with this cookie, then is it possible that whilst the database records are correct for last login and last user post, if the cookie isnt being read properly or wasnt set properly, then it really wont make a difference what is in the database?

I hope you guys can understand what Im getting at, cos its confusing me!

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 10 May 2004 at 12:36pm
It won't be a cookie problem.

I'm afraid I'm out of options for you to do, it looks like then that something has been altered on the server that means that the active topics feature is not compatiable with the server you are on. The only option left is to move to another server/host that maybe compatible.
Back to Top
D__G View Drop Down
Newbie
Newbie


Joined: 07 May 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote D__G Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2004 at 2:05pm

I hear you -boRg-, I have tried the forum on another site hosted by the same company, and its the same

I have, however found a workaround which restores 90% functionality to active topics, if you could look at it and maybe advise on the last 10%?

active_topics.asp

I have edited the above file and commented out the following lines.

'Initialse the string to display when active topics are shown since
'Select Case intShowTopicsFrom
' Case 1
  'Filter the recorset to leave only active topics since last vists (Filter used for overcome incompatibilty problems between application and database)
'  rsForum.Filter = "Last_entry_date > #" & CDate(Session("dtmLastVisit")) & "#"
' case 2
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("n", -15, Now()) & "#"
' case 3
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("n", -30, Now()) & "#"
' Case 4
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("n", -45, Now()) & "#"
' Case 5
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -1, Now()) & "#"
' Case 6
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -2, Now()) & "#"
' Case 7
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -4, Now()) & "#"
' Case 8
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -6, Now()) & "#"
' Case 9
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -8, Now()) & "#"
' Case 10
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -12, Now()) & "#"
' Case 11
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -16, Now()) & "#"
'End Select

Also I have commented these lines out

' case 2
'  strShowTopicsFrom = strTxtLastFifteenMinutes
'  dblActiveFrom = 1
' case 3
'  strShowTopicsFrom = strTxtLastThirtyMinutes
'  dblActiveFrom = 1
' Case 4
'  strShowTopicsFrom = strTxtLastFortyFiveMinutes
'  dblActiveFrom = 1
' Case 5
'  strShowTopicsFrom = strTxtLastHour
'  dblActiveFrom = 1
' Case 6
'  strShowTopicsFrom = strTxtLastTwoHours
'  dblActiveFrom = 1
' Case 7
'  strShowTopicsFrom = strTxtLastFourHours
'  dblActiveFrom = 1
' Case 8
'  strShowTopicsFrom = strTxtLastSixHours
'  dblActiveFrom = 1
' Case 9
'  strShowTopicsFrom = strTxtLastEightHours
'  dblActiveFrom = 1
' Case 10
'  strShowTopicsFrom = strTxtLastTwelveHours
'  dblActiveFrom = 1
' Case 11
'  strShowTopicsFrom = strTxtLastSixteenHours
'  dblActiveFrom = 1

Case 12
  strShowTopicsFrom = strTxtYesterday
  dblActiveFrom = 1
 Case 13
  strShowTopicsFrom = strTxtLastWeek
  dblActiveFrom = 7
 Case 14
  strShowTopicsFrom = strTxtLastMonth
  dblActiveFrom = 28

and I have inserted these lines in the same place

case 2
  strShowTopicsFrom = strTxtLastFifteenMinutes
  dblActiveFrom = 0.0104166
 case 3
  strShowTopicsFrom = strTxtLastThirtyMinutes
  dblActiveFrom = 0.0208333
 Case 4
  strShowTopicsFrom = strTxtLastFortyFiveMinutes
  dblActiveFrom = 0.0312498
 Case 5
  strShowTopicsFrom = strTxtLastHour
  dblActiveFrom = 0.0416666
 Case 6
  strShowTopicsFrom = strTxtLastTwoHours
  dblActiveFrom = 0.0833333
 Case 7
  strShowTopicsFrom = strTxtLastFourHours
  dblActiveFrom = 0.1666666
 Case 8
  strShowTopicsFrom = strTxtLastSixHours
  dblActiveFrom = 0.2499999
 Case 9
  strShowTopicsFrom = strTxtLastEightHours
  dblActiveFrom = 0.3333332
 Case 10
  strShowTopicsFrom = strTxtLastTwelveHours
  dblActiveFrom = 0.4999998
 Case 11
  strShowTopicsFrom = strTxtLastSixteenHours
  dblActiveFrom = 0.6666664
 Case 12
  strShowTopicsFrom = strTxtYesterday
  dblActiveFrom = 1
 Case 13
  strShowTopicsFrom = strTxtLastWeek
  dblActiveFrom = 7
 Case 14
  strShowTopicsFrom = strTxtLastMonth
  dblActiveFrom = 28

I did this because I found that no active topic filters worked except "Yesterday", "Last week" and "last month". By trial an error I found the bit in the code which seemed to relate to those filters, ie 1 day, 7 days and 28 days, then I edited the code to show each case as a decimal fraction of one day.

EG. the line

case 2
 strShowTopicsFrom = strTxtLastFifteenMinutes
 dblActiveFrom = 1

became

case 2
  strShowTopicsFrom = strTxtLastFifteenMinutes
  dblActiveFrom = 0.0104166

This seems to work for all except active topics since last login (which I havent touched, as I cant work out how it works)

Here is the code for case 1 (topics since last login)

Case 1
  strShowTopicsFrom = strTxtLastVisitOn & " " & DateFormat(Session("dtmLastVisit"), saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(Session("dtmLastVisit"), saryDateTimeData)
  dblActiveFrom = DateDiff("d", Session("dtmLastVisit"), Now()) + 1

There is obviously something here, I reckon that my server/host doesnt understand, do you have an alternative I could use in place of this, so I can get active topics since last login working and get that final 10% functionality back?

Also, do you think these changes are ok, or have I compromised something else by doing them, and maybe risk some problem in future?

I ask this second question because some of the lines I commented out include the text..

  'Filter the recorset to leave only active topics since last vists (Filter used for overcome incompatibilty problems between application and database)

What incompatibility problems am I risking?

Hopefully, using this limited information, you may be able to suggest something else to me. Also I apologise to everyone about the length of this post and possibly it's somewhat confusing layout. Hope you can understand what I've done, and what my aim is.

Thanks again to everyone for taking the time/trouble to read (and hopefully reply!)

 

Back to Top
D__G View Drop Down
Newbie
Newbie


Joined: 07 May 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote D__G Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2004 at 4:19pm

Right - success, further to my last post when I had everything apart from active topics since "lastlogin". I have changed the code in active_topics.asp for case 1 from this :

'Initialse the string to display when active topics are shown since
Select Case intShowTopicsFrom
 Case 1
  strShowTopicsFrom = strTxtLastVisitOn & " " & DateFormat(Session("dtmLastVisit"), saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(Session("dtmLastVisit"), saryDateTimeData)
 dblActiveFrom = DateDiff("d", Session("dtmLastVisit"), Now()) + 1
      

to this :

'Initialse the string to display when active topics are shown since
dim timediff
Select Case intShowTopicsFrom
 Case 1
  strShowTopicsFrom = strTxtLastVisitOn & " " & DateFormat(Session("dtmLastVisit"), saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(Session("dtmLastVisit"), saryDateTimeData)
 ' dblActiveFrom = DateDiff("d", Session("dtmLastVisit"), Now()) + 1
      
        timediff = DateDiff("n", Session("dtmLastVisit"), Now())
  dblActiveFrom = (timediff / 1440)

Basically it seems to get the difference in minutes between the servers time and the last login time, then divides it by 1440 (As there are 1440 minutes in 1 day). This is in line with my other revisions to include fractions in the other cases to reflect times

IE to get 15 mins, i divided 15 by total number of minutes in 1 day (1440) and that gives 0.0104166, and so on..

I am no expert on this, far from it, but by trial and error, these modifications seem to work.

Here are the modified sections of active_topics.asp that I have changed, which now seem to work fully, as I said in my last post, I'd like comments from anyone who knows, about how this may affect ongoing functionality of my forum and what incompatibility problems may occur since I have commented out the whole section which refers to filtering the recordset to avoid compatibility probs between application and database.

1st part:

'Initialse the string to display when active topics are shown since
dim timediff
Select Case intShowTopicsFrom
 Case 1
  strShowTopicsFrom = strTxtLastVisitOn & " " & DateFormat(Session("dtmLastVisit"), saryDateTimeData) & " " & strTxtAt & " " & TimeFormat(Session("dtmLastVisit"), saryDateTimeData)
 ' dblActiveFrom = DateDiff("d", Session("dtmLastVisit"), Now()) + 1
      
        timediff = DateDiff("n", Session("dtmLastVisit"), Now())
  dblActiveFrom = (timediff / 1440)
' case 2
'  strShowTopicsFrom = strTxtLastFifteenMinutes
'  dblActiveFrom = 1
' case 3
'  strShowTopicsFrom = strTxtLastThirtyMinutes
'  dblActiveFrom = 1
' Case 4
'  strShowTopicsFrom = strTxtLastFortyFiveMinutes
'  dblActiveFrom = 1
' Case 5
'  strShowTopicsFrom = strTxtLastHour
'  dblActiveFrom = 1
' Case 6
'  strShowTopicsFrom = strTxtLastTwoHours
'  dblActiveFrom = 1
' Case 7
'  strShowTopicsFrom = strTxtLastFourHours
'  dblActiveFrom = 1
' Case 8
'  strShowTopicsFrom = strTxtLastSixHours
'  dblActiveFrom = 1
' Case 9
'  strShowTopicsFrom = strTxtLastEightHours
'  dblActiveFrom = 1
' Case 10
'  strShowTopicsFrom = strTxtLastTwelveHours
'  dblActiveFrom = 1
' Case 11
'  strShowTopicsFrom = strTxtLastSixteenHours
'  dblActiveFrom = 1
case 2
  strShowTopicsFrom = strTxtLastFifteenMinutes
  dblActiveFrom = 0.0104166
 case 3
  strShowTopicsFrom = strTxtLastThirtyMinutes
  dblActiveFrom = 0.0208333
 Case 4
  strShowTopicsFrom = strTxtLastFortyFiveMinutes
  dblActiveFrom = 0.0312498
 Case 5
  strShowTopicsFrom = strTxtLastHour
  dblActiveFrom = 0.0416666
 Case 6
  strShowTopicsFrom = strTxtLastTwoHours
  dblActiveFrom = 0.0833333
 Case 7
  strShowTopicsFrom = strTxtLastFourHours
  dblActiveFrom = 0.1666666
 Case 8
  strShowTopicsFrom = strTxtLastSixHours
  dblActiveFrom = 0.2499999
 Case 9
  strShowTopicsFrom = strTxtLastEightHours
  dblActiveFrom = 0.3333332
 Case 10
  strShowTopicsFrom = strTxtLastTwelveHours
  dblActiveFrom = 0.4999998
 Case 11
  strShowTopicsFrom = strTxtLastSixteenHours
  dblActiveFrom = 0.6666664
 Case 12
  strShowTopicsFrom = strTxtYesterday
  dblActiveFrom = 1
 Case 13
  strShowTopicsFrom = strTxtLastWeek
  dblActiveFrom = 7
 Case 14
  strShowTopicsFrom = strTxtLastMonth
  dblActiveFrom = 28
End Select

2nd part :

'Initialse the string to display when active topics are shown since
'Select Case intShowTopicsFrom
' Case 1
  'Filter the recorset to leave only active topics since last vists (Filter used for overcome incompatibilty problems between application and database)
'  rsForum.Filter = "Last_entry_date > #" & CDate(Session("dtmLastVisit")) & "#"
' case 2
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("n", -15, Now()) & "#"
' case 3
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("n", -30, Now()) & "#"
' Case 4
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("n", -45, Now()) & "#"
' Case 5
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -1, Now()) & "#"
' Case 6
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -2, Now()) & "#"
' Case 7
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -4, Now()) & "#"
' Case 8
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -6, Now()) & "#"
' Case 9
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -8, Now()) & "#"
' Case 10
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -12, Now()) & "#"
' Case 11
'  rsForum.Filter = "Last_entry_date > #" & DateAdd("h", -16, Now()) & "#"
'End Select

Back to Top
D__G View Drop Down
Newbie
Newbie


Joined: 07 May 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote D__G Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2004 at 2:33am
Can anyone tell me is this (although it works) will be ok?
Back to Top
D__G View Drop Down
Newbie
Newbie


Joined: 07 May 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote D__G Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2004 at 8:30am
-boRg_  Please post your thoughts on what Ive done, let me know if it seems ok or if if borked it up by doing this :/
Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.