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)
 Mod ContentRotator
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GauravBhabu
Advanced Member

4288 Posts

Posted - 02 August 2002 :  11:13:14  Show Profile
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
  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.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07