<?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; programming</title>
	<atom:link href="http://fragov.com/blog/category/programming/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>Replace standart Joomla MooTools with yours on front-end</title>
		<link>http://fragov.com/blog/2009/10/21/replace-standart-joomla-mootools-with-yours-on-front-end/</link>
		<comments>http://fragov.com/blog/2009/10/21/replace-standart-joomla-mootools-with-yours-on-front-end/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 14:34:30 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=64</guid>
		<description><![CDATA[To keep upwards compatibility for your Joomla Core the following example shows a solution, by clearing the Header Buffer from the scripts Joomla is adding by itself. This is a template based modification, which does work with extensions loading their own Scripts or Stylesheets into the Header Buffer. And by that also transparent and not [...]]]></description>
			<content:encoded><![CDATA[<p>To keep upwards compatibility for your Joomla Core the following example shows a solution, by clearing the Header Buffer from the scripts Joomla is adding by itself. This is a template based modification, which does work with extensions loading their own Scripts or Stylesheets into the Header Buffer. And by that also transparent and not affected by any version upgrade to your Joomla Core<span id="more-64"></span>:</p>
<pre class="php" name="code">
&lt;!-- Load MooTools by the template, and at the top before any other scripts --&gt;
&lt;?php
/* --- This removes any Joomla default Scripts from the Header Buffer --- */
$header = $this-&gt;getHeadData();                   // Get the current HEAD buffer
$header['scripts'] = array();                     // Clear all current 'scripts' entries
$this-&gt;setHeadData($header);                      // Update the HEAD buffer
/* --- We add the MooTools Framework manually, see below --- */
?&gt;

&lt;head&gt;
&lt;!-- Load MooTools at first --&gt;
&lt;script type="text/javascript" src="templates/&lt;?php echo $this-&gt;template ?&gt;/js/mootools/mootools-1.2.1-core.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="templates/&lt;?php echo $this-&gt;template ?&gt;/js/mootools/mootools-1.2-more.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="templates/&lt;?php echo $this-&gt;template ?&gt;/js/mootools/mootools-1.2-compat.js"&gt;&lt;/script&gt;

&lt;!-- Now all other scripts from extensions --&gt;
&lt;jdoc:include type="head" /&gt;

&lt;/head&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2009/10/21/replace-standart-joomla-mootools-with-yours-on-front-end/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Joomla’s modal box in any template</title>
		<link>http://fragov.com/blog/2009/05/14/using-joomla%e2%80%99s-modal-box-in-any-template/</link>
		<comments>http://fragov.com/blog/2009/05/14/using-joomla%e2%80%99s-modal-box-in-any-template/#comments</comments>
		<pubDate>Wed, 13 May 2009 23:35:11 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[popup]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=41</guid>
		<description><![CDATA[You see Joomla’s modal box used in the admin quite a bit. This code is already included in Joomla, so why not use it on the front end as well? It is actually pretty easy to achiev. First Call the necessary CSS &#38; Javascript in your head tag. (add this to your template’s index.php) &#60;script [...]]]></description>
			<content:encoded><![CDATA[<p>You see Joomla’s modal box used in the admin quite a bit. This code is already included in Joomla, so why not use it on the front end as well? It is actually pretty easy to achiev.<br />
<span id="more-41"></span><br />
First Call the necessary CSS &amp; Javascript in your head tag.<br />
(add this to your template’s index.php)</p>
<pre name="code" class="javascript">&lt;script type="text/javascript" src="&lt;?php echo $this-&gt;baseurl;?&gt;/media/system/js/modal.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" href="&lt;?php echo $this-&gt;baseurl;?&gt;/media/system/css/modal.css" type="text/css"/&gt;
&lt;script type="text/javascript"&gt;
window.addEvent('domready', function() {
SqueezeBox.initialize({});
$$('a.modal-button').each(function(el) {
el.addEvent('click', function(e) {
new Event(e).stop();
SqueezeBox.fromElement(el);
});
});
});
function jInsertEditorText( text, editor ) {
eval(editor+'_id.insertCode(text);');
} window.addEvent('domready', function() {
SqueezeBox.initialize({});
$$('a.modal').each(function(el) {
el.addEvent('click', function(e) {
new Event(e).stop();
SqueezeBox.fromElement(el);
});
});
});
&lt;/script&gt;</pre>
<p>Just add the above to your template and in your URL, call the modal box using the class=”modal” and rel=”{handler: ‘iframe’, size: {x: 570, y: 200}}” then in your href add “&amp;tmpl=component” like this:</p>
<pre name="code" class="html"><a class="modal" rel="{handler: 'iframe', size: {x: 570, y: 200}}" href="http://www.DOMAIN.com/index.php?option=com_finder&amp;view=search&amp;Itemid=10&amp;tmpl=component"></a></pre>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2009/05/14/using-joomla%e2%80%99s-modal-box-in-any-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla 1.5 standart pop-ups (mootools + modal script)</title>
		<link>http://fragov.com/blog/2009/05/12/joomla-15-standart-pop-ups-mootools-modal-script/</link>
		<comments>http://fragov.com/blog/2009/05/12/joomla-15-standart-pop-ups-mootools-modal-script/#comments</comments>
		<pubDate>Wed, 13 May 2009 03:15:20 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[popup]]></category>
		<category><![CDATA[standart]]></category>

		<guid isPermaLink="false">http://fragov.com/?p=3</guid>
		<description><![CDATA[You may see this pop-ups in Joomla back-end, when changing settings etc. Add to head: &#60;?php JHtml::_('behavior.modal', 'a.class_name'); ?&#62; &#60;script type="text/javascript"&#62; window.addEvent('domready', function() { // Decorate the login windows to use a modal. $ES('a.class_name').each(function(a){ a.setProperty('rel', '{size: {x: 900, y: 500}, ajaxOptions: {method: "get"}}'); if (a.getProperty('href').contains('?')) { a.setProperty('href', a.getProperty('href')+'&#38;tmpl=component'); } else { a.setProperty('href', a.getProperty('href')+'?tmpl=component'); } }); [...]]]></description>
			<content:encoded><![CDATA[<p>You may see this pop-ups in Joomla back-end, when changing settings etc.<br />
<span id="more-3"></span><br />
<strong>Add to head:</strong></p>
<pre name="code" class="php">&lt;?php
JHtml::_('behavior.modal', 'a.class_name');
?&gt;</pre>
<pre name="code" class="javascript">&lt;script type="text/javascript"&gt;
window.addEvent('domready', function() {
    // Decorate the login windows to use a modal.

	$ES('a.class_name').each(function(a){
        a.setProperty('rel', '{size: {x: 900, y: 500}, ajaxOptions: {method: "get"}}');
        if (a.getProperty('href').contains('?')) {
            a.setProperty('href', a.getProperty('href')+'&amp;tmpl=component');
        } else {
            a.setProperty('href', a.getProperty('href')+'?tmpl=component');
        }
    });
});
&lt;/script&gt;</pre>
<p><strong>Then just add class attribute:</strong></p>
<pre name="code" class="html">&lt;a href="..." class="class_name"&gt;link text&lt;/a&gt;</pre>
<p><strong>CSS-file located at:</strong><br />
/media/system/css/modal.css</p>
<p><strong>JS-file located at:</strong><br />
/media/system/js/modal.js</p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2009/05/12/joomla-15-standart-pop-ups-mootools-modal-script/feed/</wfw:commentRss>
		<slash:comments>3</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! -->
