| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| <html><head> <title>InsertSnippet for Xinha</title> <style type="text/css"> |
| body { font-family: sans-serif; } |
| pre {border: dotted grey thin; background-color:LightYellow;padding:10px } |
| p { width:500px } |
| </style> |
| </head> |
| <body> |
| <h1>InsertSnippet2 for Xinha</h1> |
| <p>Insert HTML fragments or template variables in your document.</p> |
| <h2>Features</h2> |
| <ul> |
| <li>Categorization to organize your snippets if you have a lot (optional)</li> |
| <li>Search for name</li> |
| <li>Insert as literal text/html or variable (optional) </li> |
| <li>XML data format<br /></li> |
| </ul> |
| <h2>Usage</h2> |
| <p> |
| In order to use your own snippets you have to add a parameter to your xinha_config: |
| </p> |
| <pre>xinha_config.InsertSnippet2.snippets = "/path/to/your/snippets.xml"; |
| </pre> |
| <p>This path should point to a XML file that has the following format:</p> |
| <pre><snXML> |
| <categories> |
| <c n="the name" /> |
| </categories> |
| <snippets> |
| <s n="the name" v="optional variable name to be inserted" c="the category"> |
| &lt;p&gt;some text or HTML, please entize HTML tags&lt;/p&gt; |
| </s> |
| <s n="another"> |
| <![CDATA[ |
| <p>or put HTML in a CDATA section</p> |
| ]]> |
| </s> |
| </snipptes> |
| </snXML> |
| </pre> |
| <p> </p> |
| <h3> Tags</h3> |
| <dl><dt><snXML></snXML></dt><dd> The root tag</dd><dt><categories></categories><br /></dt><dd> This tag contains the categories (optional)<br /></dd><dt> <c /></dt><dd> Each category <br /></dd><dt> <snippets></snippets></dt><dd> This tag contains the actual snippet. As this is XML, you cannot put HTML here literally. You have to either entize the <,>, and & characters or wrap the contents in a CDATA section<br /></dd></dl> |
| <h3>Attributes</h3> |
| <dl><dt> n</dt><dd> The name of one snippet or category. It is obligatory for both.<br /></dd><dt> v</dt><dd> If this attribute is present in a snippet tag, there is a button in the UI that allows to insert this variable instead of the textual content of the snippet. <br /></dd><dt> c<br /></dt><dd> The category<br /></dd></dl> |
| <p>Inside the plugin's directory, there is a sample XML file and PHP script that shows how to create the XML dynamically.<br /></p> |
| <p style="font-size: 80%;">3 October 2008 Raimund Meyer (xinha@raimundmeyer.de)</p> |
| </body> |
| </html> |