<?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>Fragov Blog &#187; css</title>
	<atom:link href="http://fragov.com/blog/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://fragov.com/blog</link>
	<description>About my life, programming, freelancing</description>
	<lastBuildDate>Wed, 14 Dec 2011 20:36:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How to add class &#8220;last&#8221; to last menu item (li) in Joomla 1.5 (mod_mainmenu)</title>
		<link>http://fragov.com/blog/2010/03/14/how-to-add-class-last-to-last-menu-item-li-in-joomla-1-5-mod_mainmenu/</link>
		<comments>http://fragov.com/blog/2010/03/14/how-to-add-class-last-to-last-menu-item-li-in-joomla-1-5-mod_mainmenu/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 18:15:24 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[menu]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=71</guid>
		<description><![CDATA[Create new file default.php and place it in /[your_template]/html/mod_mainmenu/, add next content to it: &#60;?php // no direct access defined('_JEXEC') or die('Restricted access'); if ( ! defined('modMainMenuXMLCallbackDefined') ) { //class to add class "last" to last li function addLastClass($result) { $result = preg_replace("/(.*)&#60;\/li&#62;&#60;li class=\"item(\d*)\"&#62;(.*)&#60;\/li&#62;&#60;\/ul&#62;(.*).*/is", '$1&#60;/li&#62;&#60;li&#62;$3&#60;/li&#62;&#60;/ul&#62;$4', $result); return $result; } function modMainMenuXMLCallback(&#38;$node, $args) { $user    = [...]]]></description>
			<content:encoded><![CDATA[<p>Create new file default.php and place it in /[your_template]/html/mod_mainmenu/, add next content to it:<span id="more-71"></span></p>
<pre class="php" name="code">
&lt;?php

// no direct access
defined('_JEXEC') or die('Restricted access');

if ( ! defined('modMainMenuXMLCallbackDefined') )
{

//class to add class "last" to last li
function addLastClass($result) {
$result = preg_replace("/(.*)&lt;\/li&gt;&lt;li class=\"item(\d*)\"&gt;(.*)&lt;\/li&gt;&lt;\/ul&gt;(.*).*/is", '$1&lt;/li&gt;&lt;li&gt;$3&lt;/li&gt;&lt;/ul&gt;$4', $result);

return $result;
}

function modMainMenuXMLCallback(&amp;$node, $args)
{
$user    = &amp;JFactory::getUser();
$menu    = &amp;JSite::getMenu();
$active    = $menu-&gt;getActive();
$path    = isset($active) ? array_reverse($active-&gt;tree) : null;

if (($args['end']) &amp;&amp; ($node-&gt;attributes('level') &gt;= $args['end']))
{
$children = $node-&gt;children();
foreach ($node-&gt;children() as $child)
{
if ($child-&gt;name() == 'ul') {
$node-&gt;removeChild($child);
}
}
}

if ($node-&gt;name() == 'ul') {
foreach ($node-&gt;children() as $child)
{
if ($child-&gt;attributes('access') &gt; $user-&gt;get('aid', 0)) {
$node-&gt;removeChild($child);
}
}
}

if (($node-&gt;name() == 'li') &amp;&amp; isset($node-&gt;ul)) {
$node-&gt;addAttribute('class', 'parent');
}

if (isset($path) &amp;&amp; (in_array($node-&gt;attributes('id'), $path) || in_array($node-&gt;attributes('rel'), $path)))
{
if ($node-&gt;attributes('class')) {
$node-&gt;addAttribute('class', $node-&gt;attributes('class').' active');
} else {
$node-&gt;addAttribute('class', 'active');
}
}
else
{
if (isset($args['children']) &amp;&amp; !$args['children'])
{
$children = $node-&gt;children();
foreach ($node-&gt;children() as $child)
{
if ($child-&gt;name() == 'ul') {
$node-&gt;removeChild($child);
}
}
}
}

if (($node-&gt;name() == 'li') &amp;&amp; ($id = $node-&gt;attributes('id'))) {
if ($node-&gt;attributes('class')) {
$node-&gt;addAttribute('class', $node-&gt;attributes('class').' item'.$id);
} else {
$node-&gt;addAttribute('class', 'item'.$id);
}
}

if (isset($path) &amp;&amp; $node-&gt;attributes('id') == $path[0]) {
$node-&gt;addAttribute('id', 'current');
} else {
$node-&gt;removeAttribute('id');
}
$node-&gt;removeAttribute('rel');
$node-&gt;removeAttribute('level');
$node-&gt;removeAttribute('access');
}
define('modMainMenuXMLCallbackDefined', true);
}
//get menu code
ob_start();

modMainMenuHelper::render($params, 'modMainMenuXMLCallback');

//add class "last" to last li
$menu_html = ob_get_contents();
ob_end_clean();

echo addLastClass($menu_html);</pre>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2010/03/14/how-to-add-class-last-to-last-menu-item-li-in-joomla-1-5-mod_mainmenu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Conditional comments for Internet Explorer</title>
		<link>http://fragov.com/blog/2009/07/17/conditional-comments-for-internet-explorer/</link>
		<comments>http://fragov.com/blog/2009/07/17/conditional-comments-for-internet-explorer/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 01:25:29 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=55</guid>
		<description><![CDATA[Conditional comments only work in Explorer on Windows, and are thus excellently suited to give special instructions meant only for Explorer on Windows. They are supported from Explorer 5 onwards, and it is even possible to distinguish between 5.0, 5.5 and 6.0. &#60;!--[if IE]&#62; According to the conditional comment this is Internet Explorer&#60;br /&#62; &#60;![endif]--&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Conditional comments only work in Explorer on Windows, and are thus excellently suited to give special instructions meant only for Explorer on Windows. They are supported from Explorer 5 onwards, and it is even possible to distinguish between 5.0, 5.5 and 6.0.<span id="more-55"></span></p>
<pre class="html" name="code">&lt;!--[if IE]&gt;
According to the conditional comment this is Internet Explorer&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 5]&gt;
According to the conditional comment this is Internet Explorer 5&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 5.0]&gt;
According to the conditional comment this is Internet Explorer 5.0&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 5.5]&gt;
According to the conditional comment this is Internet Explorer 5.5&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 6]&gt;
According to the conditional comment this is Internet Explorer 6&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 7]&gt;
According to the conditional comment this is Internet Explorer 7&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if gte IE 5]&gt;
According to the conditional comment this is Internet Explorer 5 and up&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if lt IE 6]&gt;
According to the conditional comment this is Internet Explorer lower than 6&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if lte IE 5.5]&gt;
According to the conditional comment this is Internet Explorer lower or equal to 5.5&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if gt IE 6]&gt;
According to the conditional comment this is Internet Explorer greater than 6&lt;br /&gt;
&lt;![endif]--&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2009/07/17/conditional-comments-for-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
