Hiển thị các bài đăng có nhãn K2. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn K2. Hiển thị tất cả bài đăng

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.

Thứ Bảy, 30 tháng 11, 2013

Joomla 1.5- K2 replace Recapchar comment .js library

K2 Comment joomla 1.5 sử dụng http://api.recaptcha.net/js/recaptcha_ajax.js thư viện này ko còn hỗ trợ nữa. Nên khi sử dụng recapchar ko hiển thị.
Cách thực hiện: replace thư viện vào: components\com_k2\views\item\view.html.php
Thay đoạn  http://api.recaptcha.net/js/recaptcha_ajax.js bằng
http://google.com/recaptcha/api/js/recaptcha_ajax.js

Lưu ý: cần vào http://www.google.com/recaptcha để lấy public key và private key vào Admin: component->k2 chọn option -> comments điền key vào và bật lên.

Joomla 1.5 - k2 comment notify email to admin

K2 component joomla 1.5 không hỗ trợ việc gửi mail báo cho admin khi có comment mới.
Vì vậy cần viết thêm đoạn code này.
File location cần hiệu chỉnh: components\com_k2\models\item.php
Sử dụng thư viện Utilities của joomla: thêm vào đoạn: jimport('joomla.utilities.utility');
Tìm chức năng: function comment()
Thêm đoạn : có thể thêm ở dòng 753 (trong function comment)
//sendmail            $linkitemcomment=JURI::base().$item->link=urldecode(JRoute::_(K2HelperRoute::getItemRoute($item->id.':'.$item->alias,
            $item->catid.':'.urlencode($item->category->alias))));                   
            $emailadmin=$mainframe->getCfg('mailfrom');
            $bodymail='Nội dung bình luận:'.$commentText.'<br/><a href="'.$linkitemcomment.'">'.$linkitemcomment.'</a>';
           
            JUtility::sendMail($commentEmail, $userName, $emailadmin, 'Có bình luận mới',$bodymail,1);