Mod ContentRotator
Author:
GauravBhabu(Rakesh Jain) www.forumsquare.com
Posted:
2001
Updated:
Aug 2, 2002
Requirements:
MSWC Components must be Installed and enabled on the server.
Installation:
Step 1: Add the following function to inc_functions.asp or inc_top.asp
Function RotatingContent()
Set NextLink = Server.CreateObject ("MSWC.NextLink")
Rem -For different content everyday of the year, Rotates Yearly
'ILink = DatePart("y", date)
Rem -For different content everyday of the Month, Rotates Monthly
'ILink = day(date)
Rem -For different content everyday of the week, Rotates weekly
ILink = Weekday(date, 2)
RotatingContent = NextLink.GetNthDescription("/forum/content.txt", ILink)
End function
Step 2: Copy the following code where you want to display the content
Response.write (RotatingContent)
Step 3: Before you can get Mod to work, you need to create content.txt file and store/upload to forum folder.
Sample Content.txt File
This is an example of content.txt file for a different content everyday of week.
"" Apples are better then Coffee to keep you awake. 1
"" Every person has a Unique Tounge print. 2
"" Water expands by about 9% as it freezes. 3
"" Our eyes are always the same size from birth. 4
"" Cities take up 2% of earth's surface, but 75% of resources. 5
"" The Sahara desert expands at about 1km per month. 6
"" Eighty percent of the average human brain is water. 7
Note:
For content to rotate Weekly minimum of 7 Statements are required
For content to rotate Monthly minimum of 31 Statements are required
For content to rotate Yearly minimum of 366 Statements are required
The content.txt file is a Tab delimited File as per below noted Format.
URL ""
Description Statement
Comments Number
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Edited by - GauravBhabu on 02 August 2002 11:22:18