Thứ Tư, 11 tháng 2, 2015

Joomla3.x Overwrite new Layout mod_menu

1. Create file overwrite layout + sub files overwrite


2. In file filter.php edit line to specify new sub files
At file new.php : replace default_ to new_
Detail: this mean new layout use sub new_ files.
Edit line: 79-85
        case 'heading':
            require JModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type);
            break;

        default:
            require JModuleHelper::getLayoutPath('mod_menu', 'default_url');
            break;

Replace this:
        case 'heading':
            require JModuleHelper::getLayoutPath('mod_menu', 'new_' . $item->type);
            break;

        default:
            require JModuleHelper::getLayoutPath('mod_menu', 'new_url');
            break;

3. At Administrator>Modules Manager>Menu choose new layout

Thứ Sáu, 16 tháng 1, 2015

Recreate k2 thumnails items cache

Description:
K2 recreate all thumnails media/k2/item/cache 
Recreate all pictures thumnail with new options.
Default k2 not funtion rereate thumnail

Solution:
1) Copy this file as rebuild.php into "JPATH_ROOT/media/k2/items"
2) Check Variables, use a size of 0 for not processing this image size - Variable in file rebuild.php
3) run rebuild.php (it overwrites existing files without notice)
 
File download:
https://drive.google.com/file/d/0B785Epf6q5Xldks2eHlRX1Nla1U/view?usp=sharing

This guide get from: https://github.com/rdeutz/rebuildK2imageCache

CHECKED recreate thumnails >100 images in <5 minutes
Note: InCase so much images can have time execution -> download all images at localhost, run rebuild at local,  then upload to host.

Maximum execution time of 120 seconds XAMPP localhost

Description: Localhost XAMPP joomla Fatal error: Maximum execution time of 120 seconds exceeded
Solution: Localhost: xampp\php\php.ini
max_execution_time = 5000

Chủ Nhật, 11 tháng 1, 2015

Iframe auto height content inner

Iframe.Load inner height.

$('iframe').load(function () {
    $('iframe').height($('iframe').contents().height());
});

Thứ Sáu, 26 tháng 12, 2014

Joomla Cache Image issue by AdminTool

Detail: Joomla Cache Image not view when using Admin Tool .htaccess
Reason: Admin tool create .htaccess file prevent view image at cache folder
Solution: Administrator->Component->Admin tool->.htaccess Maker-> Front End directory->Add item cache
Screen guide:

Chủ Nhật, 7 tháng 12, 2014

RSFirewall clear IFRAME

Mô tả: Bài viết sau khi lưu mất iframe.
Lưu ý: ở đây không giống như editor clear iframe. Ở đây là do RSFirewall. Giống như là thêm 1 cấp clear nữa.

Cách xử lý: Vào RSFirewall->BlackList/WhiteList->New->Get current Ip->Set WhiteList ok
Nguyên nhân: Vì tăng cường bảo vệ site RSFirewall clear nội dung. Khi nhận thấy IP trong whitelist sẽ cho phép mà không clear-> giữ được iframe.


Thứ Năm, 6 tháng 11, 2014

Stick menu - short code

Stick menu : demo http://jsfiddle.net/uFq2k/
Desription: Location menu: get offset. Check scroll > current location use new style.

Using JQuery
$(function(){
        // Check the initial Poistion of the Sticky Header
        var stickyHeaderTop = $('#stickyheader').offset().top;
        $(window).scroll(function(){
                if( $(window).scrollTop() > stickyHeaderTop ) {
                        $('#stickyheader').css({position: 'fixed', top: '0px'});
                } else {
                        $('#stickyheader').css({position: 'static', top: '0px'});
                }
        });
  });