Automatic currency change for VirtueMart using Joom!Fish Router Plugin Modified

This modification will change currency depend of user IP and language.
First of all you should download Joom!Fish Router Plugin Modified from modification page or from my server.
(more…)

sh404SEF and JoomFish Homepage link problem for other languages

I’ve fixed today problem related with JoomFish and sh404SEF. If you click on homepage link in other languages except main it show you homepage in your default language, not in selected.
To fix this bug you should open file modules/mod_mainmenu/helper.php (also check same file in your template folder), and change:

$tmp->url = JURI::base();

to:

$tmp->url = str_replace(array($tmp->route.'/', $tmp->route), '', JRoute::_( $tmp->url ));

Now everything should for as it has to.

Disallow to load your page in iframe

You may use next code to make problems for somebody, who is loading your page in iFrame:

if((self.parent && !(self.parent===self)) && (self.parent.frames.length != 0)){
self.parent.location=document.location;
}

Full URL, current URL and base URL variables in Joomla 1.5, 1.6 and 1.7

Base URL:

JURI::base();

Current URL:

JURI::current();

Full URL:

JRequest::getURI();

How to add class “last” to last menu item (li) in Joomla 1.7 (mod_menu)

There is an option to add for last <a> tag, but it is not enough for me, as I need also for last <li> tag.
First you should copy file default.php from /modules/mod_menu/ to /templates/your_template_name/html/mod_menu. Next, you should edit this file. (more…)

Empty list of language switcher module in Joomla 1.7

Process of enabling of multi-lingual in Joomla is not too obvious. Main thing, which usually cause empty list of language, so multi-lingual not work at all.

You have not to forget to enable “System – Language Filter” in Joomla Extentions -> Plug-in Manages. Also you should create menu and make “Default” pages for each language. (more…)

MooTools actions on browser window resize

When you need make some action using MooTools on window resize you should use a timer:

window.addEvent('resize', function(){
    $clear(timer);
    var timer = (function(){
        // your actions goes here
    }).delay(50);
});

You may play with timer delay.

Internet Explorer conditional comments

<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is IE 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is IE 7<br />
<![endif]-->
<!--[if IE 8]>
According to the conditional comment this is IE 8<br />
<![endif]-->
<!--[if IE 9]>
According to the conditional comment this is IE 9<br />
<![endif]-->
<!--[if gte IE 8]>
According to the conditional comment this is IE 8 or higher<br />
<![endif]-->
<!--[if lt IE 9]>
According to the conditional comment this is IE lower than 9<br />
<![endif]-->
<!--[if lte IE 7]>
According to the conditional comment this is IE lower or equal to 7<br />
<![endif]-->
<!--[if gt IE 6]>
According to the conditional comment this is IE greater than 6<br />
<![endif]-->
<!--[if !IE]> -->
According to the conditional comment this is not IE<br />
<!-- <![endif]-->

lt – less than
gt – greater than
lte – less than or equal to
gte – greater than or equal to

Remove index.php From URLs in ExpressionEngine

First we need to create .htaccess file in ExpressionEngine root directory with next lines:

Options +FollowSymLinks
RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

Next in ExpressionEngine administration panel in Admin > General Configuration set Name of your site’s index page empty.

Using ExpressionEngine Image Manipulation in Templates

Since version 2.2, ExpressionEngine has integrated some image manipulation into its file management module. This includes resizing images and creating thumbnails with support for the three major image manipulation protocols: GD, NetPBM, and ImageMagick. This means that when adding images to your site you can set multiple sizes and aspect ratios for creating thumbnails. You also have the option of creating watermarks on the images. (more…)

Page 1 of 3123