blob: b8a905aa13285ed7223aa18353883c5000b97484 [file] [log] [blame]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<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>InsertSnippet for Xinha</h1>
<p>Insert HTML fragments in your document.
</p>
<h2>Usage</h2>
<p>
In order to use your own snippets you have to add at least one parameter to your xinha_config:
</p>
<pre>
xinha_config.InsertSnippet.snippets = Xinha.getPluginDir('InsertSnippet') + "/snippets.php";
</pre>
<p>
The path above indicates the use of the provided backend. This parses a file that contains the snippets and
should have the following format:
</p>
<pre>
&lt;!--Snippet ID--&gt;
Snippet content
&lt;!--/Snippet ID--&gt;
...and so on
</pre>
<p>
You can use the snippets.html in the plugin folder or tell the backend where to find the file like this
</p>
<pre>
with (xinha_config.InsertSnippet)
{
&lt;?php
// define backend configuration for the plugin
$backend_data['snippets_file'] = '/file/containing/snippets.html';
require_once '../contrib/php-xinha.php';
xinha_pass_to_php_backend($backend_data);
?&gt;
}
</pre>
<p style="font-size:80%">Raimund Meyer (xinha@raimundmeyer.de)</p>
</body>
</html>