<?xml version="1.3" encoding="iso-8859-1"?>
<mosinstall type="module" version="1.0.0">
	<name>shCustomTags</name>
	<author>Yannick Gaultier (shumisha)</author>
	<creationDate>September 20,2007</creationDate>
	<copyright>2007 Yannick Gaultier</copyright>
	<license>GNU GPL</license>
	<authorEmail>shumisha@gmail.com</authorEmail>
	<authorUrl></authorUrl>
	<version>1.2.4.x</version>
	<description><![CDATA[<strong>This module gives you more control on TITLE, DESCRIPTION, KEYWORDS, ROBOTS and Language head meta tags. It is designed to work only with sh404SEF. If sh404SEF is not installed and running, module will NOT work. It can also be used as a general purpose insert/replace tool, as it has the ability to replace any text, html, javascript found in a page by another piece of text, html, javascript. Because it is a module, you can set it to make its work on some pages only, or with page-related parameters. A big advantage is that it does not require any hacking of the core or components code.</strong><br /> 
	<hr>
Features:<br />
- automatically rewrite (meaning overwrite whatever tags were already set by Joomla) TITLE, DESCRIPTION, KEYWORDS, ROBOTS and LANGUAGE. It has a plugin system, so that you can make your own little tags if you know how to PHP. If no plugin is available for the current page, then tags are left untouched (which means regular content item are not modified<br />
- comes with a VIRTUEMART (tested with 1.0.10) plugin, that'll build up title, description and keywords based on your store products<br />
- Tags wan be set manually on a URL by URL basis using sh404SEF feature<br />

- compatible with Joomfish, so that these title/description/keywords will be translated if you have setup Joomla in a multi-lingual way.<br />
<br />
<strong>- will remove Generator = Joomla META (optional, set through sh404SEF backend)</strong><br />
<strong>- will put &lt;h1&gt; tags around your content element title (optional, set through sh404SEF backend)</strong><br /><br />
<strong>General purpose insert/replace tool</strong><br />
- type text to be inserted in head section of page, like link to a javascript or css file. This allows XHTML validation. Also the javascript or css is only linked on those pages that requires it, contrary to what a system mambot would do<br />
- replace any text with some other text. Works on content item, or other modules. You can use it to REMOVE some content you don't like in the standard output of a module or component<br />
- replace using a regexp. Works on content item, or other modules. I am no great regexp expert, but I have used this to remove the Create account link on the login module while keeping the rest (I needed to allow account creation for Virtuemart, but did not want normal users to create accounts).<br />
<br/>
<hr>
 <strong> shCustomTags user documentation</strong><br/>
<br/>
<br/>
0 - Change log<br/>
<br/>
July 1st, 2007 : version 0.7<br/>
 - integrated into sh404SEF. Standalone version not supported anymore
 - added a com_content plugin
<br/>
<br/>
April 21, 2007 : version 0.7<br/>
 - bug fix in VirtueMart plugin: replaced &#039; chars in vendor description by single quotes
 - removed site URL from title tags in virtumart plugin
<br/>
<br/>
April 9, 2007 : version 0.6<br/>
 - bug fix in shGetIsoCodeFromName() : was not working if Joomfish not installed
 - bug fix : html tags were not removed from some product descriptions
<br/>
April 9, 2007 : version 0.5<br/>
 - bug fix in packaging of module
 - added Hungarian translation by Jozsef Tamas Herczeg
<br/>
April 4, 2007 : version 0.4<br/>
 - added sorting of url parameters before checking for manually set meta tags rewriting, in case parameters are not in same order
 - small changes in language file<br />
<br />
<br/>
April 1st, 2007 : version 0.3<br/>
 - there was no description for the 'List all products' page. Now using that of shop<br />
 - small changes in language file<br />
<br />
March 30, 2007 : version 0.2<br/>
 - added configuration file to virtuemart plugin, to control the way META are built<br />
 - added option to automatically remove Generator = Joomla markup in source code<br />
 - added option to put content heading in between &lt;h1&gt; tags<br />
<br />
<hr>
March 29, 2007 : first version 0.1<br/>
Initial release - beta quality, need testing on other setups than mine !<br />
<hr>
<br/>
1 - Installation :<br/>
<br/>
This module is automatically installed by sh404SEF installer.<br/>
<stron>Warning : the only difficult part is finding the proper position to publish this module</strong>. It can only work properly if it is the <strong>last</strong> module published. Also, you should publish in the <strong>last module position in your template</strong>. I cannot give you more accurate advice, because this is dependant on each template. For instance, on the standard rhuk_solarflare_ii template that comes with Joomla, you should use the 'debug' position, because it is the very last module loaded on the page.<br />
Basically, you can either open up your index.php template file, and search for the last loadModule() function call, or alternatively <strong>just try every module position until it works !</strong><br /> 
shCustomTags does not have any output by itself, so it can simply be published in any available position of your template.<br />
<br/>
<strong>2 - Functions </strong><br/>

<br />
<strong>FIRST</strong> the module rewrites TITLE, META DESC, META KEYWORDS and META ROBOTS tags in your header. They will be replaced, respectively, by the content of : <br />
$shCustomTitleTag, <br />
$shCustomDescriptionTag,  <br />
$shCustomKeywordsTag <br />
$shCustomRobotsTag<br />
$shCustomLangTag<br />
These variables are declared as global by the module. You can just set them anywhere in your code if you are a programmer. <br />
<br />
In order to avoid modifying existing components to set these variables, you can write your own plugin for building these title, description and tags as you wish. Just like you can write a com_mycomponent.php in sef_ext directory for URL rewriting, you can write a <strong>com_mycomponent.php</strong> and put it in <strong>/components/com_sef/meta_ext</strong> directory. shCustomTags will include your plugin, and the title, desc, keywords, robots and lang tags eventually will be automatically placed in the page. <br />
The purpose of the plugin is to programatically build those 5 variables. Included with the module is tags plugin for <strong>virtuemart</strong>. I suggest you look at it if you want to modify the way the page title is set. It will also serve as a model if you want to write a plugin for another component. If you do so, I would appreciate you send it to me, for inclusion in next release.<br />
<br /> 
<strong>SECOND</strong>the module will look in the DB for a manually set up tags list. This list of tags is entered using sh404SEF custom tags feature, available from version 1.2.4.s. The tags definition found in the DB will <strong>replace</strong> those obtained through the plugin system, so if there is something you can't do with a plugin, you can set it up manually.<br/>
<br />
<strong>LAST</strong>, the module will apply replacement rules set in the module parameters, in the backend.<br />
For now, you can set up three rules per page. Each rule has the following parameters :<br />
- a 'new' text<br />
- an 'old' text to look for, which will be replaced by the 'new' text above<br />
- a select list for the replacement method, which can be: <br />
<ul>
<li>insert in head : no replacement here, the 'new' text will simply be inserted in the head section of the page. Useful for inserting javascript file r css file links in head section of page, for XHTMl validation.</li>
<li>Replace first occurence of tag : shCustomTags will search for 'old' text and replace the first occurence only by 'new' text</li>
<li>Replace all occurences of tag : shCustomTags will search for 'old' text and replace all occurences  by 'new' text</li>
<li>Output as regular module : 'new' text will simply be output as normal text. Really useless!</li>
<li>perform a preg_replace() : shCustomTags will perform a preg_replace(old_text, new_text) on the page</li>
</ul>
<br />
Please also note that:<br />
- you can publish the module only on those pages that requires it<br />
- you can also make several copies of the module, and have various replacement rules based on the current page.<br />
<br />
]]>
	</description>
	<files>
	<filename module="mod_shCustomTags">mod_shCustomTags.php</filename>
  </files>
	<params>
		<param name="customText1" type="textarea" cols="40" rows="9" default="" label="Custom text #1" description="Enter any text you want to insert in head of content of page."/>
		<param name="insertType1" type="list" default="0" label="Insert how ?" description="Where should the new text be placed">
			<option value="0">Insert in head section</option>
			<option value="1">Replace first occurence of tag #1</option>
			<option value="2">Replace all occurences of tag #1</option>
			<option value="3">Output as a regular module</option>
			<option value="4">Perform a preg_replace()</option>
		</param>
		<param name="customTag1" type="text" default="{shCustomCSS}" label="Text to replace" description="The text to look for an replace when Replace custom tag option is selected above. Can be located anywhere in page : &lt;head&gt; section, regular or static content, other modules if loaded before shCustomTags). {shCustomCSS} is only a sample." />
		
		<param name="@spacer" type="spacer" default="" label="" description="" />
		<param name="customText2" type="textarea" cols="40" rows="9" default="" label="Custom text #2" description="Enter any text you want to insert in head of content of page."/>
		<param name="insertType2" type="list" default="0" label="Insert how ?" description="Where should the new text be placed">
			<option value="0">Insert in head section</option>
			<option value="1">Replace first occurence of tag #2</option>
			<option value="2">Replace all occurences of tag #2</option>
			<option value="3">Output as a regular module</option>
			<option value="4">Perform a preg_replace()</option>
		</param>
			<param name="customTag2" type="text" default="{shCustomJS}" label="Text to replace" description="The text to look for an replace when Replace custom tag option is selected above. Can be located anywhere in page : &lt;head&gt; section, regular or static content, other modules if loaded before shCustomTags). {shCustomJS} is only a sample." />

		<param name="@spacer" type="spacer" default="" label="" description="" />
		<param name="customText3" type="textarea" cols="40" rows="9" default="" label="Custom text #3" description="Enter any text you want to insert in head of content of page."/>
		<param name="insertType3" type="list" default="0" label="Insert how ?" description="Where should the new text be placed">
			<option value="0">Insert in head section</option>
			<option value="1">Replace first occurence of tag #3</option>
			<option value="2">Replace all occurences of tag #3</option>
			<option value="3">Output as a regular module</option>
			<option value="4">Perform a preg_replace()</option>
		</param>
			<param name="customTag3" type="text" default="{shCustomTXT}" label="Text to replace" description="The text to look for an replace when Replace custom tag option is selected above. Can be located anywhere in page : &lt;head&gt; section, regular or static content, other modules if loaded before shCustomTags)" />			
	
</params> 		
  <uninstall>
  </uninstall>
 
</mosinstall>
