|
NewsUpdate |
· Setting up news.usr · Setting up news.cfg · Case studies |
http://ftp.yoursite.com/newsupdate
ex: http://ftp.emulationworld.com/newsupdate
Setting up news.usr:
The fields are:
login:password:::usera:userb
ex: lev:test:::/image/lev.gif
Editing an account:
Setting up news.cfg:
The main configuration:
Here is the basic format:
-- Config Category = list Platform = list Title = default Body = default Tagline = default KeepDays = number KeepItems = number -- End
| Keyword | Required? | Description |
|---|---|---|
| -- Config | optional | Does nothing. |
| Category | optional | If used, the list is a comma (,) separated list of categories to choose from. It must have at least one item. |
| Platform | optional | If used, the list is a comma (,) separated list of platforms to choose from. It must have at least one item. |
| Title | required | The subject/title. A default value may be given, but is optional. |
| Body | required | The meat of the post. A default may be given, but is optional. |
| Tagline | optional | Useful for a thank you, or other short add-on. A default is optional. |
| KeepDays | optional | Defaults to 30 days. Posts are archived when they are older than KeepDays or there are more than KeepItems posts. If used, a number must be given. |
| KeepItems | optional | Defaults to 200 items. Posts are archived when they are older than KeepDays or there are more than KeepItems posts. If used, a number must be given. |
| --End | required | Marks the end of the main configuration |
The templates:
The configuration:
-- Start name File = filename ArchiveDir = directory Platform = list Category = list KeepDays = number KeepItems = number
| Keyword | Required? | Description |
|---|---|---|
| -- Start | required | This marks the start of the template. A name must be given and each template should be given a different name. |
| File | optional | Once the posts are run through the template, the result will be saved to this location (relative to /login/web). It will overwrite this file, so set this to a news file and SSI it into your web page. |
| ArchiveDir | optional | Posts to be archived are run through the template and saved in this directory, separated by month. If a header.txt and/or footer.txt are stored in that directory, NewsUpdate will use those before and after the archived posts. |
| Platform | optional | If used, the list is a comma separated list of platforms covered by this template. Any other platforms are ignored. |
| Category | optional | If used, the list is a comma separated list of categories covered by this template. Any other categories are ignored. |
| KeepDays | optional | If used, posts older than this many days will be ignored. |
| KeepItems | optional | If used, only this many posts will be included in this file. |
The date header:
-- DaybreakIt ends when it finds the Format tag (see below). The following tokens can be used within the date header:
| Token | Example | Description |
|---|---|---|
| %monnum% | 6 | The current month 1 - 12 |
| %daynum% | 30 | Day of the month 1 - 31 |
| %year% | 1999 | Four digit year |
| %weekday% | Wednesday | Day of the week |
| %month% | Jun | The current month Jan - Dec |
| %date% | 06/30/1999 | Zero padded date 01/01/1999 - 12/31/1999 |
| %% | % | A percent |
The post format:
-- Formatand ends with the line
-- EndThe following tokens can be used in the post format:
| Token | Description |
|---|---|
| %category% | The category of this post |
| %platform% | The platform this post is about |
| %title% | The title/subject |
| %body% | The meat of the post |
| %tagline% | The one-liner (usually on the end of the post) |
| %login% | The username which last added or edited this post. |
| %usera% | The 5th field in news.usr |
| %userb% | The 6th field in news.usr |
| %timestamp% | Seconds since 01/01/1970. Good for anchor tags. |
| %time% | Zero-padded time 00:00 - 23:59 |
| %monnum% | The current month 1 - 12 |
| %daynum% | Day of the month 1 - 31 |
| %year% | Four digit year |
| %weekday% | Day of the week |
| %month% | The current month Jan - Dec |
| %date% | Zero padded date 01/01/1999 - 12/31/1999 |
| %% | A percent |
Case studies:
Case #1: Zophar's Domain
Case #2: Emulation Zone