[Intro] [News Files] [Help Files] [System] [Characters] [Maps] [Links] [Staff]
|
+news and +help are actually variants of the same system. The commands and options are the same, so if you know one system, you know them both. The system allows you to look at text items within several areas, each item possibly having more than one page. |
| [ help | ooc | ic | character | jobs | mail | bbs | functions | social] |
| [ help commands | installing news | news commands] |
+help accepts the following commands:
+help - List help areas and area descriptions
+help <area> - List help items within <area>
+help <area>/<item> - Show help <item> from <area>
+help <item> - Show help <item> from last referenced area
+help/next, +hn - Show next page in current help item
+help/prev, +hp - Show previous page in current help item
+help/first - Show first page in current help item
+help/last - Show last page in current help item
+help/again - Show current page again
+search help for <word>
This will show all places in news where <word> occurs.
E.g.:
+search help for combat
(Staff only)
This item talks about news. However, installing help is exactly the same, except that the object is stored in the +help system and not the +news system.
News is stored in a number of areas, each of which comprises a number of items. News items may have multiple pages.
In addition, some items may be withheld from the index, and individual pages can be locked so that only certain players can see them.
A few commands have been added to fix a shortcoming in the TinyMUSH 3.x security model.
The news objects must now be wizard-owned, so non-wizard staff should use the following to modify news:
+addnews <area>/<topic>/<p>=<text> +addhelp <area>/<topic>/<p>=<text>
+ednews <area>/<topic>/<p>=<old>/<new> +edhelp <area>/<topic>/<p>=<old>/<new>
+locknews <area>/<topic>/<p>=<lock> +lockhelp <area>/<topic>/<p>=<lock>
+undonews +undohelp
<area> is the news/help category (E.g. 'admin')
<topic> is - well - the topic (E.g. 'nowho')
<p> is the sequenced page number
<text> is content to overwrite
<old> is text to change
<new> is text replacing <old>
<lock> will require double-percents - e.g.:
+locknews lore/vampire/1=gte(stat(%%0,vampire lore),1)
+lockhelp admin/steal/1=hasaccess(%%0,STEAL)
An empty <text> or <lock> will remove said item.
The following pages go into the implementation details for TechArchs.
Adding a New Area
To add a new area, an object containing that areas news files is placed inside the +news System object (which will be located in the Master Room). The name of the object forms the name of that area, so keep it short. The description of the object forms the area description. This should be short also.
Adding a New Item
News items are stored in attributes on the area object. Each page of news is stored in a single attribute. The pages of an item are stored in attributes named:
ITEM_<item name>+<page reference>
where <item name> is the name of the news item with all spaces changed to underbar characters '_'. The <page reference> is normally a single character.
The Index Page:
The index page is automatically generated. The @succ of the object is shown first, then an index of items.
If a news item contains a page with no page reference, that item will show in the index for the area. The pages are sorted into alphabetical order, so normally it makes sense to number pages something like..
ITEM_INSTALLING_NEWS+
ITEM_INSTALLING_NEWS+1
ITEM_INSTALLING_NEWS+2
.
.
ITEM_INSTALLING_NEWS+9
ITEM_INSTALLING_NEWS+A
.
.
To prevent a news item showing in the index, simply do not install a page with no page reference.
If a news object has a MAIN attribute set, then that will be used to display a news item, rather than show the index. Be careful with this, it stops the index being seen at all.
E.g.
&MAIN area=installing news
NOTE: The news editor caches areas, so you will need to @trigger the @startup on the news editor after installing a new object.
Locking Pages
Individual pages can be hidden from users by locking them. A locked page will not form part of that item for a user who fails the lock. To lock a page, set an attribute of the form:
LOCK_<item name>+<page reference>
and the equivalent page will be locked. The lock attribute should evaluate to zero when the item is to be withheld. The user is passed in as %0
E.g,
&LOCK_INSTALLING_NEWS+3 help=hasflag(%0,WIZARD)
Locking Areas
To lock an entire area, simply @lock the area object.
Alternate Pages
Alternative pages can be set upby providing two pages with opposite locks,
eg:
&ITEM_INSTALLING_NEWS+3A help=Page for wizards..
&LOCK_INSTALLING_NEWS+3A help=hasflag(%0,WIZARD)
&ITEM_INSTALLING_NEWS+3B help=Page for non-wizards..
&LOCK_INSTALLING_NEWS+3B help=not(hasflag(%0,WIZARD))
+news accepts the following commands:
+news - List news areas and area descriptions
+news <area> - List news items within <area>
+news <area>/<item> - Show news <item> from <area>
+news <item> - Show news <item> from last referenced area
+news/next, +nn - Show next page in current news item
+news/prev, +np - Show previous page in current news item
+news/first - Show first page in current news item
+news/last - Show last page in current news item
+news/again - Show current page again
+search news for <word>
This will show all places in news where <word> occurs.
E.g.:
+search news for frenzy
(Staff only)