Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Small tweak for Active.asp
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 03 December 2000 :  23:12:27  Show Profile
That's easy. Open the active.asp file. In the 'Select Case ActiveSince' code you can add the following:
<pre id=code><font face=courier size=2 id=code>Select Case ActiveSince
Case "LastVisit"
lastDate = ""
Case "LastHour"
lastDate = DateToStr(DateAdd("h",-1,strForumTimeAdjust))
<font color=red>Case "Last2Hours"
lastDate = DateToStr(DateAdd("h",-2,strForumTimeAdjust))
Case "Last6Hours"
lastDate = DateToStr(DateAdd("h",-6,strForumTimeAdjust))</font id=red>
Case "LastDay"
lastDate = DateToStr(DateAdd("d",-1,strForumTimeAdjust))
Case "LastWeek"
lastDate = DateToStr(DateAdd("ww",-1,strForumTimeAdjust))
Case "LastMonth"
lastDate = DateToStr(DateAdd("m",-1,strForumTimeAdjust))
Case Else
lastDate = ""
End Select</font id=code></pre id=code>
And in the Select drop down box code you can add the following:
<pre id=code><font face=courier size=2 id=code><select name="ShowSinceDateTime" size="1" onchange="SetLastDate();">
<option value="LastVisit" <% if ActiveSince = "LastVisit" or ActiveSince = "" then Response.Write(" SELECTED")%>> Last Visit on <%= ChkDate(Session(strCookieURL & "last_here_date")) %> <% =ChkTime(Session(strCookieURL & "last_here_date")) %> </option>
<option value="LastHour" <% if ActiveSince = "LastHour" then Response.Write(" SELECTED")%>> Last Hour</option>
<font color=red><option value="Last2Hours" <% if ActiveSince = "Last2Hours" then Response.Write(" SELECTED")%>> Last 2 Hours</option>
<option value="Last6Hours" <% if ActiveSince = "Last6Hours" then Response.Write(" SELECTED")%>> Last 6 Hours</option></font id=red>
<option value="LastDay" <% if ActiveSince = "LastDay" then Response.Write(" SELECTED")%>> One Day ago</option>
<option value="LastWeek" <% if ActiveSince = "LastWeek" then Response.Write(" SELECTED")%>> One Week ago</option>
<option value="LastMonth" <% if ActiveSince = "LastMonth" then Response.Write(" SELECTED")%>> Last Month</option>
</select></font id=code></pre id=code>

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"If you're headed in the wrong direction,
God allows U-turns."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>
Go to Top of Page

SPulley
Starting Member

USA
46 Posts

Posted - 07 December 2000 :  01:10:43  Show Profile  Visit SPulley's Homepage  Send SPulley an AOL message
When the active.asp page is bookmarked I get the following error.

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'ReadLastHereDate'

/forum/active.asp, line 108


What do ya think??

Shad

Have fun and be good!!

Shad Pulley
shadstrains@mylargescale.com
www.mymodelrr.com/forum
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 07 December 2000 :  01:30:26  Show Profile  Visit gor's Homepage
Here at the forum ? If so, that is strange, because I used to have active.asp bookmarked and now have active2.asp bookmarked.... (it is my default entrypoint to the site)

<b>Pierre Gorissen</b>

<font color=blue><font size=1>If I only had a little humility,
I would be perfect.</font id=blue></font id=size1>
<font size=1><font color=black>Ted Turner</font id=size1></font id=black>
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 07 December 2000 :  03:16:29  Show Profile  Visit HuwR's Homepage
Mine too.

Thoughtof another choice for the menu, how about last_post date.

reasoning, half way through logging on this morning, my modem crapped out, this reset my last logon to a couple of minutes ago.
So I figured a last_post would be a good choice, since in my cause they are usually similar, and woulldn't get wiped if I get hung up.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 07 December 2000 :  09:52:37  Show Profile
thanks Davio

It works perfectly, I made these changes to my forum:

<img src="http://www.virtue.nu/wii/active.gif" border=0>

Go to Top of Page

tilttek
Junior Member

Canada
333 Posts

Posted - 07 December 2000 :  16:09:34  Show Profile  Visit tilttek's Homepage
It's a VERY good idea. But will this be include in the next SP or release?
It's dificulte to do update when we did had many MODS.

But this function sould be configurable... Maybe some site don't want to put last month/week...

Philippe Gamache
http://www.tilttek.com
http://www.lapageamelkor.com
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 14 December 2000 :  02:13:13  Show Profile  Visit HuwR's Homepage
gor,

I just noticed a small bug, if you click the mark topics as read icon, the screen refrshes, giving yo a blank screen, however the drop down box still says whatever it was set to before, it should really be set to last visit.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 14 December 2000 :  02:29:25  Show Profile  Visit gor's Homepage
You're right, easy to fix:

Add this line to the code:
<pre id=code><font face=courier size=2 id=code>
if Request.Form("AllRead") = "Y" then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(Request.Cookies(strCookieURL & "User")("Name"))
Session(strCookieURL & "last_here_date") = ReadLastHereDate(Request.Cookies(strCookieURL & "User")("Name"))
lastDate = Session(strCookieURL & "last_here_date")
<b> ActiveSince = ""</b>
end if
</font id=code></pre id=code>

I changed it here at the site and in the download-file

<b>Pierre Gorissen</b>

<font color=blue><font size=1>If I only had a little humility,
I would be perfect.</font id=blue></font id=size1>
<font size=1><font color=black>Ted Turner</font id=size1></font id=black>
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 14 December 2000 :  02:45:20  Show Profile  Visit HuwR's Homepage
Thankyou.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

André
Starting Member

24 Posts

Posted - 14 December 2000 :  12:01:54  Show Profile
Agreed, however this mod could be usefull in another way...
If it were to be used as a default forum in such a manner that the admin could post required reading: about the use of the forum
ie: All users posting new code please comment your code, this would be usefull for many of your members who are using translated
versions, and overwriting their files cause
a great deal additional work.

As you can see the possibilities are tremendous!


Sorry about that, a little lost here i was referring to the slash mod, guess i had a few windows open and posted here. The mod
slash 2 does what i was referring to.

am i forgiven!
André


Edited by - andré on 18 December 2000 21:29:21

Edited by - andré on 18 December 2000 21:31:14
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 14 December 2000 :  15:02:38  Show Profile  Visit gor's Homepage
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Agreed, however this mod could be usefull in another way...
If it were to be used as a default forum in such a manner that the admin could post required reading: about the use of the forum
ie: All users posting new code please comment your code, this would be usefull for many of your members who are using translated
versions, and overwriting their files cause
a great deal additional work.

As you can see the possibilities are tremendous!
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

André I don't think I really understand what you mean with this in regard to the tweak for Active.asp... <img src=icon_smile_question.gif border=0 align=middle>

<b>Pierre Gorissen</b>

<font color=blue><font size=1>If I only had a little humility,
I would be perfect.</font id=blue></font id=size1>
<font size=1><font color=black>Ted Turner</font id=size1></font id=black>
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 19 December 2000 :  01:14:15  Show Profile  Visit gor's Homepage
New active.asp has been included in Version 3.1 SR3
Closing....

<b>Pierre Gorissen</b> <img src="http://home.hetnet.nl/~pgoris01/frsty3r.gif" border=0>
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07