home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
FAQ
/
discus_admin_1357211388
/
htmlconvert.conf
< prev
next >
Wrap
Text File
|
2009-11-06
|
6KB
|
153 lines
# ----------------------------------------------------------------------------
# DISCUS HTML tag to formatting tag conversion
#
# This allows you to define those HTML patterns that you want to be converted
# into formatting tags. Here is how this file is parsed:
#
# Lines starting with # are comments.
# Blank lines are ignored.
# Other lines are conversions to be performed, in the format:
# Command [spaces] Discus Formatting Tag [spaces] HTML start [spaces] HTML stop
#
# The command is one of the following:
# S = Regular smart matching
# O = Define order of elements for a tag
#
# Your Discus Formatting Tag can have NO spaces within it. If you think about
# it, you should not need any. Within your formatting tag, use representations
# such as $1, $2, etc., to refer to the first, second, etc., matches from the
# regular expression. And use $' for everything that comes after the match before
# the closing tag.
#
# Adjustments are made for people using (or failing to use) quotes within tags.
# Allowances are made for a different order of arguments from how you've defined
# them here, provided that you use 'O' to define the order in which tag arguments
# are defined in this file.
#
# This file is executed from top to bottom. Thus, your expressions at the top should
# be the more complicated expressions, working down to the least complicated at the
# bottom of the file.
#
# User HTML is parsed from the inside out.
#
# Pattern matching is case-insensitive.
# ----------------------------------------------------------------------------
#####################################################
# Order of elements within particular HTML tags
O N/A font face,color,size
O N/A a href,target
#####################################################
# Font with face, color, and size
S \font{$1,\rgb{$2,\2{$'}}} <font face="([^"]+)" color="([^"]+)" size="\+2"> </font>
S \font{$1,\rgb{$2,\1{$'}}} <font face="([^"]+)" color="([^"]+)" size="\+1"> </font>
S \font{$1,\rgb{$2,\0{$'}}} <font face="([^"]+)" color="([^"]+)" size="\+0"> </font>
S \font{$1,\rgb{$2,\-1{$'}}} <font face="([^"]+)" color="([^"]+)" size="\-1"> </font>
S \font{$1,\rgb{$2,\-2{$'}}} <font face="([^"]+)" color="([^"]+)" size="\-2"> </font>
S \font{$1,\rgb{$2,\-2{$'}}} <font face="([^"]+)" color="([^"]+)" size="1"> </font>
S \font{$1,\rgb{$2,\-1{$'}}} <font face="([^"]+)" color="([^"]+)" size="2"> </font>
S \font{$1,\rgb{$2,\0{$'}}} <font face="([^"]+)" color="([^"]+)" size="3"> </font>
S \font{$1,\rgb{$2,\1{$'}}} <font face="([^"]+)" color="([^"]+)" size="4"> </font>
S \font{$1,\rgb{$2,\2{$'}}} <font face="([^"]+)" color="([^"]+)" size="[567]"> </font>
S \font{$1,\rgb{$'}} <font face="([^"]+)" color="([^"]+)" size="[^"]+"> </font>
#####################################################
# Font with face and size
S \font{$1,\2{$'}} <font face="([^"]+)" size="\+2"> </font>
S \font{$1,\1{$'}} <font face="([^"]+)" size="\+1"> </font>
S \font{$1,\0{$'}} <font face="([^"]+)" size="\+0"> </font>
S \font{$1,\-1{$'}} <font face="([^"]+)" size="\-1"> </font>
S \font{$1,\-2{$'}} <font face="([^"]+)" size="\-2"> </font>
S \font{$1,\-2{$'}} <font face="([^"]+)" size="1"> </font>
S \font{$1,\-1{$'}} <font face="([^"]+)" size="2"> </font>
S \font{$1,\0{$'}} <font face="([^"]+)" size="3"> </font>
S \font{$1,\1{$'}} <font face="([^"]+)" size="4"> </font>
S \font{$1,\2{$'}} <font face="([^"]+)" size="[567]"> </font>
S \font{$1,$'} <font face="([^"]+)" size="[^"]+"> </font>
#####################################################
# Font with color and size
S \rgb{$1,\2{$'}} <font color="([^"]+)" size="\+2"> </font>
S \rgb{$1,\1{$'}} <font color="([^"]+)" size="\+1"> </font>
S \rgb{$1,\0{$'}} <font color="([^"]+)" size="\+0"> </font>
S \rgb{$1,\-1{$'}} <font color="([^"]+)" size="\-1"> </font>
S \rgb{$1,\-2{$'}} <font color="([^"]+)" size="\-2"> </font>
S \rgb{$1,\-2{$'}} <font color="([^"]+)" size="1"> </font>
S \rgb{$1,\-1{$'}} <font color="([^"]+)" size="2"> </font>
S \rgb{$1,\0{$'}} <font color="([^"]+)" size="3"> </font>
S \rgb{$1,\1{$'}} <font color="([^"]+)" size="4"> </font>
S \rgb{$1,\2{$'}} <font color="([^"]+)" size="[567]"> </font>
S \rgb{$1,\2{$'}} <font color="([^"]+)" size="[^"]+"> </font>
S \rgb{$1,$'} <font color="([^"]+)" size="[^"]+"> </font>
#####################################################
# Font with color and size
S \font{$1,\rgb{$2}} <font face="([^"]+)" color="([^"]+)"> </font>
#####################################################
# Font with size only
S \2{$'} <font size="\+2"> </font>
S \1{$'} <font size="\+1"> </font>
S \0{$'} <font size="\+0"> </font>
S \-1{$'} <font size="\-1"> </font>
S \-2{$'} <font size="\-2"> </font>
S \-2{$'} <font size="1"> </font>
S \-1{$'} <font size="2"> </font>
S \0{$'} <font size="3"> </font>
S \1{$'} <font size="4"> </font>
S \2{$'} <font size="[567]"> </font>
S \0{$'} <font size="[^"]+"> </font>
#####################################################
# Font with color or face only
S \font{$1,$'} <font face="([^"]+)"> </font>
S \rgb{$1,$'} <font color="([^"]+)"> </font>
#####################################################
# Nearest equivalents of H1, H2, H3, H4, H5
S \ch{br}\2{\b{$'}}\ch{br} <h1> </h1>
S \ch{br}\1{\b{$'}}\ch{br} <h2> </h2>
S \ch{br}\0{\b{$'}}\ch{br} <h3> </h3>
S \ch{br}\-1{\b{$'}}\ch{br} <h4> </h4>
S \ch{br}\-2{\b{$'}}\ch{br} <h[567]> </h[567]>
#####################################################
# Hyperlinks
S \newurl{$1,$'} <a href="([^"]+)" target="_blank"> </a>
S \topurl{$1,$'} <a href="([^"]+)" target="_top"> </a>
S \topurl{$1,$'} <a href="([^"]+)" target="_parent"> </a>
S \newurl{$1,$'} <a href="([^"]+)" target="_blank"> </a>
S \mail{$1,$'} <a href="mailto:([^"]+)"> </a>
S \link{$1,$'} <a href="([^"]+)"> </a>
#####################################################
# Other simple formatting
S \b{$'} <b> </b>
S \i{$'} <i> </i>
S \c{$'} <c> </c>
S \c{$'} <center> </center>
S \u{$'} <u> </u>
S \strike{$'} <strike> </strike>
S \blink{$'} <blink> </blink>
S \+{$'} <sup> </sup>
S \-{$'} <sub> </sub>
S \pre{$'} <pre> </pre>
#####################################################
# Add "UBB code" if you want, but remember the backslash
# before the square brackets!
#S \b{$'} \[b\] \[/b\]
S \fixed{[\n]\*[\n]$'[\n]*\[\n]} \[code\] \[/code\]