Content plugin:
{loadmodule mod_name,mod_title,style}
Mod name: folder mode name
Mod_title:user1,user2,user3,name1,name2,name3...
Style: xhtml,none
Example:
{loadmodule mod_articles_category,user1,xhtml}
{loadmodule mod_articles_category,user2,xhtml}
{loadmodule mod_login,newlogin,xhtml}
Hiển thị các bài đăng có nhãn Lưu ý joomla. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Lưu ý joomla. Hiển thị tất cả bài đăng
Thứ Sáu, 22 tháng 8, 2014
Thứ Ba, 29 tháng 7, 2014
Revolution Slider Upload local to host not view image
Detail: Upload local to host, run site. Slide not view. Check html view source wrong link.
Reason: revolution slide need replace string.
Example: http://localhost/site replace by http://domain.com/
Follow the image:
Reason: revolution slide need replace string.
Example: http://localhost/site replace by http://domain.com/
Follow the image:
Thứ Ba, 15 tháng 7, 2014
Joomla 3.2 register frontend - login faild.
Mô tả: Joomla 3.2 register frontend - login faild.
Error detail: tài khoảng tạo ra sẽ có password ngắn hơn chuẩn.
Example:
Pass registration: 792cf33f581b4a127c80b503f16824cc
Pass standard: ea2715571f3ae14e1807d1dc67005a24:iHTtHgKspS0nSZAUGcTSkZEPoOGt57gq
Version Error: joomla 3.2
File edit:
Edit1: /libraries/joomla/user/helper.php:
line434: $encrypted = ($salt) ? md5($plaintext . $salt) : md5($plaintext);
Replace: $encrypted = ($salt) ? md5($plaintext . $salt) . ':' . $salt : md5($plaintext);
Edit 2:/libraries/joomla/user/user.php:
line625: $array['password'] = $crypt . ':' . $salt;
Replace: $array['password'] = $crypt;
Mark by: http://alterbrains.com/blog/100-joomla-3-2-passwords-issue-problem-solution
Error detail: tài khoảng tạo ra sẽ có password ngắn hơn chuẩn.
Example:
Pass registration: 792cf33f581b4a127c80b503f16824cc
Pass standard: ea2715571f3ae14e1807d1dc67005a24:iHTtHgKspS0nSZAUGcTSkZEPoOGt57gq
Version Error: joomla 3.2
File edit:
Edit1: /libraries/joomla/user/helper.php:
line434: $encrypted = ($salt) ? md5($plaintext . $salt) : md5($plaintext);
Replace: $encrypted = ($salt) ? md5($plaintext . $salt) . ':' . $salt : md5($plaintext);
Edit 2:/libraries/joomla/user/user.php:
line625: $array['password'] = $crypt . ':' . $salt;
Replace: $array['password'] = $crypt;
Mark by: http://alterbrains.com/blog/100-joomla-3-2-passwords-issue-problem-solution
Thứ Tư, 14 tháng 5, 2014
Joomla 3.3 Simple image gallery admin caption issue
Note: simple image gallery pro caption not save on joomla 3.3.
Cause: joomla 3.3 not load core.js
Location file edit : administrator\components\com_sigpro\views\view.php
Line 211 add: $document->addScript('../media/system/js/core.js');
Cause: joomla 3.3 not load core.js
Location file edit : administrator\components\com_sigpro\views\view.php
Line 211 add: $document->addScript('../media/system/js/core.js');
Thứ Sáu, 11 tháng 4, 2014
Module add Field Editor not remove HTML
Mô tả: thêm field dạng textarea có load editor để dễ dàng hiệu chỉnh html.
file hiệu chỉnh: root/modules/mod_name/ ... .xml
Thêm vào :
<field filter="raw" name="textarea" type="editor" default="" label="View text area" description="View text area top module" />
ý nghĩa: filter="raw" joomla sẽ giữ lại cấu trúc html. Nếu ko có dòng filter="raw" thì clear html, lúc này chỉ dạng text ko có cấu trúc ko có style.
Lúc load lên trong folder view:
if($params->get('textarea')){
echo '<div class="textareaTop">'.$params->get('textarea').'</div>';
}
file hiệu chỉnh: root/modules/mod_name/ ... .xml
Thêm vào :
<field filter="raw" name="textarea" type="editor" default="" label="View text area" description="View text area top module" />
ý nghĩa: filter="raw" joomla sẽ giữ lại cấu trúc html. Nếu ko có dòng filter="raw" thì clear html, lúc này chỉ dạng text ko có cấu trúc ko có style.
Lúc load lên trong folder view:
if($params->get('textarea')){
echo '<div class="textareaTop">'.$params->get('textarea').'</div>';
}
Chủ Nhật, 6 tháng 4, 2014
Widgetkit Slideshow, slideset page Load height not auto
Mô tả: Widgetkit là component quản lý: slideshow, slideset, tabs, gallery, maps ... theo đánh giá qua nhiều dự án của mình là tốt, đáp ứng được nhiều chức năng. Mức độ ổn định cao.
Điểm yếu duy nhất và gặp thường xuyên: lúc Page load thì chiều cao, chiều rộng slide không đúng.
Cách xử lý: thêm 1 dòng code js
jQuery(window).bind("load", function(){ jQuery(window).resize(); });
Điều thú vị ở đây: cách xử lý từ nhóm viết Widgetkit là không có - rất ngạc nhiên khi tìm hiểu thì trên website wedgetkit cách xử lý lại từ 1 lập trình viên khác.
Câu lệnh không có gì đặc biệt vậy mà đáp ứng được hơn mong đợi. Cá nhân cũng cảm thấy vậy.
Điểm yếu duy nhất và gặp thường xuyên: lúc Page load thì chiều cao, chiều rộng slide không đúng.
Cách xử lý: thêm 1 dòng code js
jQuery(window).bind("load", function(){ jQuery(window).resize(); });
Điều thú vị ở đây: cách xử lý từ nhóm viết Widgetkit là không có - rất ngạc nhiên khi tìm hiểu thì trên website wedgetkit cách xử lý lại từ 1 lập trình viên khác.
Câu lệnh không có gì đặc biệt vậy mà đáp ứng được hơn mong đợi. Cá nhân cũng cảm thấy vậy.
Thứ Tư, 2 tháng 4, 2014
mod_articles_category view intro image
Load image intro trong module article category
Joomla 3.2
Mặc định thì module article category ko load hình ảnh intro (việc này ko biết vì sao joomla ko làm).
File chỉnh sửa: modules\mod_articles_category\tmpl\default.php
line 84 thêm code
<?php
$images = json_decode($item->images);
?>
<img class="image_intro" src="<?php echo $images->image_intro; ?>" alt="<?php echo $images->image_intro_alt; ?>"/>
Joomla 3.2
Mặc định thì module article category ko load hình ảnh intro (việc này ko biết vì sao joomla ko làm).
File chỉnh sửa: modules\mod_articles_category\tmpl\default.php
line 84 thêm code
<?php
$images = json_decode($item->images);
?>
<img class="image_intro" src="<?php echo $images->image_intro; ?>" alt="<?php echo $images->image_intro_alt; ?>"/>
Thứ Hai, 10 tháng 3, 2014
Module template selector - dành demo cho khách hàng
Module Template Selector
Có từ thời joomla 1.5 cho đến 2.5, 3.x
Module hiển thị selection box ngoài Front End để khách hàng chọn lựa, tùy theo chọn lựa sẽ hiển thị template.
Ví dụ khách hàng muốn xem 3 mẫu, và chọn lựa 1 mẫu phù hợp. Cách làm này rất trực quan, có khi vì điều kiện thời gian ko chuẩn bị kịp thì ... cung cấp bằng hình ảnh không thôi.
Có từ thời joomla 1.5 cho đến 2.5, 3.x
Module hiển thị selection box ngoài Front End để khách hàng chọn lựa, tùy theo chọn lựa sẽ hiển thị template.
Ví dụ khách hàng muốn xem 3 mẫu, và chọn lựa 1 mẫu phù hợp. Cách làm này rất trực quan, có khi vì điều kiện thời gian ko chuẩn bị kịp thì ... cung cấp bằng hình ảnh không thôi.
Joomla category, article, title, content Tiếng việt lưu xuống load lên thì mất tiếng Việt
Nguyên nhân:
Database đang set charset không phải là UTF8 (tiếng Việt thì dùng UTF8)
Cách thực hiện: tạo lại database, lúc tạo sẽ cho set charset chọn là UTF8-unicode-ci
Sau đó thì import hoặc set joomla lại bình thường.
Tại sao lại nên tạo mới lại database: vì database, table, field đều có cấu hình charset. Nếu vậy phải hiệu chỉnh tất cả tốt thời gian. Khi tạo mới lại database lúc đó chỉ phụ thuộc vào file import. Vả lại những category, article, title, content bị mất tiếng Việt cần phải nhập lại. Vì thế nên tạo mới database.
Database đang set charset không phải là UTF8 (tiếng Việt thì dùng UTF8)
Cách thực hiện: tạo lại database, lúc tạo sẽ cho set charset chọn là UTF8-unicode-ci
Sau đó thì import hoặc set joomla lại bình thường.
Tại sao lại nên tạo mới lại database: vì database, table, field đều có cấu hình charset. Nếu vậy phải hiệu chỉnh tất cả tốt thời gian. Khi tạo mới lại database lúc đó chỉ phụ thuộc vào file import. Vả lại những category, article, title, content bị mất tiếng Việt cần phải nhập lại. Vì thế nên tạo mới database.
Chủ Nhật, 23 tháng 2, 2014
Joomla ERROR PAGE - Redirect to URL
File hiệu chỉnh: Hiệu chỉnh file templates/yourtemplate/error.php
Nguyên tắc hoạt động: khi jooml báo lỗi link sẽ chạy file error.php, lúc này file sẽ trỏ đến 1 bài viết trong joomla.
Mục đích: để giữ template hiển thị và style.
So sánh: có lợi hơn rất là là nhiều nếu redirect bằng html header <meta http-equiv="refresh" content="0; url=http://example.com/" />, lý do khi gặp file php là đang chạy ở server và redirect. Còn nếu chạy HTML Redirect thì lúc về đến client rồi mới redirect - lúc này người dùng sẽ thấy được trang trắng khoảng 1s.
Source:
<?php
$location=$this->baseurl.'/index.php?option=com_content&view=article&id=126&Itemid=718';
header("Location:".$location); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
Nguyên tắc hoạt động: khi jooml báo lỗi link sẽ chạy file error.php, lúc này file sẽ trỏ đến 1 bài viết trong joomla.
Mục đích: để giữ template hiển thị và style.
So sánh: có lợi hơn rất là là nhiều nếu redirect bằng html header <meta http-equiv="refresh" content="0; url=http://example.com/" />, lý do khi gặp file php là đang chạy ở server và redirect. Còn nếu chạy HTML Redirect thì lúc về đến client rồi mới redirect - lúc này người dùng sẽ thấy được trang trắng khoảng 1s.
Source:
<?php
$location=$this->baseurl.'/index.php?option=com_content&view=article&id=126&Itemid=718';
header("Location:".$location); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
Thứ Hai, 17 tháng 2, 2014
joomla 3- Check is homepage
Joomla 3.x
Vào template index.php thên đoạn code.
<?php $app = JFactory::getApplication(); $menu = $app->getMenu(); if ($menu->getActive() == $menu->getDefault()) { echo 'This is the front page'; }
Chủ Nhật, 9 tháng 2, 2014
Joomla 2.5- Media manager Upload file format
Trong nhiều trường hợp cần hiệu chỉnh joomla 2.5 (joomla 1.5, hay 3.x gần giống) cho phép upload 1 số file chưa chưa cho phép.
Cách thực hiện:
Administrator->Menu content->media manager->Options->Legal extension(file types) thêm các tên file
Cách thực hiện:
Administrator->Menu content->media manager->Options->Legal extension(file types) thêm các tên file
Thứ Năm, 30 tháng 1, 2014
Background tr chrome image issue
Vấn đề gặp phải: background image <tr trình duyệt chrome tự động bắt đầu cho td. Làm cho image background lặp đi lặp lại.
Cách xử lý CSS:
tr{
display:inline-table;
width:598px;
}
Cách xử lý CSS:
tr{
display:inline-table;
width:598px;
}
Thứ Tư, 29 tháng 1, 2014
Joomla 3.x Tunr off all tooltip, Disable ToolTip
Hiệu chỉnh file libraries\cms\html\bootstrap.php
Đến function line 454 thay thế đoạn code:
public static function tooltip($selector = '.hasTooltip', $params = array())
{
return;
}
Đến function line 454 thay thế đoạn code:
public static function tooltip($selector = '.hasTooltip', $params = array())
{
return;
}
Thứ Ba, 21 tháng 1, 2014
Google Capchar key
Lưu trữ dùng để dùng nhanh captchar trong Joomla
Public Key: 6LcPMusSAAAAAIGLcUhzWMYgfTYnr9qSk8gZQk8s
Private Key: 6LcPMusSAAAAABDF5OFfeqkrYKAhzK
Public Key: 6LcPMusSAAAAAIGLcUhzWMYgfTYnr9qSk8gZQk8s
Private Key: 6LcPMusSAAAAABDF5OFfeqkrYKAhzK
Thứ Tư, 15 tháng 1, 2014
joomla Error displaying the error page: Application Instantiation Error
Xử lý lỗi jooma 3.2 - gặp phải ngày 15 tháng 01 năm 2013
Xử lý lần lượt theo từng cách
1. Change file configuration.php $dbtype = 'mysqli'; đổi thành $dbtype = 'mysql';
2. Change đường dẫn tmp, logs đúng trên host
3. Kiểm configuration.php $dbprefix = 'xxxxx_'; thành $dbprefix = 'xxx_'; (nhiều kí tự xuống 3 kí tự - Trường hợp mình gặp giải quyết xong ở bước này)
4. Fix database trong admin của joomla tham khảo từ andrewbrettwatson.com
5. Fix database bằng phpmyadmin tham khảo từ andrewbrettwatson.com
Chọn table, xuống bên dưới cuối cùng sẽ có check all và select Repair table
Xử lý lần lượt theo từng cách
1. Change file configuration.php $dbtype = 'mysqli'; đổi thành $dbtype = 'mysql';
2. Change đường dẫn tmp, logs đúng trên host
3. Kiểm configuration.php $dbprefix = 'xxxxx_'; thành $dbprefix = 'xxx_'; (nhiều kí tự xuống 3 kí tự - Trường hợp mình gặp giải quyết xong ở bước này)
4. Fix database trong admin của joomla tham khảo từ andrewbrettwatson.com
5. Fix database bằng phpmyadmin tham khảo từ andrewbrettwatson.com
Chọn table, xuống bên dưới cuối cùng sẽ có check all và select Repair table
Thứ Bảy, 11 tháng 1, 2014
Joomla - Easytagcloud giới thiệu
Căn bản nghĩa từ Tag: có nghĩa là thẻ. Thẻ dùng để phân loại ở đây là bài viết.
Thẻ này thường không cần định nghĩa sẵn mà hệ thống tự kiểm tra và tạo mới.
Sau đó thiết lập các liên kết các bài viết có cùng thẻ. Những bài viết có cùng thẻ sẽ được hiển thị như Loại, Phân vùng, Quốc gia, Tỉnh Thành, Kiểu, Kích thước...
Nguyên lý hoạt động: tự động lấy meta Keyword của bài viết tạo thành tag hiển thị ở module
Link download (Free) bản dùng chung joomla 2.5,3.x : http://www.joomlatonight.com/downloads/category/3-easytagcloud.html
Thẻ này thường không cần định nghĩa sẵn mà hệ thống tự kiểm tra và tạo mới.
Sau đó thiết lập các liên kết các bài viết có cùng thẻ. Những bài viết có cùng thẻ sẽ được hiển thị như Loại, Phân vùng, Quốc gia, Tỉnh Thành, Kiểu, Kích thước...
Nguyên lý hoạt động: tự động lấy meta Keyword của bài viết tạo thành tag hiển thị ở module
Link download (Free) bản dùng chung joomla 2.5,3.x : http://www.joomlatonight.com/downloads/category/3-easytagcloud.html
Thứ Tư, 8 tháng 1, 2014
Plugin mở rộng phần Assign menu
Tên extension: Advanced Module Manager Free
Chức năng: mở rộng module assign.
Phiên bản joomla hỗ trợ: 1.5, 1.6, 1.7, 2.5 ... 3.x
Link download: http://www.nonumber.nl/extensions/advancedmodulemanager
Cảm nghĩ cá nhân: đây là phần hỗ trợ tuyệt với đối với việc assign module (assign: ở đây có nghĩa là phân quyền hiển thị). Bình thường joomla có sẵn hỗ trợ module assign chỉ theo menu. Ở đây extension hỗ trợ assign theo menu,category, article,user,language, ... thêm url.
Rất là tuyệt vời.
Sau khi setup thì vào Admin>module managerment>module sẽ có thêm phần mở rộng như hình:
Chức năng: mở rộng module assign.
Phiên bản joomla hỗ trợ: 1.5, 1.6, 1.7, 2.5 ... 3.x
Link download: http://www.nonumber.nl/extensions/advancedmodulemanager
Cảm nghĩ cá nhân: đây là phần hỗ trợ tuyệt với đối với việc assign module (assign: ở đây có nghĩa là phân quyền hiển thị). Bình thường joomla có sẵn hỗ trợ module assign chỉ theo menu. Ở đây extension hỗ trợ assign theo menu,category, article,user,language, ... thêm url.
Rất là tuyệt vời.
Sau khi setup thì vào Admin>module managerment>module sẽ có thêm phần mở rộng như hình:
Thêm module vào Article bài viết
Trong joomla có Content - Load Modules đây là plugin mặc định có sẵn của joomla.
Chức năng: load module vào trong bài viết với cấu trúc quy định
Cấu trúc:
Load module position {loadposition user1} load theo tên của postion
Modules by name {loadmodule mod_login} load theo loại module (giống tên folder trong modules/mod_name)
Hình ảnh bật plugin trong joomla 3.x
Chức năng: load module vào trong bài viết với cấu trúc quy định
Cấu trúc:
Load module position {loadposition user1} load theo tên của postion
Modules by name {loadmodule mod_login} load theo loại module (giống tên folder trong modules/mod_name)
Hình ảnh bật plugin trong joomla 3.x
Chủ Nhật, 5 tháng 1, 2014
Google 2 location Distance Meter
Cách lấy khoảng cách bằng mét của 2 vị trí trong google map.
Kết quả:
Location 1:-33.8668283734,151.20648918209997
Location 2:-34.8668283734,151.20648918209997
Range Meter(m):111195(m)
Source 1 file html
<?xml version="1.0"?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Google 2 location Distance Meter</title>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places,visualization&v=3.exp"
type="text/javascript"></script>
<script type="text/javascript">
var location1 = new google.maps.LatLng(-33.8668283734, 151.2064891821);
var location2 = new google.maps.LatLng(-34.8668283734, 151.2064891821);
function initialize() {
var range=distance(location1,location2);
//alert(range);
var outputDiv = document.getElementById('outputDiv');
var html='Location 1:'+location1.lat()+','+location1.lng()+'<br/>';
html=html+'Location 2:'+location2.lat()+','+location2.lng()+'<br/>';
html=html+'Range Meter(m):'+range+'(m)';
outputDiv.innerHTML = html;
}
//Fucntion Distance
function distance(location1,location2) {
var lat1=location1.lat();
var lon1=location1.lng();
var lat2=location2.lat();
var lon2=location2.lng();
var R = 6371; // km (change this constant to get miles)
var dLat = (lat2-lat1) * Math.PI / 180;
var dLon = (lon2-lon1) * Math.PI / 180;
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.cos(lat1 * Math.PI / 180 ) * Math.cos(lat2 * Math.PI / 180 ) *
Math.sin(dLon/2) * Math.sin(dLon/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
var d = R * c;
//if (d>1) return Math.round(d)+"km";
//else if (d<=1)
return Math.round(d*1000);//meter
//return d;
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="outputDiv"></div>
</body>
</html>
Source file https://drive.google.com/file/d/0B785Epf6q5XlLTR0QnMyaDNpb2M/edit?usp=sharing
Kết quả:
Location 1:-33.8668283734,151.20648918209997
Location 2:-34.8668283734,151.20648918209997
Range Meter(m):111195(m)
Source 1 file html
<?xml version="1.0"?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Google 2 location Distance Meter</title>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places,visualization&v=3.exp"
type="text/javascript"></script>
<script type="text/javascript">
var location1 = new google.maps.LatLng(-33.8668283734, 151.2064891821);
var location2 = new google.maps.LatLng(-34.8668283734, 151.2064891821);
function initialize() {
var range=distance(location1,location2);
//alert(range);
var outputDiv = document.getElementById('outputDiv');
var html='Location 1:'+location1.lat()+','+location1.lng()+'<br/>';
html=html+'Location 2:'+location2.lat()+','+location2.lng()+'<br/>';
html=html+'Range Meter(m):'+range+'(m)';
outputDiv.innerHTML = html;
}
//Fucntion Distance
function distance(location1,location2) {
var lat1=location1.lat();
var lon1=location1.lng();
var lat2=location2.lat();
var lon2=location2.lng();
var R = 6371; // km (change this constant to get miles)
var dLat = (lat2-lat1) * Math.PI / 180;
var dLon = (lon2-lon1) * Math.PI / 180;
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.cos(lat1 * Math.PI / 180 ) * Math.cos(lat2 * Math.PI / 180 ) *
Math.sin(dLon/2) * Math.sin(dLon/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
var d = R * c;
//if (d>1) return Math.round(d)+"km";
//else if (d<=1)
return Math.round(d*1000);//meter
//return d;
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="outputDiv"></div>
</body>
</html>
Source file https://drive.google.com/file/d/0B785Epf6q5XlLTR0QnMyaDNpb2M/edit?usp=sharing
Đăng ký:
Bài đăng (Atom)







