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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 show topics of last ... days
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

dagodewerd
Starting Member

6 Posts

Posted - 30 July 2001 :  06:58:10  Show Profile
I want to change the default setting of 30 days to 1 year or, rather, indefelite. How?

Thanks

Dago

http://www.kanker-actueel.nl/forum/

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 July 2001 :  07:40:20  Show Profile  Visit gor's Homepage
Setting the default to "all topics" can be done by changing this code in forum.asp from:

if nDays = "" then
nDays = 30
end if

to:

if nDays = "" then
nDays = 0
end if


Pierre
Join a Snitz Mailinglist
Go to Top of Page

dagodewerd
Starting Member

6 Posts

Posted - 30 July 2001 :  08:08:27  Show Profile
All right, I see. I changed it but now the default number of days changed to 120. Any idea how come?
I add the (bilingual: Dutch and English)code from my forum.asp:
FIRST PART:
nDays = Request.Form("Days")
mypage = 1
end if

if nDays = "" then
nDays = 0
end if

defDate = DateToStr(dateadd("d", -(nDays), StrToDate(strForumTimeAdjust)))

SECOND PART:

<form action="<% =Request.ServerVariables("SCRIPT_NAME") & "?" & Request.Querystring %>" method="post" name="DaysFilter">
<select name="Days" onchange="javascript:setDays();">
<option value="0" <% if ndays = "0" then Response.Write(" SELECTED")%>>Alle berichten / All topics</option>
<option value="-1" <% if ndays = "-1" then Response.Write(" SELECTED")%>>Alle open berichten / All open topics</option>
<option value="1" <% if ndays = "1" then Response.Write(" SELECTED")%>>Berichten van de laatste dag / Topics from last day</option>
<option value="2" <% if ndays = "2" then Response.Write(" SELECTED")%>>Berichten van de laatste 2 dagen / Topics from last 2 days</option>
<option value="5" <% if ndays = "5" then Response.Write(" SELECTED")%>>Berichten van de laatste 5 dagen / Topics from last 5 days</option>
<option value="7" <% if ndays = "7" then Response.Write(" SELECTED")%>>Berichten van de laatste 7 dagen / Topics from last 7 days</option>
<option value="14" <% if ndays = "14" then Response.Write(" SELECTED")%>>Berichten van de laatste 14 dagen / Topics from last 14 days</option>
<option value="30" <% if ndays = "30" then Response.Write(" SELECTED")%>>Berichten van de laatste 30 dagen / Topics from last 30 days</option>
<option value="60" <% if ndays = "60" then Response.Write(" SELECTED")%>>Berichten van de laatste 60 dagen / Topics from last 60 days</option>
<option value="120" <% if ndays = "120" then Response.Write(" SELECTED")%>>Berichten van de laatste 120 dagen / Topics from last 120 days</option>
<option value="365" <% if ndays = "365" then Response.Write(" SELECTED")%>>Berichten van laatste jaar / Topics from last year</option>
</select>
<input type="hidden" name="Cookie" value="1">
</form>

Thanks again....

Dago

http://www.kanker-actueel.nl/forum/



Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 July 2001 :  08:56:54  Show Profile  Visit gor's Homepage
Sometimes coding is easy

Default to 120 days:

if nDays = "" then
nDays = 120
end if


Pierre
Join a Snitz Mailinglist
Go to Top of Page

dagodewerd
Starting Member

6 Posts

Posted - 30 July 2001 :  10:14:05  Show Profile
Thanks Gor,

I think you did not understand my last posting. I mean I want it to be "all topics" and therefor I changed the value from 30 into 0. Nevertheless, strange enough, on the board, 120 days shows up as the default value....

Dago

Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 July 2001 :  12:21:30  Show Profile  Visit gor's Homepage
Are you sure it is the defaultvalue showing up and not a value that you selected before ?
The value is stored in a cookie, try deleting that one and see if it still show 120 days.

Pierre
Join a Snitz Mailinglist
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07