The template files contain ordinary html plus ||variables||. These variables are setup
by the CGI commands and template commands. The CGI commands may take the form of a submit
button with a particular name, a hidden cmd (or xcmd) field inside a form or as a query in
the form cmd=xyz
Every CGI cmd can be setup as a button, hidden or as part of a query. When commands are
setup as buttons there must be no hidden command field in the form or this will override
the button.
The list of valid CGI commands is show below. This list also shows which default
template is displayed. The input and output variables that are needed/setup are also
displayed for each command. In addition, some commands change user settings, and these are
also displayed.
Any variable in the lists that start with a '~' is an ini setting.
| CMD |
Function |
Template |
| url |
This will make the GCI to display the
link provided instead. |
(CGI) |
| Input Variables: |
| link |
The 'http' link that you want the CGI to display. |
|
| register |
Displays the registering screen. |
(CGI) |
| manager |
Displays the manager's screen. |
(manager.tpl) |
| show |
This just shows the error.tpl. Normally
used with 'page=xxx'. |
(error.tpl) |
| help |
Displays the user help. |
(help.tpl) |
| enter_login |
Displays the login page. |
(login.tpl) |
| login |
This will login a user. |
(frame.tpl or list.tpl) |
| Input Variables: |
| user |
The user name to login to. |
| pass |
The user's password. |
| host |
The host that the user wishes to connect to. (optional) |
| tcode |
This is used to determine whether the login page is fresh. You must
have this unless you have:
no_tcode truein your ini file |
| Output Variables: |
| _played_sound |
Setup to '0' if the sound has not played. |
| utoken |
The user's token, which must be passed to CGI every time. |
| User settings: |
| _selected_tpl |
This is used to determine which templates the user is using. |
| wml_agent |
The last wml agent used. |
| agent |
The last web browser used. |
| frames |
Set to '1' if the user is using the frames templates. |
|
| auto_login |
This will perform an auto-login for a
user. |
(frame.tpl or list.tpl) |
| Input Variables: |
| same as 'login' |
| Output Variables: |
| same as 'login' |
| User settings: |
| same as 'login' |
|
| netwin_login |
This command is used to go between
NetWin products. |
(url) |
| Input Variables: |
| utoken |
The user's utoken. |
| ~netwin_autologin |
The list of information required to peform a NetWin login. |
|
| logout |
This will logout a user. |
(logout.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
|
| logout_go |
This will logout a user, and then go
directly to a URL. |
(url) |
| Input Variables: |
| utoken |
The users utoken. |
| url |
The url which the user should be sent to. |
|
| config |
Displays the user options. |
(config.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
|
add_list
add_list_art
add_list_grp |
Subscribes the stated group the users
list. |
(config.tpl)
(list.tpl)
(groups.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
| group |
The selected group to subscribe to. |
|
| saveconfig |
Displays the user options. |
(config.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
| sig |
The users signature. |
| dflt_reply |
The default reply address. |
| allow_cookie |
Weither or not the user has setup a cookie. |
|
| menubar |
This will display the menubar. Used in
frame.tpl only |
(menubar.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
|
| searchbar |
This will display the searchbar. Used in
frame.tpl only |
(searchbar.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
|
| display |
This will displays the list of groups. |
(groups.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
| group |
Current selected search. |
| Output Variables: |
| pos |
The current position. Used to determine the page. |
| num_pages |
The number of pages. |
| on_page |
Which page is being displayed. |
| page_back |
Used to change the search by going back.
changes: rec.humor.*
to:
rec.* |
| pageup |
The position of the page before. |
| pagedown |
The position of the page after. |
| new_groups |
The list of new groups to display. |
| admin_groups |
The list of selected admin groups to display. |
|
| listitems |
Lists the articles of the selected
group. |
(list.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
| group |
The select group. |
| Output Variables: |
| per_page |
The number of articles display per page. |
| news_pos |
The curren position. Used to determine the page. |
| pageup |
The position of the page before. |
| pagedown |
The position of the page after. |
| num_pages |
The number of pages. |
| on_page |
Which page is being displayed. |
| post_allowed |
When set this groups is allowed to be posted to. |
|
| thread* |
Lists the articles of the selected
thread. |
(thread.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
| group |
The select group. |
| Output Variables: |
| per_page |
The number of articles display per page. |
| news_pos |
The curren position. Used to determine the page. |
| pageup |
The position of the page before. |
| pagedown |
The position of the page after. |
| num_pages |
The number of pages. |
| on_page |
Which page is being displayed. |
| post_allowed |
When set this groups is allowed to be posted to. |
|
| item* |
Displays the message. |
(item.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
| group |
The select group. |
| timezone |
The timezone which the message is displayed in. (optional) |
| Output Variables: |
| uidl |
The position in the list of the email messages. |
| post_allowed |
When set this groups is allowed to be posted to. |
| search_search |
Used to search for other articles that are simular. |
| href_subject |
The new reply subject. |
| prev |
The previous article. |
| prev_multi |
When set to true the previuos message is a multiple message. |
| next |
The next article. |
| next_multi |
When set to true the next message is a multiple message. |
h_date
h_local_date
h_date_day
h_date_time |
These are the different date layouts available. |
h_from
h_from_email
h_from_personal |
Shows who the news article came from. This is where you can display
whether the address uses the personal, the complete or the EMail format. ie.
Complete: "Lynden" <lynden@1.2.3.4>
EMail:
lynden@1.2.3.4
Personal: "Lynden" |
| h_newsgroups |
The list of news groups that got this article. |
| v_raw |
The user's sticky settings for displaying the email message in Raw
format. |
| v_headers |
The user's sticky settings for displaying the email message header. |
| v_font |
The user's sticky settings for displaying the email message in
variable width font. |
| v_inline |
The user's sticky settings for displaying the email message
images/html/text attach files inline. |
| v_show_alt |
The user's sticky settings for displaying the email message's
alternative part as well. |
|
| itempart* |
Displays the message subpart. |
(N/A) |
| Input Variables: |
| utoken |
The user's utoken. |
| part |
Shows which mime part to display. |
| subpart |
Shows which part of the mime part to display. |
|
| setview* |
This changes the how the messages are
viewed in item.tpl. |
(item.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| v_raw |
When set this shows the message as on the mail server. This
overrides the other v_* settings. (optional) |
| v_headers |
This displays the headers of the EMail message. (optional) |
| v_font |
This displays the message using variable width font. (optional) |
| v_inline |
This will display, html, text and images inline of the email
message. (optional) |
| v_exec |
This will stop the javascript, applets, forms and scripts from being
removed. (optional) |
| v_show_alt |
This will show the alternative part of the EMail message as well. (optional) |
| Output Variables: |
| Save as the 'item' CGI command. |
|
| post |
Displays a new article page. |
(post.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| group |
The select news group. |
|
| reply* |
Sets up a reply article page. |
(post.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| group |
The select news group. |
| reply_prefix |
The string that will be used to add to every line of the body. (ie
'> ') |
| send_wrap |
Teh limit on the number of characters. |
| Output Variables: |
| from |
Who is going to send this article. Built from '_real_name' and
'dflt_reply' from the user.dat file. |
| reply_ref |
This is the refences that needs to be preserved to keep the threads
working. |
| href_search |
The search field setup needed to look for simular articles like this
one. |
| h_subject |
The default subject of the reply message. (Re: subject) |
| quote_body |
The body of the message. |
|
| add_attach |
Displays the attached emails. |
(attach.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| Output Variables: |
| attach_num |
The number of attachments which are going to be sent. |
|
| attach_msg |
This will add a message to the list of
attachments. |
(attach.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| attach |
The list of attached files. |
| Output Variables: |
| attach_num |
The number of attachments which are going to be sent. |
|
| attach_send |
This will display back the Email message
which is to be sent. |
(send.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| Output Variables: |
| h_cc |
The list of emails that should be cc'ed to. |
| h_from |
The from field where the message should be sent. |
| h_subject |
The default subject of the reply Email. |
| qoute_body |
The body of the Email, converted to display inside the html page. |
| reply |
The default reply of the Email. |
host_user*
host_name* |
Used for the pull down list of multiple host accounts. |
| addsig |
Set to 'checked' if the user sent a signature the previous
time. |
| send_autocc |
Set to 'checked' if the user sent a copy to herself the
previous time. |
| copyself |
Set to 'checked' if the user saved in the sent folder the
previous time. |
| pick_item |
The list of items in the pick list and distribution list. |
| picklist |
The list of items in the pick list and distribution list. |
|
| attach_del |
This will delete the highlighted message |
(attach.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| selected_attach |
The selected list of attached files to remove. |
| Output Variables: |
| attach_num |
The number of attachments which are going to be sent. |
|
| edit_dict |
This will display the list of words in
your private dictionary. |
(sp_dic.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| Output Variables: |
| dict_edit |
The list of words in the user's personal dictionary. |
|
| save_dict |
This will save the private dictionary. |
(sp_show.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| dict_edit |
The list of words in the user's personal dictionary. |
|
| add_dict |
This will add a word to the private
dictionary. |
(sp_show.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| misspelt_word |
a word which is spelt wrong. |
| Output Variables: |
| The same as the CGI command spell_check |
|
| check_word |
This will check 1 word for spelling. |
(sp_fix.tpl) |
| Input Variables: |
| utoken |
The users utoken. |
| word |
The word that is spelt wrong. |
| line |
The line number in which the misspelt word lies. |
| nword |
The word number in the line in which the word is spelt wrong. |
| Output Variables: |
| spell_alt |
The list of possible correct spellings. |
|
| spell_check |
This will check a message for spelling. |
(sp_show.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| message |
The message which is to be spellchecked. |
| to |
The list of people to whom the message should be sent . (optional) |
| cc |
The list of people to whom a carbon copy should be sent. (optional) |
| bcc |
The list of people to whom a blind carbon copy should be sent. (optional) |
| attach |
The list of attached files. (optional) |
| reply |
The reply-to field of the Email message. (optional) |
| subject |
The subject of the EMail message. (optional) |
| addsig |
If 'checked', a signature will be sent. (optional) |
| send_autocc |
If 'checked', a copy to self will be sent. (optional) |
| copyself |
If 'checked', a copy will be saved in the sent folder. (optional) |
| priority |
This is the text priority level of the Email. (optional) |
| content-type |
This is the content-type of this message. (optional) |
| Output Variables: |
| lines_wrong |
The number of lines in which spelling mistakes occur. |
| nlines |
The total number of lines in the Email. |
| nword |
The number of words which were checked. |
| nwrong |
The number of words which are misspelt. |
| message |
The message which is to be spell checked. |
| to |
The list of people to whom the message should be sent. |
| cc |
The list of people to whom a carbon copy should be sent. |
| bcc |
The list of people to whom a blind carbon copy should be sent. |
| attach |
The list of attached files. |
| reply |
The reply-to field of the Email message. |
| subject |
The subject of the EMail message. |
| addsig |
If 'checked', a signature will be sent. |
| send_autocc |
If 'checked', a copy will be sent to self. |
| copyself |
If 'checked', a copy will be saved in the sent folder. |
| priority |
This is the text priority level of the Email. |
| content-type |
This is the content-type of this message. |
|
| change_word |
This will change a word. |
(sp_show.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| misspelt_word |
This is the word which is spelt wrong. |
| misspelt_line |
This is the line number in which the word is misspelt. |
| word_number |
This is the place in the line where the word is misspelt. |
| corrected_word |
This is the newly corrected word |
| Output Variables: |
| These are the same as the CGI command spell_check |
|
| send |
This sends the new article. |
(ok.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| to |
The list of people whom the message should be sent to. |
| from |
Who the message came from. |
| reply |
The EMail address that you can reply to. |
| reply_ref |
The list of refences to keep. Used to determine threads. |
| newsgroups |
The list of news groups that get people whom a carbon copy should be
sent to. (optional) |
| attach |
The list of attached files. (optional) |
| subject |
The subject of the EMail. (optional) |
| message |
The body of the EMail message. (optional) |
| addsig |
If 'checked', a signature will be sent. (optional) |
| priority |
This is the text priority level of the Email. (optional) |
| content-type |
This is the content-type of this message. (optional) |
| required |
The list of require fields. (common seperated) |
| template |
The template to use to create change the layout of the message. (ie
template=postit.tpl) |
|
| get_lastest |
This downloads the lastest articles of
this news group. This is normally done automatically, but can be forced. |
(list.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| group |
The selected news group. |
|
search
dosearch |
This proforms the group/article
searching functions. |
(search.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
| group_search |
The group search field. |
search_page
wml_search_page |
This is the number of articles to display per page. |
| pos |
The current article position on this search. |
subject_article
or
subject |
The Subject to search for. |
| author |
The Author to search for. |
| Output Variables: |
| pageup |
The next position to display the previous page. |
| pagedown |
The next position to display the next page. |
| no_match |
When set their is no match found. |
| single_group |
When set their is only 1 group which matches the group_search. |
|
ftsearch
doftsearch |
This does a full text searching.
NOTE: the news server must be setup with full text searching for this to work. |
(ftsearch.tpl) |
| Input Variables: |
| utoken |
The user's utoken. |
word_search
group_search |
The base search prameters. |
fts_before
fts_after |
The time frame for articles to be searched on. |
fts_sort
fts_match |
The type of searching. |
| fts_pagesize |
The number of results to display per page. |
| Output Variables: |
| per_page |
The number displayed per page. |
| fts_count |
The total number of results. |
fts_pages
num_pages |
The number of pages. |
| fts_page |
The page number you are currently on. |
| pageup |
This the the postion for the previous page. |
| pagedown |
This the the postion for the next page. |
|
| cmd=test |
There are no other parameters, this does a basic
test in order to try and locate some common problems. |
(internal) |
| page=xxx.tpl |
This will allow the administration to select any
template page and display it. This includes any new templates which are desired. |
(selected page) |
| process=cmd |
This will allow make the CGI to process another
command directly after the main command. (ie cmd=xxx, or button pressed etc.) This will
only get processed if no error occurs. |
(command page) |
| on_error=cmd |
This will allow make the CGI to process another
command directly after the main command if the main command generates an error.
ie. ?cmd=login&user=username&pass=password
&on_error=url&link=https://netwinsite.com&utoken=...
This can also be used inconjuction with process. In this case if either the main command
or the 'process' command generates an error this command is processed. |
(command page) |
Any of the above commands which have an '*' next to them must be passed a number, where
this number is normally the message unique ID. The number appears directly after the cmd
name.
In most cases, the CGI will automatically take care of building links that require this
sort of ID as well. The variables which are displayed in brackets are also required in
order to ensure the function behaves correctly.
Every command, with the exceptions of the register, manager and login commands,
require the utoken to be present.
If an error such as 'Incorrect utoken' appears, you should ensure that a user token is
being passed either as a hidden field or as part of a query.