<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>xiligroup dev</title>
	<atom:link href="http://dev.xiligroup.com/?feed=rss2&#038;lang=en_us" rel="self" type="application/rss+xml" />
	<link>http://dev.xiligroup.com</link>
	<description>a multilingual site for web developments</description>
	<lastBuildDate>Wed, 28 Jul 2010 13:21:10 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>xili-language 1.7.1 as current version</title>
		<link>http://dev.xiligroup.com/?p=1686</link>
		<comments>http://dev.xiligroup.com/?p=1686#comments</comments>
		<pubDate>Thu, 22 Jul 2010 15:26:09 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[xili-language]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1686</guid>
		<description><![CDATA[Version 1.7.1 add an option to easily configure the top navigation menu in a site. Please visit the demo website and read carefully again the renewed readme.]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/extend/plugins/xili-language/download/">Version 1.7.1</a> add an option to easily configure the top navigation menu in a site. Please visit the <a href="http://multilingual.wpmu.xilione.com/">demo website</a> and read carefully again the renewed readme.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1686</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xili-language 1.7.1 is shipped in current version</title>
		<link>http://dev.xiligroup.com/?p=1664</link>
		<comments>http://dev.xiligroup.com/?p=1664#comments</comments>
		<pubDate>Tue, 13 Jul 2010 21:06:43 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[xili-language]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wmpu]]></category>
		<category><![CDATA[WP 3.0]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1664</guid>
		<description><![CDATA[xili-language 1.7.1 is shipped as "current version". Some functions are improved through new hooks (front-page selection without source coding for webmasters).]]></description>
			<content:encoded><![CDATA[<p>xili-language 1.7.1 is shipped as <a href="http://wordpress.org/extend/plugins/xili-language/download/">current version</a>.</p>
<p>With now WordPress 3.0, the default theme named <strong>twentyten</strong> can be used without php coding for a multilingual site [<a href="http://multilingual.wpmu.xilione.com">as shown here</a>]. xili-language plugin works on mono or multisite mode.</p>
<ul>
<li>* some functions are improved through new hooks (front-page selection without source coding for webmasters).</li>
<li>* fixes unexpected rewritting (when permalinks is set) and fixes query of category without languages.</li>
<li>* <strong>For developers:</strong> `<code>xiliml_cur_lang_head</code>` filter is now obsolete and replace by `<code>xiliml_curlang_action_wp</code>` &#8211; see code source &#8211; the mechanism for frontpage (home recent posts list or page) is changed and don&#8217;t now use redundant queries.</li>
<li>* <strong>For developers:</strong> if you use `<code>xili_language_list</code>` hook action to create your own list &#8211; verify it if you use page as frontpage because &#8216;<em>hlang</em>&#8216; querytag is now obsolete.</li>
<li>* <em>Latest version compatible with WP 2.9.x</em></li>
</ul>
<p>Soon more infos in the renewed readme and new posts&#8230;</p>
<p><strong>The <a href="http://dev.xiligroup.com/wp-content/uploads/2010/07/readme.txt">readme.txt</a> of 1.7.0</strong></p>
<p><strong>This site itself (monosite mode) and this demo (and new documentation) website (in multisite mode) are running under 3.0 and under xili-language 1.7.0. </strong> Some features of xili-language are also commented on this <a href="http://multilingual.wpmu.xilione.com/category/how-to/?lang=en_us">website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1664</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[updated] Publishing in multiple languages. Benefits, tips and tricks with wordpress and xili-language plugin.</title>
		<link>http://dev.xiligroup.com/?p=1498</link>
		<comments>http://dev.xiligroup.com/?p=1498#comments</comments>
		<pubDate>Tue, 16 Feb 2010 14:16:18 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[xili-language]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1498</guid>
		<description><![CDATA[One of the foundations of the approach of xili-language is the conservation of the structure of posts (article or page). With the current dashboard post edit, it is easy to add posts in multiple languages.]]></description>
			<content:encoded><![CDATA[<p>One of the foundations of the approach of xili-language is the conservation of the structure of posts (article or page). And when a visitor arrive from a search robot, the theme framework will be in the same language of the post&#8217;s language.</p>
<h4>Only some properties are added to the post.</h4>
<p>One is the language of the post set by the author. (<em>see on the top right of pictures below</em>)</p>
<p>The others are link to the <em>similar</em> posts in other languages. &laquo;&nbsp;<em>Similar</em>&nbsp;&raquo; means that linked posts are not always an exact translation of the original. Sometime it is only a summary or an adaptation.</p>
<p><strong>For the author or editor, it is important to have a good browser with tabs or one large, wide screen or two displays.</strong></p>
<p><em>As exercise, I will try to illustrate how a post and his translation are published in post edit dashboard of WP.</em></p>
<p><strong>Note #1</strong>: It is better to have prepared before the two texts with a simple text editor and use copy and paste.<br />
<strong>Note #2</strong>: If it concerns existing posts that need to be checked in specific languages or linked posts, see end of this post.</p>
<h4>The original in english:</h4>
<p>Fill the title, content, excerpt etc.. tags and categories&#8230; and check english in post&#8217;s language box.<br />
and save it&#8230;<br />
<div id="attachment_1499" class="wp-caption aligncenter" style="width: 310px"><a href="http://dev.xiligroup.com/wp-content/uploads/2010/02/demo_1.png" rel="lightbox[post-1498]" ><img src="http://dev.xiligroup.com/wp-content/uploads/2010/02/demo_1-300x184.png" alt="the first post in english" title="the first post in english" width="300" height="184" class="size-medium wp-image-1499" /></a><p class="wp-caption-text">the first post in english</p></div></p>
<p>(<strong>tip</strong>: <em>don&#8217;t forget to use UI features and move the boxes on the top right near the title</em>)</p>
<h4>The linked post in french:</h4>
<p>Since 1.3.0, with one click, it is possible to create a new post in another window of the browser. (<strong>tip</strong>: <em>use the right mouse button, to open the Add New link in another tab &#8211; your desktop will be cleaner</em>).<br />
<div id="attachment_1500" class="wp-caption aligncenter" style="width: 310px"><a href="http://dev.xiligroup.com/wp-content/uploads/2010/02/demo_2.png" rel="lightbox[post-1498]" ><img src="http://dev.xiligroup.com/wp-content/uploads/2010/02/demo_2-300x182.png" alt="The linked post in french in second tab" title="The linked post in french in second tab" width="300" height="182" class="size-medium wp-image-1500" /></a><p class="wp-caption-text">The linked post in french in second tab</p></div></p>
<p>In the edit window of the new post, just add the french title, observe that link to previous post and language are prefilled or checked and just now click &#8216;save draft button&#8217;. and continue to fill content and excerpt, tags and categories</p>
<p>(<strong>trick</strong>: <em>If you go back to the browser&#8217;s tab of the original english post, you can save it again, and you will see the changing in linked post box</em>)<br />
<div id="attachment_1501" class="wp-caption aligncenter" style="width: 308px"><a href="http://dev.xiligroup.com/wp-content/uploads/2010/02/demo_3.png" rel="lightbox[post-1498]" ><img src="http://dev.xiligroup.com/wp-content/uploads/2010/02/demo_3.png" alt="The linked post is now saved" title="The linked post is now saved" width="298" height="230" class="size-full wp-image-1501" /></a><p class="wp-caption-text">The linked post is now saved</p></div></p>
<p>And now you are able to continue to write the both posts each one in his language if you are yourself bilingual or by copying the draft of the two authors.<br />
&nbsp;<br />&nbsp;</p>
<h4>What happens when working on existing posts ?</h4>
<p>First thing: check his language in <em>Post (page) &#8216;s language</em> box and save or update.<br />
Second thing: If you know the IDs of linked posts in other languages fill the input inside the small table of <em>Linked posts</em> box and save or update.<br />
And since 1.4.1, useful if the linked posts exist and contain link to this current post, just check &#8216;auto search&#8217;, save or update and when UI is refreshed, the inputs are prefilled with IDs of existing other posts linking to this current. Verify, Save or update.<br />
<strong>Why &laquo;&nbsp;check&nbsp;&raquo; option is not checked as default ?</strong><br />
To avoid unnecessary queries. As Editor, check it only if you decide when it is necessary.</p>
<p><div id="attachment_1539" class="wp-caption aligncenter" style="width: 305px"><img src="http://dev.xiligroup.com/wp-content/uploads/2010/02/screenshot-13.png" alt="Linked posts or pages box in Post Edit UI" title="Linked posts or pages box in Post Edit UI" width="295" height="405" class="size-full wp-image-1539" /><p class="wp-caption-text">Linked posts or pages box in Post Edit UI</p></div></p>
<p>&nbsp;<br />&nbsp;<br /><fieldset class="series" ><legend>This post is in series &#8211; xili-language for authors :</legend><ol><li><a href='http://dev.xiligroup.com/?p=726' title="xili-language plugin : release 1.6.0 (compatible WP 3.0)">xili-language plugin : release 1.6.0 (compatible WP 3.0)</a></li><li><a href='http://dev.xiligroup.com/?p=1400' title="xili-language: a helpful shortcode">xili-language: a helpful shortcode</a></li><li>[updated] Publishing in multiple languages. Benefits, tips and tricks with wordpress and xili-language plugin.</li></ol></fieldset>&nbsp;<br />&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1498</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>xili-language and the time</title>
		<link>http://dev.xiligroup.com/?p=1482</link>
		<comments>http://dev.xiligroup.com/?p=1482#comments</comments>
		<pubDate>Tue, 16 Feb 2010 09:24:45 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[Expert's corner]]></category>
		<category><![CDATA[xili-language]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[multilingual theme]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1482</guid>
		<description><![CDATA[Setting time, on the fly, in current language of the current post is not very easy in Wordpress. After some research in core's source and in php functions, several pathways are available here]]></description>
			<content:encoded><![CDATA[<p><em>Setting time, on the fly, in current language of the current post is not very easy in WordPress. After some research in core&#8217;s source and in php functions, several pathways are available here</em> :</p>
<p>Without changing or adding specific <strong>template tags</strong>, <strong>the_time()</strong>, <strong>the_modified_time()</strong> and other functions are hookable by xili-language.</p>
<p>The &laquo;&nbsp;hooking&nbsp;&raquo; functions are placed inside the xilidev-libraries (<a href="http://dev.xiligroup.com/?p=1111">see this post</a>).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> xiliml_comment_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment_time</span><span style="color: #339933;">,</span><span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">/* params no used because php format */</span>
  <span style="color: #666666; font-style: italic;">/* the first param is to be as msgid in .po example: %B %d, %Y - %H:%M or %B %d, %Y at %H:%M   */</span>	
  <span style="color: #b1b100;">return</span> the_xili_local_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%B %d, %Y'</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span>get_comment_time <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/Y H:i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #666666; font-style: italic;">/* impossible to use get_comment_date as it is itself filtered*/</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'get_comment_date'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliml_comment_date'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> xiliml_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thetime</span><span style="color: #339933;">,</span><span style="color: #000088;">$theformat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">/* param no used because php format */</span>	
  <span style="color: #b1b100;">return</span> the_xili_local_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%B %d, %Y - %H:%M'</span><span style="color: #339933;">,</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span>get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/Y H:i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_time'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliml_date'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> xiliml_modified_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thetime</span><span style="color: #339933;">,</span><span style="color: #000088;">$theformat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">/* param no used because php format */</span>	
  <span style="color: #b1b100;">return</span> the_xili_local_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%B %d, %Y - %H:%M'</span><span style="color: #339933;">,</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span>get_the_modified_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/Y H:i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_modified_time'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliml_modified_date'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Basically WordPress uses php date() format  &#8211; <a href="http://fr2.php.net/manual/en/function.date.php">http://fr2.php.net/manual/en/function.date.php</a> &#8211; and and internal static translation tools.</p>
<p>In the hooking function and in date format translation, the format depending of setlocale is used. See &#8211; <a href="http://fr2.php.net/manual/en/function.strftime.php">http://fr2.php.net/manual/en/function.strftime.php</a> &#8211; </p>
<p>With this way and if the server is well configured, the live translation of date / time works well.</p>
<p>For the .po file, the msgid format is &#8216;<strong>%B %d, %Y &#8211; %H:%M</strong>&#8216; and his translation in french can be &#8216;<strong>%d %B %Y &#8211; %Hh%M</strong>&#8216;</p>
<h4>FAQ</h4>
<p>* <strong>Why are these hooks inside the xilidev library and not inside the plugin itself ?</strong></p>
<p>Because the webmaster can modify it and the modifications will be not erased when the plugin is updated. (Don&#8217;t forget to check (and activate) this library in admin plugin&#8217;s UI)<br />
<div id="attachment_1486" class="wp-caption aligncenter" style="width: 308px"><a href="http://dev.xiligroup.com/wp-content/uploads/2010/02/gold_functions.png" rel="lightbox[post-1482]" ><img src="http://dev.xiligroup.com/wp-content/uploads/2010/02/gold_functions.png" alt="xilidev or gold functions" title="xilidev or gold functions" width="298" height="271" class="size-full wp-image-1486" /></a><p class="wp-caption-text">xilidev or gold functions</p></div><br />
* <strong>Why the parameters of <em>the_time()</em> are not used ?</strong></p>
<p>Because they need big translation and lot of lines. So it was better to bypass it and insert more flexible properties.</p>
<p>* <strong>In <em>the_time()</em> how to suppress the time ?</strong></p>
<p>Just modify the string &#8216;%B %d, %Y &#8211; %H:%M&#8217;  in &#8216;%B %d, %Y&#8217; .</p>
<p>* <strong>What do the function <em>the_xili_local_time()</em> ?</strong></p>
<p>This function inside the plugin translates a generic numeric date according current language of the post or the theme&#8217;s live language.</p>
<p>* <strong>On my website, I use different patterns inside <em>the_time()</em> depending category or single or&#8230; What do you recommend ?</strong><br />
Inside the filter function, add php &#8216;<em>switch case</em>&#8216; lines analyzing the $theformat passed (php format) and deliver &#8211; according these &#8211; the first param of <em>the_xili_local_time()</em> a setlocale format with <strong>%</strong>. It is indeed easy to choose a result with or without hour:min. After you have defined the list of format, don&#8217;t forget to translate them in .po (and .mo) of each language.</p>
<p>&nbsp;<br />&nbsp;<br /><fieldset class="series" ><legend>This posts belong to the series: xili-language for experts</legend><ol><li><a href='http://dev.xiligroup.com/?p=726' title="xili-language plugin : release 1.6.0 (compatible WP 3.0)">xili-language plugin : release 1.6.0 (compatible WP 3.0)</a></li><li><a href='http://dev.xiligroup.com/?p=1068' title="Q&A about xili-language plugin, release 1.1">Q&A about xili-language plugin, release 1.1</a></li><li><a href='http://dev.xiligroup.com/?p=1045' title="xili-language : hooks, filters, class and so on...">xili-language : hooks, filters, class and so on...</a></li><li><a href='http://dev.xiligroup.com/?p=1055' title="From a theme with localization to a multilingual theme with xili-language : technical and general notes.">From a theme with localization to a multilingual theme with xili-language : technical and general notes.</a></li><li><a href='http://dev.xiligroup.com/?p=1111' title="xili-language - 1.4.1 - new libraries">xili-language - 1.4.1 - new libraries</a></li><li><a href='http://dev.xiligroup.com/?p=1432' title="Xili-language toolbox in one table">Xili-language toolbox in one table</a></li><li>xili-language and the time</li><li><a href='http://dev.xiligroup.com/?p=1497' title="xili-language : Affichage des dates et heures">xili-language : Affichage des dates et heures</a></li></ol></fieldset>&nbsp;<br />&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1482</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xili-language &#8211; 1.4.1 &#8211; new libraries</title>
		<link>http://dev.xiligroup.com/?p=1111</link>
		<comments>http://dev.xiligroup.com/?p=1111#comments</comments>
		<pubDate>Mon, 15 Feb 2010 10:03:31 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[Expert's corner]]></category>
		<category><![CDATA[xili-language]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[multilingual theme]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1111</guid>
		<description><![CDATA[This release <strong>1.1.8</strong> adds new features dedicated to multilingual theme's creators and webmasters. Some new php functions, a folder to include functions shared by themes (not necessary to put functions in functions.php of the current theme); example with a shortcode to insert link inside content toward another post in a language. Since this release, xili-language is also tested with future wordpress 2.9-rare. ]]></description>
			<content:encoded><![CDATA[<p><em>This release <strong>xili-language 1.2.1</strong> adds new features dedicated to multilingual theme&#8217;s creators and webmasters. Some new php functions, a folder to include functions shared by themes (not necessary to put functions in functions.php of the current theme); example with a shortcode to insert link inside content toward another post in a language. Since this release, xili-language is also compliant with wordpress 2.9.</em> </p>
<p><div id="attachment_1120" class="wp-caption alignright" style="width: 299px"><img src="http://dev.xiligroup.com/wp-content/uploads/2009/10/gold_functions.png" alt="Gold functions" title="Gold functions" width="289" height="251" class="size-full wp-image-1120" /><p class="wp-caption-text">Gold functions</p></div></p>
<h4>Gold functions</h4>
<p>In sidebox &laquo;&nbsp;Settings&nbsp;&raquo;, a new check button appears if a folder named <strong>xilidev-libraries</strong> and containing a <strong>functions.php</strong> file was present inside your <strong>wp/content/plugins/</strong> folder.<br />
If this button is checked, all the functions inside this file was added when plugin is activated. Why it is interesting ? When adding here special filters or actions for hookable template tags of xili-language, you don&#8217;t need to copy and paste your functions of one theme to another theme.</p>
<h4>New functions in core of xili-language</h4>
<p>Two new functions was added for developers (since February &#8211; 3 new for time display) :<br />
<code>xiliml_get_lang_object_of_post($post_ID)</code> Return an object containing properties of the language set to the post passed as param (false if the post don&#8217;t exist or undefined language) See code for more infos.<br />
<code>xiliml_get_language($lang_nameorslug="")</code> Return an object containing properties of the language passed as slug (ex fr_fr) or name (ex fr_FR). False if the language doesn&#8217;t exist. <code>$result->description</code> gives the full name of the language set by you in xili-language settings.</p>
<p>To illustrate these new features, please find an example of functions.php here containing only two functions to create a shortcode named <strong>linkpost</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * shortcode to insert link to post in other languages inside the content 
 * example : [linkpost lang=&quot;fr_FR&quot;]link to french similar post[/linkpost] (if title=&quot;some text&quot; : title of link is set by replacing title 'A similar post in...')
 *
 *
 *@since 1.2
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> xiliml_build_linked_posts_shortcode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$arr_result</span> <span style="color: #339933;">=</span> shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'lang'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'title'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$arr_result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$language</span> <span style="color: #339933;">=</span> xiliml_get_language<span style="color: #009900;">&#40;</span><span style="color: #000088;">$lang</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* test if lang is available */</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$language</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$otherpost</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'lang-'</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$otherpost</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$obj_lang</span> <span style="color: #339933;">=</span> xiliml_get_lang_object_of_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$otherpost</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">!==</span> <span style="color: #000088;">$obj_lang</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$obj_lang</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'A similar post in'</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">.</span><span style="color: #000088;">$description</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error with target post #'</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$otherpost</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$otherpost</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; title=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">/* this link above can be enriched by image or flag */</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;a href=&quot;#&quot; title=&quot;'</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error: other post not present !!!'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xili-language'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'linkpost'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'xiliml_build_linked_posts_shortcode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Please find <a href='http://dev.xiligroup.com/wp-content/uploads/2009/10/xilidev-libraries.zip'>here a .zip</a> containing the folder &laquo;&nbsp;xilidev-libraries&nbsp;&raquo; to upload in wp-content/plugins/ directory and this example functions [enriched since Feb 28th, 2010].<br />
&nbsp;<br />&nbsp;<br /><fieldset class="series" ><legend>This posts belong to the series: xili-language for experts</legend><ol><li><a href='http://dev.xiligroup.com/?p=726' title="xili-language plugin : release 1.6.0 (compatible WP 3.0)">xili-language plugin : release 1.6.0 (compatible WP 3.0)</a></li><li><a href='http://dev.xiligroup.com/?p=1068' title="Q&A about xili-language plugin, release 1.1">Q&A about xili-language plugin, release 1.1</a></li><li><a href='http://dev.xiligroup.com/?p=1045' title="xili-language : hooks, filters, class and so on...">xili-language : hooks, filters, class and so on...</a></li><li><a href='http://dev.xiligroup.com/?p=1055' title="From a theme with localization to a multilingual theme with xili-language : technical and general notes.">From a theme with localization to a multilingual theme with xili-language : technical and general notes.</a></li><li>xili-language - 1.4.1 - new libraries</li><li><a href='http://dev.xiligroup.com/?p=1432' title="Xili-language toolbox in one table">Xili-language toolbox in one table</a></li><li><a href='http://dev.xiligroup.com/?p=1482' title="xili-language and the time">xili-language and the time</a></li><li><a href='http://dev.xiligroup.com/?p=1497' title="xili-language : Affichage des dates et heures">xili-language : Affichage des dates et heures</a></li></ol></fieldset>&nbsp;<br />&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1111</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xili-language toolbox in one table</title>
		<link>http://dev.xiligroup.com/?p=1432</link>
		<comments>http://dev.xiligroup.com/?p=1432#comments</comments>
		<pubDate>Fri, 12 Feb 2010 11:00:18 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[Expert's corner]]></category>
		<category><![CDATA[Full width]]></category>
		<category><![CDATA[xili-language]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[multilingual theme]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1432</guid>
		<description><![CDATA[In this table, all the main template tags, functions and hooks are grouped.]]></description>
			<content:encoded><![CDATA[<p>In this table, all the main template tags, functions and hooks are grouped. <em>(under finishing and pending review step).</em> This post will be frequently updated.</p>
<p><small>This table is a summary of the &laquo;&nbsp;technical&nbsp;&raquo; features of xili-language plugin and is dedicaced to webmaster and theme&#8217;s designer.</small></p>
<div id="toolbox" class="fullwidth" >
<table cellspacing="0" cellpadding="0">
<tbody>
<tr >
<td colspan="5" valign="top">
<p><b>Toolbox: xili-language plugin for a multilingual website in one table</b></p>
</td>
</tr>
<tr>
<td valign="top" class="ttd1">
<p>Name</p>
</td>
<td valign="top" class="ttd2">
<p>Definition</p>
</td>
<td valign="top" class="td3">
<p>Comment</p>
</td>
<td valign="top" class="ttd4" >
<p>Example</p>
</td>
<td valign="top" class="ttd5">
<p>Concern</p>
</td>
</tr>
<tr>
<td valign="top">
<p><b>WIDGETS</b></p>
</td>
<td colspan="2" valign="top">
<p><i>to enrich widget enable themes</i></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>Theme</p>
</td>
</tr>
<tr>
<td valign="top">
<p>Languages list</p>
</td>
<td valign="top">
<p>Display the list of available languages</p>
</td>
<td valign="top">
<p>Multiple widgets possible. If your theme contains functions that offer widget personalization, the item type must be filled. (<a href="?p=1045">see this post</a>)</p>
</td>
<td valign="top">
        <a href="wp-content/uploads/2010/02/language_list.png" rel="lightbox[post-1432]" ><img src="wp-content/uploads/2010/02/language_list-206x300.png" alt="" title="language_list" width="206" height="300" class="alignnone size-medium wp-image-1465" /></a>
      </td>
<td valign="top">
<p>sidebar</p>
</td>
</tr>
<tr>
<td valign="top">
<p>Recent comments</p>
</td>
<td valign="top">
<p>Display the list of recent comments in current displayed language. </p>
</td>
<td valign="top">
This widget was created because the default one cannot be translatable or offer sub-selection in one language.</p>
<p>multiple widgets possible</p>
</td>
<td valign="top">
        <a href="wp-content/uploads/2010/02/recent_comments.png" rel="lightbox[post-1432]" ><img src="wp-content/uploads/2010/02/recent_comments-292x300.png" alt="" title="Recent comments widget" width="292" height="300" class="alignnone size-medium wp-image-1468" /></a>
      </td>
<td valign="top">
<p>sidebar</p>
</td>
</tr>
<tr>
<td valign="top">
<p>Recent posts</p>
</td>
<td valign="top">
<p>Display list of recent posts in a choosen language</p>
</td>
<td valign="top">
<p>since v 1.4.0 for WP >2.8</p>
<p>This new widget solves conflicts or issues occuring when WP default widget is present (contains an <em>obscur</em> `wp_reset_query`). Also a choice of language of this list of recent posts is possible &#8211; not necessary the same of the current page. And you can install multiple widgets. <strong>Replace WP Recent Widget by this one named</strong> &#8211; <strong>List of recent posts</strong><em> -</p>
<p>multiple widgets possible with different languages (fixed or dynamic)</p>
</td>
<td valign="top">
       ----<a href="http://dev.xiligroup.com/wp-content/uploads/2010/02/screenshot-12.png" rel="lightbox[post-1432]" ><img src="http://dev.xiligroup.com/wp-content/uploads/2010/02/screenshot-12-207x300.png" alt="xili-language widgets: the new &quot;multiple&quot; widget to display list of recent posts in a choosen language." title="xili-language widgets: the new &quot;multiple&quot; widget to display list of recent posts in a choosen language." width="207" height="300" class="size-medium wp-image-1537" /></a>
      </td>
<td valign="top">
<p>sidebar</p>
</td>
</tr>
<tr>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p><b>TEMPLATE TAGS</b></p>
</td>
<td colspan="2" valign="top">
<p><i>usable by theme’s designer and webmaster</i></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>Theme</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_the_other_posts <br /><em>default parameters:</em> <br />
($post_ID,$before = &laquo;&nbsp;This post in&nbsp;&raquo;, $separator = &laquo;&nbsp;, &laquo;&nbsp;, $type = &laquo;&nbsp;display&nbsp;&raquo;)</p>
</td>
<td valign="top">
<p>in loop display the link of other posts defined as in other languages</p>
</td>
<td valign="top">
<p>can be used in theme template in single.php under the title</p>
<p> * example: if(class_exists(&#8216;xili_language&#8217;)) xiliml_the_other_posts($post-&gt;ID)</p>
<p><em>(in the example, the default template tag was hooked to display flag &#8211; see hooks rows below)</em></p>
</td>
<td valign="top">
       <a href="wp-content/uploads/2010/02/other-posts.png" rel="lightbox[post-1432]" ><img src="wp-content/uploads/2010/02/other-posts-300x62.png" alt="" title="other-posts" width="300" height="62" class="alignright size-medium wp-image-1461" /></a>
      </td>
<td valign="top">
<p>post &#8211; page &#8211; loop</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xili_post_language <br /><em>default parameters:</em> <br />($before = &#8216;&lt;span class=&nbsp;&raquo;xili-lang&nbsp;&raquo;&gt;(&#8216;, $after =&#8217;)&lt;/span&gt;&#8217;)</p>
</td>
<td valign="top">
<p>in loop display the language of the post</p>
</td>
<td valign="top">
<p>Useful inside a multilingual category loop.</p>
</td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;postsubtitleinfo&quot;&gt;
	&lt;small&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
			the_time<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/*__('F jS, Y','xilidev')*/</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&amp;nbsp;-&amp;nbsp;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'xili_language'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> xili_post_language<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;&lt;/div&gt;</pre></div></div>

</td>
<td valign="top">
<p>loop, category, search</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xili_language_list <br /><em>default parameters:</em> <br />($before = &#8216;&lt;li&gt;&#8217;, $after =&#8217;&lt;/li&gt;&#8217;, $theoption=&nbsp;&raquo;)</p>
</td>
<td valign="top">
<p>outside loop (sidebar) display the languages of the site (used also by widget)</p>
</td>
<td valign="top">
<p>When the theme don&#8217;t enable widget. Use this template tag to display the list in sidebar or (header and footer)</p>
</td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Languages'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xilidev'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;
	&lt;ul class=&quot;langs&quot;&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'xili_language_list'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			xili_language_list<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'siderss'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ul&gt;</pre></div></div>

</td>
<td valign="top">
<p>sidebar</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_the_category <br /><em>default parameters:</em> <br />($post_ID, $separator = &#8216;, &#8216; ,$echo = true)</p>
</td>
<td valign="top">
<p>replace the_category() tag of WP Core</p>
</td>
<td valign="top">
<p>The current template tag the_category is not hookable by plugin. So here the categories list of a post inside loop will be translated according the language of the current post.</p>
</td>
<td valign="top">
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;p class=&quot;postmetadata&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_tags<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Tags: '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliips'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">', '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">;</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Posted in'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliips'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">;</span> 
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'xili_language'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					xiliml_the_category<span style="color: #009900;">&#40;</span>get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">', '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
					the_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>  <span style="color: #000000; font-weight: bold;">?&gt;</span> | <span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_post_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliips'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' | '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>  <span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_popup_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Comments &amp;#187;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliips'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'1 Comment &amp;#187;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliips'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'% Comments &amp;#187;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliips'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;</pre></div></div>

</p>
</td>
<td valign="top">
<p>post &#8211; page &#8211; loop</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_langinsearchform <br /><em>default parameters:</em> <br />($before=&nbsp;&raquo;,$after=&nbsp;&raquo;)</p>
</td>
<td valign="top">
<p>Template Tag insertable in search form for sub-selection of a language</p>
</td>
<td valign="top">
<p>As in example, this function add a way to limit the search to a target language.</p>
</td>
<td valign="top">
<p><img src="wp-content/uploads/2010/02/search.png" alt="" title="search" width="208" height="95" class="alignnone size-full wp-image-1463" /></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Search'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xilidev'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;
              &lt;form id=&quot;searchform&quot; method=&quot;get&quot; action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&nbsp;
                &lt;input type=&quot;text&quot; name=&quot;s&quot; id=&quot;s&quot; size=&quot;15&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_search_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
&nbsp;
                &lt;input type=&quot;submit&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'go'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xilidev'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;br/&gt;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'xiliml_langinsearchform'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> xiliml_langinsearchform <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;span class=&quot;radiosearch&quot; &gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
              &lt;/form&gt;</pre></div></div>

</td>
<td valign="top">
<p>search &#8211; sidebar</p>
</td>
</tr>
<tr>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p><b>FUNCTIONS</b></p>
</td>
<td colspan="2" valign="top">
<p><i>usable by developer with knowledges in php (see php source)</i></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>CMS</p>
</td>
</tr>
<tr>
<td valign="top">
<p>the_curlang()</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>theme</p>
</td>
</tr>
<tr>
<td valign="top">
<p>the_cur_langs_group_id()</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p>the_xili_local_time <br /><em>default parameters:</em> <br />($format=&#8217;%B %d, %Y&#8217;,$time = null)</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>time</p>
</td>
</tr>
<tr>
<td valign="top">
<p>get_cur_language ($post_ID)</p>
</td>
<td valign="top">
<p>Return the language of current post in loop</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>see below</p>
</td>
<td valign="top">
<p>loop</p>
</td>
</tr>
<tr>
<td valign="top">
<p>get_cur_post_lang_dir ($post_ID)</p>
</td>
<td valign="top">
<p>Return the lang and dir of language of current post in loop.</p>
</td>
<td valign="top">
<p> The example on right uses this tag and the above one.</p>
</td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> while (have_posts()) : the_post(); 
			$langdir = ((function_exists('get_cur_post_lang_dir')) ? get_cur_post_lang_dir($post-&gt;ID) : array()); ?&gt;
      		&lt;div class=&quot;story <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$langdir</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'direction'</span><span style="color: #009900;">&#93;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'borders_'</span><span style="color: #339933;">.</span>get_cur_language<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/*style*/</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div>

</td>
<td valign="top">
<p>loop</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_get_lang_object_of_post ($post_ID)</p>
</td>
<td valign="top">
<p>Return language object of a post.</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>loop</p>
</td>
</tr>
<tr>
<td valign="top">
<p>choice_of_browsing_language()</p>
</td>
<td valign="top">
<p>Return the language of current browser.</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>visitor’s browser</p>
</td>
</tr>
<tr>
<td valign="top">
<p>choice_of_browsing_lang_dir()</p>
</td>
<td valign="top">
<p>Return the lang and dir of current browser.</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>visitor’s browser lang and direction</p>
</td>
</tr>
<tr>
<td valign="top">
<p>add_again_filter ($filtername,$filterfunction)</p>
</td>
<td valign="top">
<p>Activate hooks of plugin in class.</p>
</td>
<td valign="top">
<p>Reserved for high level developers &#8211; see code of function below</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_get_category_link ($catid = 0)</p>
</td>
<td valign="top">
<p>Replace get_category_link to bypass hook from xili_language</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_recent_comments</p>
</td>
<td valign="top">
<p>Recent comments &#8211; used by xili widget &#8211; usable if you need to create your own template tag</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>comments</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_get_language ($lang_nameorslug=&nbsp;&raquo;")</p>
</td>
<td valign="top">
<p>Return full object of a language</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p>ex_pages_by_lang ($pages, $r)</p>
</td>
<td valign="top">
<p>sub selection of pages for wp_list_pages()</p>
</td>
<td valign="top">
<p>example to use as hook </p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>sidebar</p>
</td>
</tr>
<tr>
<td valign="top">
<p>function xiliml_force_loop_lang ($lang_query_tag)</p>
</td>
<td valign="top">
<p>functions to change loop&#8217;s query tag of language</p>
</td>
<td valign="top">
<p>useful for sidebar widgets and latest posts widget &#8211; since 1.3.0</p>
<p><em>Even if the main loop is in one language, in the sidebar, it is possible to &laquo;&nbsp;force&nbsp;&raquo; the language in another one for the widgets.</em></p>
</td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
xiliml_force_loop_lang<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;fr_fr&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sidebar top'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;ul&gt;
 &lt;li&gt;?&lt;/li&gt;
&lt;/ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> xiliml_restore_loop_lang<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
					xiliml_force_loop_lang<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;en_us&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sidebar topus'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			&lt;ul&gt;
 				&lt;li&gt;?&lt;/li&gt;
			&lt;/ul&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> xiliml_restore_loop_lang<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Another example :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
 <span style="color: #666666; font-style: italic;">//echo the_curlang();</span>
 <span style="color: #666666; font-style: italic;">/* in this case, the widgets are forced as current lang of the theme - useful in home when query tag 'lang' is not defined -*/</span>
 xiliml_force_loop_lang<span style="color: #009900;">&#40;</span>the_curlang<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sidebar top'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
 &lt;ul&gt;
  &lt;li&gt;?&lt;/li&gt;
 &lt;/ul&gt;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> xiliml_restore_loop_lang<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</td>
<td valign="top">
<p>sidebar, widget</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_restore_loop_lang ()</p>
</td>
<td valign="top">
<p>functions to restore loop&#8217;s query tag of language</p>
</td>
<td valign="top">
<p>see above</p>
</td>
<td valign="top">
        <div id="attachment_1480" class="wp-caption alignleft" style="width: 230px"><a href="http://dev.xiligroup.com/wp-content/uploads/2010/02/latestpostss.png" rel="lightbox[post-1432]" ><img src="http://dev.xiligroup.com/wp-content/uploads/2010/02/latestpostss.png" alt="Snapshot of example above" title="Snapshot of example above" width="220" height="340" class="size-full wp-image-1480" /></a><p class="wp-caption-text">Snapshot of example above</p></div>
      </td>
<td valign="top">
<p>sidebar, widget</p>
</td>
</tr>
<tr>
<td valign="top">
<p>xiliml_add_lang_to_parsed_query ()</p>
</td>
<td valign="top">
<p>function for filter &#8216;parse_query&#8217; to authorize lang query tag in custom WP_Query()</p>
</td>
<td valign="top">
<p>since 1.4.0</p>
<p>useful for function or plugin that put posts inside post&#8230;</p>
</td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #666666; font-style: italic;">/* example: */</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'parse_query'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliml_add_lang_to_parsed_query'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$r</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thequery</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 remove_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'parse_query'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'xiliml_add_lang_to_parsed_query'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
<td valign="top">
<p>loop, custom queries</p>
</td>
</tr>
<tr>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p><b>SHORTCODE</b></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p>linked post</p>
</td>
<td valign="top">
<p>example of shortcode using plugin functions</p>
</td>
<td valign="top">
<p>this code can be inserted in dedicaced functions detectable inside this folder: wp-content/plugins/xilidev-libraries &#8211; <a href="?p=1111">see this post</a> &#8211; </p>
</td>
<td valign="top">
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #339933;">&lt;</span>em<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#91;</span>linkpost lang<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fr_FR&quot;</span><span style="color: #009900;">&#93;</span>Cette page en français<span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span>linkpost<span style="color: #009900;">&#93;</span><span style="color: #339933;">&lt;/</span>em<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span></pre></div></div>

</p>
</td>
<td valign="top">
<p>post content</p>
</td>
</tr>
<tr>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p><b>HOOKS</b></p>
</td>
<td colspan="2" valign="top">
<p><i>Main functions and template tags of xili-language are modifiable by hooks to have better and adapted CMS behaviour.</i></p>
<p><i>It is useful for developer with deep knowledges in php and wp (see end of php source)</i></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>CMS</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>xiliml_the_category</strong></p>
<p>add_action (&#8216;xiliml_the_category&#8217;,'your_xiliml_the_category&#8217;,10,3)</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>template tag</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>xiliml_the_other_posts</strong></p>
<p>add_action(&#8216;xiliml_the_other_posts&#8217;,'your_xiliml_the_other_posts&#8217;,10,3)</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>template tag</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>xili_post_language</strong></p>
<p>add_action(&#8216;xili_post_language&#8217;,'your_xili_post_language&#8217;,10,2)</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>template tag</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>xili_language_list</strong></p>
<p>add_action(&#8216;xili_language_list&#8217;,'your_xili_language_list&#8217;,10,3)</p>
</td>
<td valign="top">
<p>In this <a href="http://dev.xiligroup.com/?p=989">example described formerly</a>, the list of languages is enriched by flags:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_xili_language_list<span style="color: #009900;">&#40;</span><span style="color: #000088;">$before</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$after</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span><span style="color: #000088;">$theoption</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$theoption</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'top'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">/* usable in type item in new multiple widget */</span>
		<span style="color: #000088;">$listlanguages</span> <span style="color: #339933;">=</span> get_terms_of_groups_lite <span style="color: #009900;">&#40;</span>the_cur_langs_group_id<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>TAXOLANGSGROUP<span style="color: #339933;">,</span>TAXONAME<span style="color: #339933;">,</span><span style="color: #0000ff;">'ASC'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$a</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$currenturl</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/?'</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$listlanguages</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$language</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">//QUETAG</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'ar_ar'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'ar_ma'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$a</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$before</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;a href='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$currenturl</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;hlang&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' title='&quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Latest posts selected'</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'in '</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &lt;img src='&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/images/flags/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.png' alt='' /&gt;&lt;/a&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$after</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$a</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">/* the current list in sidebar with category sub selection*/</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
			<span style="color: #000088;">$catcur</span> <span style="color: #339933;">=</span> xiliml_get_category_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$currenturl</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$catcur</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;amp;'</span><span style="color: #339933;">;</span> 
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		 	<span style="color: #000088;">$currenturl</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/?'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$listlanguages</span> <span style="color: #339933;">=</span> get_terms_of_groups_lite <span style="color: #009900;">&#40;</span>the_cur_langs_group_id<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>TAXOLANGSGROUP<span style="color: #339933;">,</span>TAXONAME<span style="color: #339933;">,</span><span style="color: #0000ff;">'ASC'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$listlanguages</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$language</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'ar_ar'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'ar_ma'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$before</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>the_curlang<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
						<span style="color: #000088;">$beforee</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;li class=&quot;current-cat&quot; &gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #000088;">$beforee</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
				 <span style="color: #000088;">$a</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$beforee</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;a href='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$currenturl</span><span style="color: #339933;">.</span>QUETAG<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' title='&quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Posts selected'</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'in '</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &lt;img src='&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/images/flags/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">slug</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.png' alt='' /&gt; &quot;</span><span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'in '</span><span style="color: #339933;">.</span><span style="color: #000088;">$language</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$after</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$currenturl</span> <span style="color: #339933;">=</span> xiliml_get_category_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$a</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$before</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;a href='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$currenturl</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' title='&quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Posts of current category in all languages'</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' &gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &lt;img src='&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/images/flags/www.png' alt='' /&gt; &quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'in all languages'</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$after</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$a</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'xili_language_list'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'my_xili_language_list'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
<td valign="top">
<p>template tag</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>xiliml_langinsearchform</strong></p>
<p>add_action(&#8216;xiliml_langinsearchform&#8217;,'your_xiliml_langinsearchform&#8217;,10,2)</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>sidebar</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>xiliml_cat_language</strong></p>
<p>add_filter(&#8216;xiliml_cat_language&#8217;,'my_rules_for_cat_language&#8217;,2,3);</p>
</td>
<td valign="top">
<p>Exemple to show translated and original item</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_rules_for_cat_language <span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #339933;">,</span> <span style="color: #000088;">$category</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$curlang</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">/*to detect admin UI*/</span>
	      	<span style="color: #000088;">$new_cat_name</span> <span style="color: #339933;">=</span>  __<span style="color: #009900;">&#40;</span><span style="color: #000088;">$category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">,</span>THEME_TEXTDOMAIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	      	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_cat_name</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> 
	      		<span style="color: #000088;">$new_cat_name</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot; (&quot;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;) &quot;</span><span style="color: #339933;">;</span>
	      	<span style="color: #b1b100;">endif</span>
	    <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span>
	    	<span style="color: #000088;">$new_cat_name</span> <span style="color: #339933;">=</span>  <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
	    <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> 
	    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$new_cat_name</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span> 
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'xiliml_cat_language'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'my_rules_for_cat_language'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
<td valign="top">
<p>sidebar</p>
<p>wp list categories</p>
<p>content</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>head_insert_language_metas</strong></p>
<p>add_filter(&#8216;head_insert_language_metas&#8217;,'my_head_insert_language_metas&#8217;,1,2);</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>header xhtml</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>head_language_attributes</strong></p>
<p>add_filter(&#8216;head_language_attributes&#8217;,'my_ head_language_attributes&#8217;,1,1);</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p>header xhtml</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p><strong>xiliml_cur_lang_head</strong></p>
<p>add_filter(&#8216;xiliml_cur_lang_head&#8217;,'my_xiliml_cur_lang_head&#8217;,1);</p>
</td>
<td valign="top">
<p>default rules &#8211; set curlang in head according rules</p>
</td>
<td valign="top">
<p>multilingual behaviour (front, cat, search,&#8230;)</p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>More technical hooks and filters inside xili-language</p>
<p><i>(Read the plugin php source for more infos)</i></p>
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>choice_of_browsing_language</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>xiliml_link_translate_desc</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>xiliml_single_cat_title_translate</p>
</td>
<td valign="top">
<p>used by filter for wp_title() tags &#8211; since 1.4.1</p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>xiliml_getarchives_where</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>xiliml_getarchives_join</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>xiliml_modify_querytag</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>xiliml_taglink_append_lang</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<p>xiliml_link_append_lang</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p><b>OTHER FILTERS</b></p>
</td>
<td colspan="2" valign="top">
<p>Some template tags inside WP core are not fully multilingual and need filters.</p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
        <functions file
      </td>
</tr>
<tr>
<td colspan="2" valign="top">
<p>the_time</p>
<p>add_filter(&#8216;the_time&#8217;,'my_date&#8217;,10,2);</p>
</td>
<td valign="top">
        Date management and translation are very complicated. Here by using a xili-language function, it is possible to modify the basic behaviour of the current template tag <strong>the_time</strong>.
      </td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thetime</span><span style="color: #339933;">,</span><span style="color: #000088;">$theformat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">/* param no used because php format */</span>	
  <span style="color: #b1b100;">return</span> the_xili_local_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%B %d, %Y - %H:%M'</span><span style="color: #339933;">,</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span>get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/Y H:i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_time'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'my_date'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
<td valign="top">
        Post, Page
      </td>
</tr>
<tr>
<td colspan="2" valign="top">
<p>the_modified_time</p>
<p>add_filter(&#8216;the_modified_time&#8217;,'my_modified_date&#8217;,10,2);</p>
</td>
<td valign="top">
         Date management and translation are very complicated. Here by using a xili-language function, it is possible to modify the basic behaviour of the current template tag <strong>the_modified_time</strong>.
      </td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_modified_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thetime</span><span style="color: #339933;">,</span><span style="color: #000088;">$theformat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">/* param no used because php format */</span>	
  <span style="color: #b1b100;">return</span> the_xili_local_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%B %d, %Y - %H:%M'</span><span style="color: #339933;">,</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span>get_the_modified_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/Y H:i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_modified_time'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'my_modified_date'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
<td valign="top">
        Post, Page
      </td>
</tr>
<tr>
<td colspan="2" valign="top">
<p>get_comment_date</p>
<p>add_filter(&#8216;get_comment_date&#8217;,'my_comment_date&#8217;,10,2);</p>
</td>
<td valign="top">
      This is the date of each comments in the comments loop.
      </td>
<td valign="top">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_comment_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment_time</span><span style="color: #339933;">,</span><span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">/* params no used because php format */</span>
  <span style="color: #666666; font-style: italic;">/* the first param is to be as msgid in .po example: %B %d, %Y - %H:%M or %B %d, %Y at %H:%M   */</span>	
  <span style="color: #b1b100;">return</span> the_xili_local_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%B %d, %Y'</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span>get_comment_time <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/Y H:i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #666666; font-style: italic;">/* impossible to use get_comment_date as it is itself filtered*/</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'get_comment_date'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'my_comment_date'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</td>
<td valign="top">
        Comments
      </td>
</tr>
<tr>
<td colspan="3" valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
<td valign="top">
<p></p>
</td>
</tr>
<tr>
<td valign="top" class="ttd1">
<p>© dev.xiligroup.com</p>
</td>
<td valign="top" class="ttd2">
<p>2010</p>
</td>
<td valign="top" class="ttd3">
<p></p>
</td>
<td valign="top" class="ttd4">
<p></p>
</td>
<td valign="top" class="ttd5">
<p></p>
</td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;<br />&nbsp;<br />
Please use the <a href="http://forum.dev.xiligroup.com/">forum</a> for questions or comments.<br />
&nbsp;<br />&nbsp;<br />
&nbsp;<br />&nbsp;<br /><fieldset class="series" ><legend>This posts belong to the series: xili-language for experts</legend><ol><li><a href='http://dev.xiligroup.com/?p=726' title="xili-language plugin : release 1.6.0 (compatible WP 3.0)">xili-language plugin : release 1.6.0 (compatible WP 3.0)</a></li><li><a href='http://dev.xiligroup.com/?p=1068' title="Q&A about xili-language plugin, release 1.1">Q&A about xili-language plugin, release 1.1</a></li><li><a href='http://dev.xiligroup.com/?p=1045' title="xili-language : hooks, filters, class and so on...">xili-language : hooks, filters, class and so on...</a></li><li><a href='http://dev.xiligroup.com/?p=1055' title="From a theme with localization to a multilingual theme with xili-language : technical and general notes.">From a theme with localization to a multilingual theme with xili-language : technical and general notes.</a></li><li><a href='http://dev.xiligroup.com/?p=1111' title="xili-language - 1.4.1 - new libraries">xili-language - 1.4.1 - new libraries</a></li><li>Xili-language toolbox in one table</li><li><a href='http://dev.xiligroup.com/?p=1482' title="xili-language and the time">xili-language and the time</a></li><li><a href='http://dev.xiligroup.com/?p=1497' title="xili-language : Affichage des dates et heures">xili-language : Affichage des dates et heures</a></li></ol></fieldset>&nbsp;<br />&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1432</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xili-language: a helpful shortcode</title>
		<link>http://dev.xiligroup.com/?p=1400</link>
		<comments>http://dev.xiligroup.com/?p=1400#comments</comments>
		<pubDate>Tue, 08 Dec 2009 13:49:10 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[Plugins WP]]></category>
		<category><![CDATA[xili-language]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[multilingual theme]]></category>
		<category><![CDATA[shortcode]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1400</guid>
		<description><![CDATA[Example with shortcode linkedpost]]></description>
			<content:encoded><![CDATA[<p>In previous <a href="http://dev.xiligroup.com/?p=1111">post</a>, a new libraries was presented to add a shortcode &#8216;linkedpost&#8217; that allow to insert a link to a similar post in another language.<br />
It is useful if you cannot modify the template and add the template tag named xiliml_the_other_posts (<a href="http://dev.xiligroup.com/?p=972">see</a>).<br />
<div id="attachment_1401" class="wp-caption alignnone" style="width: 310px"><a href="http://dev.xiligroup.com/wp-content/uploads/2009/12/xili-language-shortcode.png" rel="lightbox[post-1400]" ><img src="http://dev.xiligroup.com/wp-content/uploads/2009/12/xili-language-shortcode-300x99.png" alt="xili-language shortcode" title="xili-language shortcode" width="300" height="99" class="size-medium wp-image-1401" /></a><p class="wp-caption-text">xili-language shortcode</p></div></p>
<p>Don&#8217;t forget to verify that language of current post and language of linked post (or page) is set in left meta-box.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1400</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Class: modify or extend ?</title>
		<link>http://dev.xiligroup.com/?p=1357</link>
		<comments>http://dev.xiligroup.com/?p=1357#comments</comments>
		<pubDate>Sun, 29 Nov 2009 08:18:04 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[Expert's corner]]></category>
		<category><![CDATA[xili-plugins]]></category>
		<category><![CDATA[class extend]]></category>
		<category><![CDATA[floom]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1357</guid>
		<description><![CDATA[After the creation of xili-floom-slideshow: Here, through the example of the original Floom javascript (displaying a pretty slideshow), we will present and discuss the ways to improve features and events of this script containing a core class. This well documented class is based on powerful Mootools framework (>1.2.2). The first report : Floom is a [...]]]></description>
			<content:encoded><![CDATA[After the creation of <a href="http://dev.xiligroup.com/?p=1241">xili-floom-slideshow</a>:
<em>Here, through the example of the original <a href="http://blog.olicio.us/2009/07/25/floom/">Floom javascript</a> (displaying a pretty slideshow), we will present and discuss the ways to improve features and events of this script containing a core class.</em>

This well documented class is based on powerful Mootools framework (>1.2.2).

<h5>The first report :</h5>
Floom is a standalone (insulated) javascript class ( and don&#8217;t offer enough dialogs with environment &#8211; only two events &#8211; <em>end of preload images, or when slides change</em> &#8211; and impossible to stop it).
The script contains two errors (start and end index of series of images).

<h5>What is wished?</h5>
Some events fired by Floom : onFirst, onLast,  &#8230;
Some events detected and received by Floom : when container is clicked (to stop and start it) and when mouse enter in caption (the image legend).
<h5>Step by step</h5>
At the beginning, for tests, the script was modified  but remembering the OOP and Class architecture of Mootools, we try to create an extension of the original class. 
The first way is dangerous because it is very uneasy to maintain the script if the original will be updated by the author. The second is easiest because the work is only on the new class extending the first.
Research on net was not very easy because the multiple ways of scripting depend from the old and recent versions of Mootools and javascript. The Mootools  documentation proved most effective, even with these small examples because examples on most blogs are often out-of-date.
&nbsp;<br />
The new class is named here <strong>xiliFloom</strong>.
&nbsp;<br />


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> xiliFloom <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">Extends</span><span style="color: #339933;">:</span> Floom<span style="color: #339933;">,</span>
    options<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        stopandgo<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
        originwrap <span style="color: #339933;">:</span> <span style="color: #000088;">$empty</span><span style="color: #339933;">,</span>
        onFirst<span style="color: #339933;">:</span>     <span style="color: #000088;">$empty</span><span style="color: #339933;">,</span>
        onLast<span style="color: #339933;">:</span>     <span style="color: #000088;">$empty</span><span style="color: #339933;">,</span>
        onClickWrapper<span style="color: #339933;">:</span>     <span style="color: #000088;">$empty</span><span style="color: #339933;">,</span>
        onInvader<span style="color: #339933;">:</span>     <span style="color: #000088;">$empty</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>



First property : <strong>Extends</strong> the Class that xiliFloom will extend.
&nbsp;<br />
<strong>options :</strong> here only new options are added (parameters and event names that the new class will fire &#8211; onFirst, onLast&#8230;)
&nbsp;<br />&nbsp;<br />


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">initialize <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>wrapper<span style="color: #339933;">,</span> slides<span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        this<span style="color: #339933;">.</span>parent<span style="color: #009900;">&#40;</span>wrapper<span style="color: #339933;">,</span> slides<span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>originwrap <span style="color: #339933;">=</span> wrapper<span style="color: #339933;">;</span> 
        $<span style="color: #009900;">&#40;</span>wrapper<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>addEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'click'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>stopandgo <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">-</span> this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>stopandgo<span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>stopandgo <span style="color: #339933;">===</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>this<span style="color: #339933;">.</span>restart<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>           
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>stopandgo <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #000088;">$clear</span><span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span>periodicalblinds<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
            this<span style="color: #339933;">.</span>fireEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onClickWrapper'</span><span style="color: #339933;">,</span> this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>stopandgo<span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">.</span>bind<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>



<strong>initialize :</strong> the first entry of the function of this property is important here : this.parent() will call initialize of the parent class Floom. And after adds other value, function or event. Here an event &#8216;click&#8217; is added to the main wrapper containing all images.
&nbsp;<br />&nbsp;<br />
Some other properties of the parent class are overriden (partially or completed).


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">createCaptions<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        this<span style="color: #339933;">.</span>parent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        this<span style="color: #339933;">.</span>captions<span style="color: #339933;">.</span>addEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mouseenter'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            this<span style="color: #339933;">.</span>mouseinvader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">.</span>bind<span style="color: #009900;">&#40;</span>this<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    step<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        this<span style="color: #339933;">.</span>parent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide <span style="color: #339933;">==</span> this<span style="color: #339933;">.</span>slides<span style="color: #339933;">.</span>length<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>this<span style="color: #339933;">.</span>fireEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onLast'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span>this<span style="color: #339933;">.</span>slides<span style="color: #009900;">&#91;</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide <span style="color: #339933;">===</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>this<span style="color: #339933;">.</span>fireEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onFirst'</span><span style="color: #339933;">,</span> this<span style="color: #339933;">.</span>slides<span style="color: #009900;">&#91;</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>



<strong>createCaptions</strong> (create the legend block) : after the parent call, here only one event is added &#8211; when a mouse enter in the block containing captions of the slideshow.
&nbsp;<br />
<strong>step :</strong> (manage the changing of images inside the slideshow)  after the parent call, if the conditions are met, events are fired:
onFirst &#8211; if the first image is displayed (current image object is passed as parameter).
onLast &#8211;  if the last image is displayed (current image object is passed as parameter and his index).
&nbsp;<br />&nbsp;<br />
&nbsp;<br />&nbsp;<br />


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">restart<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        wrapper <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>originwrap<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>originwrap<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        this<span style="color: #339933;">.</span>createStructure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
    goto<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>e <span style="color: #339933;">&lt;</span> this<span style="color: #339933;">.</span>slides<span style="color: #339933;">.</span>length<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        	this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide <span style="color: #339933;">=</span> e<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
        	this<span style="color: #339933;">.</span>step<span style="color: #339933;">.</span>delay<span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>animation<span style="color: #339933;">,</span> this<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    	<span style="color: #009900;">&#125;</span>       
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    mouseinvader <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
        this<span style="color: #339933;">.</span>fireEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onInvader'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span>this<span style="color: #339933;">.</span>slides<span style="color: #009900;">&#91;</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



New properties are here added for the future needs of xili-floom-slideshow plugin wordpress plugin (also usable elsewhere):
&nbsp;<br />
<strong>restart: </strong>is a property containing a function used when a click event occurs on slideshow. In the parent class there is no equivalent property.
&nbsp;<br />
<strong>goto: </strong>is a property containing a function called by a external action to jump to a specified image. The parameter is the index beginning at 1. Our target is to create a thumbnail image gallery. When the user will click on one the slideshow will jump to this full image. In <a href="http://dev.xiligroup.com/?p=1319">this post</a>, the tabs are now linked to corresponding images.
&nbsp;<br />
&#8230; and all the properties that can be possible to design&#8230;.
&nbsp;<br />&nbsp;<br />
<h5>Before to conclude</h5>
To be honest, only three modications were done inside the original script. (commented by //XF)
Two concern the errors on image indexing. (start and end of the loop of images array) &#8211; described in comments of the original post.&nbsp;<br />
One is more interesting &#8211; animateBlinds which is recursive. &nbsp;<br />


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">onPreload<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        this<span style="color: #339933;">.</span>periodicalblinds <span style="color: #339933;">=</span> this<span style="color: #339933;">.</span>animateBlinds<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>periodical<span style="color: #009900;">&#40;</span>this<span style="color: #339933;">.</span>options<span style="color: #339933;">.</span>interval<span style="color: #339933;">,</span> this<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//XF</span>
&nbsp;
        this<span style="color: #339933;">.</span>fireEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onPreload'</span><span style="color: #339933;">,</span> this<span style="color: #339933;">.</span>slides<span style="color: #009900;">&#91;</span>this<span style="color: #339933;">.</span><span style="color: #990000;">current</span><span style="color: #339933;">.</span>slide<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>



Inside Preload, this function was fired with periodical Method but not affected to a var. this.periodicalblinds is added and will be useful in the new class to stop the periodic execution through the click event  -and function $clear(this.periodicalblinds) -
Because this function animateBlinds is recursive, it is impossible to override his content. It doesn&#8217;t matter here.
&nbsp;<br />&nbsp;<br />
<h5>domready</h5>
In the Event domready, the constructor is now used and not the previous Element.implement name &#8211; floom  &#8211; as before.
With this writting approach, in the php/js scripting, it will be easier to construct (for test or gold services) parent class (Floom) or new class (xiliFloom).


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">// Floom or xiliFloom
				theFloom = new <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$xili_settings</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'goldparam'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>Floom('<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$floom_divs</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>',slides, {
				prefix: '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$xili_settings</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'prefix'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">/* only global settings */</span><span style="color: #000000; font-weight: bold;">?&gt;</span>',
				amount: <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$amount</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>,</pre></div></div>



&nbsp;<br />&nbsp;<br />
<em>Hope this &#8216;step by step&#8217; has helped you for better understanding&#8230;</em>
&nbsp;<br />
<h5>WordPress Expert Corner </h5>
In your theme functions.php, because the new class (that you can adapt to your theme) is in another file upload inside the current theme. A hook filter must be used like below (example).


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> xilifloom_theme_header <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">/* option if mootools is elsewhere */</span>	
			wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mootools-core'</span><span style="color: #339933;">,</span>FLOOMURL<span style="color: #339933;">.</span><span style="color: #0000ff;">'/js/mootools-core.js'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'1.2.4'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mootools-more'</span><span style="color: #339933;">,</span>FLOOMURL<span style="color: #339933;">.</span><span style="color: #0000ff;">'/js/mootools-more.js'</span><span style="color: #339933;">,</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mootools-core'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'1.2.4.2'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'floom'</span><span style="color: #339933;">,</span>FLOOMURL<span style="color: #339933;">.</span><span style="color: #0000ff;">'/js/floom-1.0.js'</span><span style="color: #339933;">,</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mootools-core'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mootools-more'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'1.0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'xilifloom'</span><span style="color: #339933;">,</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/js/xilifloom-1.0xf.js'</span><span style="color: #339933;">,</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'floom'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'1.0xf'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// and other js.... for events....		</span>
	<span style="color: #009900;">&#125;</span>
	add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_print_scripts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'xilifloom_theme_header'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



When updating the plugin, the specific scripts were not be overwritten.&nbsp;<br />
Soon, a new version of xili-floom-slideshow plugin !
&nbsp;<br />&nbsp;<br />





]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1357</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xili-floom-slideshow : fireEvent when picture changes ! (updated)</title>
		<link>http://dev.xiligroup.com/?p=1319</link>
		<comments>http://dev.xiligroup.com/?p=1319#comments</comments>
		<pubDate>Sun, 22 Nov 2009 22:41:07 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[Expert's corner]]></category>
		<category><![CDATA[xili-plugins]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[floom]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1319</guid>
		<description><![CDATA[Floom slideshow fire event when image changes...]]></description>
			<content:encoded><![CDATA[<div id="blinds-cont"><div id="blinds"></div></div>
<div id="wrapper"><div id="heading"> 
			<ul id="buttons">
				<li class="firstbbt" onClick="theFloom.goto(1);">First Picture</li>
				<li class="secondbbt" onClick="theFloom.goto(2);">Second Picture</li>
<li class="thirdbbt" onClick="theFloom.goto(3);">Third Picture</li>
			</ul>
			 </div><div id="panes"><div id="content"><div class="pane xililanglook" style="display:block;" id="tab-1">A detail of the <strong>first image</strong> :
&nbsp;<br />
<img src="http://dev.xiligroup.com/wp-content/uploads/2009/11/DET_1.jpg" alt="Village on automn" title="Village on automn" width="320" height="240" class="alignleft size-full wp-image-1332" /><em>Ut praessectet ipisci ea faci blamconse feugue ver se ea aliquip ustin et ulput landreet, sequatum dolobore min volore exeriusto doloreet am alisismolore modipit lore dio euissim at vel euguero od magnit, quismod modolore faccumsandio commodio dit utem volor iriureet eum dipisci cidui blaore doluptat.</em> Ut veliquatum irit prat.
</div><div class="pane xililanglook" style="display:block;" id="tab-2">
<img src="http://dev.xiligroup.com/wp-content/uploads/2009/11/DET_2-300x225.png" alt="Sky and tree" title="Sky and tree" width="300" height="225" class="alignright size-medium wp-image-1331" />A zoom of the <strong>second image</strong> : &nbsp;<br /><em>Lore del iuscin ut alit wisi tet volutat veniamet lummy nis adionsecte faccum incillummy nostrud tat, veliquat praesent nonullam diatumsan heniscipsum nullandre ming essismod er accum doloreet venis dipit dolor ad modolortion henisismodit praessi blan esseniat.</em>
</div><div class="pane xililanglook" style="display:block;" id="tab-3">A zoom of the <strong>third image</strong> :&nbsp;<br />
<img src="http://dev.xiligroup.com/wp-content/uploads/2009/11/DET_3.png" alt="Color" title="Color" width="320" height="240" class="alignleft size-full wp-image-1329" /><em>Lorperos esto odo dion hent augue facin velesectet, quat wissi esto od magniss quipit il in velit iliquis aut ip eugiat. Ut ipit loreet, susto commy nibh ent velenis nis am veliquat vel ullutat ing et iure facil in ex eui euguero eugueros exercil deliquam <strong>venibh eum vel in et</strong>, quis nim in henis do erosto conulluptat nonsequi blamet vel ut utetum quamet, sum velesequip et, susto consequ ssenit veliquam zzriustrud min hent lor inci exeriliquat ip euipsum vent lummy <strong>nibh eum</strong> quate ea facipit diamet ea commy nullaore ea adiam dit duis ad dipis esed euguer sumsandiamet deliquat aliquatuer se dolore eugiat.</em>



</div></div></div></div>
<hr />
Here, the cycle of images drives the sliding tabs below. Both scripts are made with Mootools framework. As demo, it is very simple to see what happen&#8230;
As you can observe, the event is fired when the image has finished to change&#8230; And also if you click in a tab of the tabbed post &#8211; it is possible with a new class <strong>extending</strong> the Floom class (see <a href="http://dev.xiligroup.com/?p=1357">modify or extend?</a>). 
&nbsp;<br />&nbsp;<br />
<h5>How to ?</h5>
 1) add JS functions in your header:


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span> 
	<span style="color: #000000; font-weight: bold;">function</span> nextslidingtab<span style="color: #009900;">&#40;</span>slide<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$chk</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'idoftargetobject'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			yourfunction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> preloadfired<span style="color: #009900;">&#40;</span>slide<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$chk</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'idoftargetobject'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			initfunction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>



Set inside xili-floom-slideshow the value for target functions :

<span id="attachment_1343" class="wp-caption alignnone" style="width: 500px"><img src="http://dev.xiligroup.com/wp-content/uploads/2009/11/xfs-js-settings.png" alt="xili-floom js function settings" title="xili-floom js function settings" width="490" height="269" class="size-full wp-image-1343" /><span class="wp-caption-text">xili-floom js function settings</span></span>
Be very careful to check the content of target functions to be sure that js target objects are available&#8230;
&nbsp;<br />
<fieldset class="series" ><legend>Other posts about xili-floom-slideshow</legend><ol><li><a href='http://dev.xiligroup.com/?p=1241' title="xili-floom-slideshow : a plugin to install famous floom (0.9.3 beta)">xili-floom-slideshow : a plugin to install famous floom (0.9.3 beta)</a></li><li><a href='http://dev.xiligroup.com/?p=1269' title="xili-floom-slideshow : the mystery of css revealed !">xili-floom-slideshow : the mystery of css revealed !</a></li><li><a href='http://dev.xiligroup.com/?p=1301' title="xili-floom-slideshow plugin : one example of a picture frame">xili-floom-slideshow plugin : one example of a picture frame</a></li><li>xili-floom-slideshow : fireEvent when picture changes ! (updated)</li></ol></fieldset>
&nbsp;<br />]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1319</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xili-floom-slideshow plugin : one example of a picture frame</title>
		<link>http://dev.xiligroup.com/?p=1301</link>
		<comments>http://dev.xiligroup.com/?p=1301#comments</comments>
		<pubDate>Sun, 22 Nov 2009 16:00:18 +0000</pubDate>
		<dc:creator>xiligroup dev</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Plugins WP]]></category>
		<category><![CDATA[xili-plugins]]></category>
		<category><![CDATA[floom]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://dev.xiligroup.com/?p=1301</guid>
		<description><![CDATA[Detailled example of a slideshow (background image and css)]]></description>
			<content:encoded><![CDATA[<p><div id="blinds-cont-d"><div id="blinds"></div></div></p>
<p><em><strong>Detailled example of a slideshow (background image and css)</strong></em><br />
<em>(If Safari browser is used, after each slides loop: a little silly surprise &#8211; css changed by event fired)</em><br />
In this example for images (420px 315px), a special frame was created (width 480px). (it is compatible with default current theme (kubrik). (<a href="http://dev.xiligroup.com/wp-content/uploads/2009/11/cadre_demo.png">download the png</a>)</p>
<p>and a specific part of css added (to add in the floom.css uploaded in floom/css/ sub-folder of current theme).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* example with frame cadre_demo and images 420 x 315 - overall width 480 */</span>
<span style="color: #666666; font-style: italic;">#blinds-cont-d { -webkit-box-shadow: 0 0 12px #220; background: url(cadre_demo.png) 0 0 no-repeat; margin: 20px auto; padding: 26px 0 0 0; font-family: 'Georgia', 'Arial Narrow', 'Arial', sans-serif; height: 391px; -moz-box-shadow: 0 0 20px #000; width: 480px; border-radius: 6px; -webkit-border-radius: 6px; -opera-border-radius: 6px; -moz-border-radius: 6px;}
</span><span style="color: #666666; font-style: italic;">#blinds-cont-d #blinds { margin: 0 auto; background: url(spinner.gif) 50% no-repeat; height: 315px; width: 420px; }
</span><span style="color: #666666; font-style: italic;">#blinds-cont-d #blinds .floom_slice { z-index: 10; }
</span><span style="color: #666666; font-style: italic;">#blinds-cont-d #blinds .floom_caption { text-shadow: 0 1px 0 #fff; font-size: 1.0em; color: #333; font-style: normal; position: relative; text-align: center; width: 100%; top: 20px; }
</span><span style="color: #666666; font-style: italic;">#blinds-cont-d #blinds .floom_caption span.floom_desc {font-size:80%; font-style: italic;}
</span><span style="color: #666666; font-style: italic;">#blinds-cont-d #blinds .floom_progressbar { font-size: 1px; background: #97997E; border-bottom: solid 1px #fff; height: 3px; position: relative; z-index: 1000; width: 0; top: 12px; }
</span><span style="color: #666666; font-style: italic;">#blinds-cont-d #blinds .floom_container { overflow: hidden;}
</span><span style="color: #666666; font-style: italic;">#blinds-cont-d #blinds .floom_vertical { float: left; }</span></pre></div></div>

<p><div id="attachment_1314" class="wp-caption alignnone" style="width: 310px"><img src="http://dev.xiligroup.com/wp-content/uploads/2009/11/floom_in_theme-300x126.png" alt="floom sub-folder in theme" title="floom sub-folder in theme" width="300" height="126" class="size-medium wp-image-1314" /><p class="wp-caption-text">floom sub-folder in theme</p></div></p>
<p>Because the id is <em>blinds-cont-d</em>, the shortcode must be :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>xilifloom frame_id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;blinds-cont-d&quot;</span><span style="color: #009900;">&#93;</span></pre></div></div>

<p>To see progressbar and for each image read title and description, custom fields are set like here:<br />
<div id="attachment_1312" class="wp-caption alignnone" style="width: 350px"><img src="http://dev.xiligroup.com/wp-content/uploads/2009/11/CustomField_2.png" alt="Values in custom fields" title="Values in custom fields" width="340" height="151" class="size-full wp-image-1312" /><p class="wp-caption-text">Values in custom fields</p></div><br />
* <strong>progressbar</strong> is set by default to false (processor cycle consumer) but here, only in this post, it is set to true.&nbsp;<br />&nbsp;<br />
<fieldset class="series" ><legend>This article belongs to the series below</legend><ol><li><a href='http://dev.xiligroup.com/?p=1241' title="xili-floom-slideshow : a plugin to install famous floom (0.9.3 beta)">xili-floom-slideshow : a plugin to install famous floom (0.9.3 beta)</a></li><li><a href='http://dev.xiligroup.com/?p=1269' title="xili-floom-slideshow : the mystery of css revealed !">xili-floom-slideshow : the mystery of css revealed !</a></li><li>xili-floom-slideshow plugin : one example of a picture frame</li><li><a href='http://dev.xiligroup.com/?p=1319' title="xili-floom-slideshow : fireEvent when picture changes ! (updated)">xili-floom-slideshow : fireEvent when picture changes ! (updated)</a></li></ol></fieldset><br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.xiligroup.com/?feed=rss2&amp;p=1301</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
