|
The formatting tags of all recent versions of Discus are configured using the webtags.conf file, which resides in your Discus administration files directory. This file can be edited with a text editor (such as Windows Notepad) to create or remove Discus formatting tags. Instructions for modifying the file can be found in the file itself. The following text is from the webtags.conf file describing how it can be modified.
Version 4.0 and higher: For reverse-conversion purposes, DiscusWare recommends that you do not actually delete or modify any of the lines in this file. Rather, to change the appearance of a formatting tag output, ADD a new line BELOW the existing line for that formatting tag. When converting from formatting tags to HTML, Discus will use the LAST definition of a formatting tag that it finds in a file.
Overview
General format: Lines beginning with a # character are comment lines and are ignored by the program. Likewise lines containing only white space (blank lines included) are similarly ignored. Lines ending with a backslash (\) character may be continued on the next line. Each part of the definition (code, symbol, and interpretation) can be separated by any number of whitespace characters (using tabs is recommended so everything lines up well for enhanced readability).
Special characters: All special character definitions start with a C to indicate that they are a special character definition. The first column is a C, the second column is the input_code the user types into the \ch{input_code} tag, and the third column is the output (actual HTML definition of the special character). Columns are delimited with one or more space characters (tabs are recommended).
Examples:
C -> <FONT FACE="SYMBOL">®</FONT>
C t †
Formatting tag definitions: The number which preceded each tag declaration is used internally by the program to determine where a tag is allowed. We have indicated above each section where tags are used -- it suffices to put your new tag in the proper section and give it the same initial number as every other tag.
The notation !VAR(variable_name)! inserts the current value of the given program variable name. Any program variable is supported using this notation (you do NOT put the $ in front of the variable name -- the script does this). The following variable are a few of the variable names that are supported with an example given in parentheses:
!VAR(html_url)! (http://your.domain.com/discus)
!VAR(topic_number)! (25)
Formatting tags are separated with one or more space characters (tabs recommended). The first column is the "context" as defined above, the second column is the code that the user enters (for example, in the \b{Bold!} tag, it is the "b"), and the third column is the actual HTML output with user input denoted as arguments. Arguments take the form |1|, |2|, and so on (the | is the pipe). A tag may have as many arguments as needed.
Simple formatting: Tags preceded by "5" may be used anywhere where formatting tags are recognized, including subject lines, about messages, and messages. This is a good place for simple text formatting, such as bold and italics. Note that these tags are the ONLY tags permitted in subject lines (and are a subset of the allowable codes for message text).
Examples:
5 b <B>|1|</B>
5 i <I>|1|</I>
5 gr <FONT FACE="SYMBOL">|1|</FONT>
Non-subject line formatting: Tags preceded by "3" are allowed everywhere EXCEPT in subject lines. These codes are good for text coloring and sizing, hyperlinks, clipart, and any other formatting codes that are appropriate for about messages and messages but that are not appropriate for subject lines.
Examples:
3 rgb <FONT COLOR="|1|">|2|</FONT>
3 topurl <A HREF="|1|" TARGET="_top">|2|</A>
Image link: In general, this is a bad idea for anyone but the superuser to be able to use...
Example:
S imagelink <IMG SRC="|1|">
Forms: This will allow you to use formatting tags to create your own WWW forms within Discus Pages! This would be very useful for some people, but if abused, it can be "turned off" by deleting the following entries.
Examples:
3 form <FORM ACTION="|1|" METHOD="|2|">|3|</FORM>
3 inputbox <INPUT TYPE=TEXT NAME="|1|" VALUE="|2|" SIZE="|3|">
Uploading: Tags preceded by "1" are used to upload images or attachments to messages. These codes are parsed by the program (hence it is ESSENTIAL not to modify these tags in any way) and replaced by the user's upload. If you translate or modify the names of the tags, you also need to translate the appropriate variable(s) in the language.conf file so the tags retain their special meaning.
Uploads are permitted only in messages, and are not permitted in subject lines or about messages.
To "turn off" image and/or attachment uploading, comment out or remove one or both of the following lines from this file.
Example:
1 image <IMG SRC="!VAR(url_to_default_image)!" ALT="|1|">
Codes you should not modify: The following codes have special meaning to the program and should not be translated or modified in any way. The program depends on these files having the exact format in which they have been defined here. There is no need to translate these tags or comment them out for any reason. Repeating, THERE IS NO NEED TO TOUCH THESE TAGS FOR ANY REASON, SO DO NOT MODIFY THESE TAGS!!!!!!
Examples:
3 image_notuploaded <IMG SRC="!VAR(url_to_default_image)!" ALT="|1|">
3 image_alreadyuploaded <IMG SRC="!VAR(html_url)!/messages/!VAR(topic_number)!/|1|.gif" ALT="|2|">
|