Thứ Hai, 25 tháng 7, 2016

Tạo công cụ chát trực tuyến trên website bằng facebook

https://zotabox.com/dashboard/ trang đăng ký

Bước 1: Lấy mã code chèn vào css
Bước 2: chèn trang fane

Tạo reposive youtube ( giao diện điện thoại video ) trên web

Tham khảo https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php


Tạo reposive youtube ( giao diện điện thoại video ) trên web

Thực hiện trên hai bước :

Bước 1: Dán vào /css/template.css" in template "vt_hiking".
.videoWrapper {
 position: relative;
 padding-bottom: 56.25%; / 16:9 /
 padding-top: 25px;
 height: 0;
}
.videoWrapper iframe {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;

}

Bước 2: Dán vào bài viết theo mẫu sau:
<div class="videoWrapper">
    <!-- Copy & Pasted from YouTube -->
    <iframe width="560" height="349" src="http://www.youtube.com/embed/n_dZNLr2cME?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>

</div>



Thứ Ba, 19 tháng 7, 2016

SỬA LỐI KHÔNG THỂ ẤN NÚT LƯU VÀ SAVE TRONG JOOMLA SAU KHI UPDATE

Sửa lỗii không thể ấn nút Lưu và save trong joomla sau khi update hoặc save module  và giao diện sau khi chỉnh sửa
mở file này : administrator/templates/isis/index.php
 search code
JHtml::_('bootstrap.framework');
thêm code thành
JHtml::_('bootstrap.framework');
JHtml::_('behavior.framework', true);

Hoặc khi update lên joomla mới bị lưu cache :
[7/5/2016 10:29:24 PM] Cuộc Sống Số ™: trang đó bị cache nha
[7/5/2016 10:29:37 PM] Cuộc Sống Số ™: mình ko thể nào xóa được
[7/5/2016 10:29:40 PM] Cuộc Sống Số ™: code đúng
[7/5/2016 10:29:43 PM] Cuộc Sống Số ™: http://joomla.vinagecko.net/t/vina_febris/media/system/js/multiselect.js
[7/5/2016 10:29:50 PM] Cuộc Sống Số ™: code bị cache ( cũ )
[7/5/2016 10:29:53 PM] Cuộc Sống Số ™: http://www.questekvietnam.vn/media/system/js/multiselect.js

Thứ Ba, 12 tháng 7, 2016

CÁCH XỬ LÝ LỖI 404 TRONG JOOMLA TRỎ VỀ TRANG CHỦ

CÁCH XỬ LÝ LỖI 404 TRONG JOOMLA TRỎ VỀ TRANG CHỦ

Sự khác biết giữa tập lệnh xử lý error giữa joomla 1.5 và các bật đàn a 1.6, 1.7, 2.5, 3.0
joomla 1.5      :         $this->error->code=='404'  ;
joomla =>1.6 :          $this->error->getCode()=='404' ;

Các bạn vào file error rồi past code ngay phần đầu nhé

Đối với joomla 1.5 chỉnh file error.php tại \templates\system\error.php
defined( '_JEXEC' ) or die( 'Restricted access' );
if ($this->error->code=='404') {
    header('Location:/');
    exit();
}
?>

joomla 1.6, 1.7, 2.5, 3.0 chỉnh file error tại \templates\system\error.php
defined('_JEXEC') or die;
if ($this->error->getCode()=='404') {
    header('Location:http://sua-may-tinh.com');  
    exit();
}

Các bạn check lại bằng cách gõ http://domainname/checkerror404.html
Tuy đơn giản mà cực kỳ quan trọng cho việc Seo website nhé các bạn


Make sure that people can never end up with a meaningless 404 Page not found error message. Especially the default joomla page for this is very ugly. As it will also completely different from the rest of your site, people will think the site is broken and leave it. If this happens often it can negatively impact your SEO rankings. Best is to create a custom 404-page for your template. This works a bit differently in joomla 2.5 or joomla 3:

CREATE A CUSTOM 404-PAGE IN JOOMLA 2.5

There is quite an easy way to create a custom 404 page in joomla 2.5. First, just create an article for this purpose. Call it whatever you want (404, error page, etc.) and just type a nice text, plus links to your Home or Search page. Then add it to a menu, but leave the menu-item unpublished.
Then just copy file templates/system/error.php to your current template's root folder.
For joomla 2.5: look up the following section:
defined('_JEXEC') or die;
And directly after this, add this section:
if (($this->error->getCode()) == '404') {
header('Location: /index.php?option=com_content&view=article&id=999');
exit;
}
Replace the article id (999 in this case) by the article ID of your own article.
You can also download the file here (so put it in your template folder and replace the article's ID):
error.php (2.5 version, zipped)

Want to support this site? Buy my E-book: joomla 3 SEO & Performance!

CREATE A CUSTOM 404-PAGE IN JOOMLA 3

Custom 404 pages in joomla 3 can be created equally easy. Again, create an article for this purpose. Call it whatever you want (404, error page, etc.) and just type a nice text, plus links to your Home or Search page. Then add it to a menu, but leave the menu-item unpublished.
Then just copy file templates/system/error.php to your current template's root folder.
Look up the following section:
defined('_JEXEC') or die;
if (!isset($this->error))
{
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;

?>
Now, add the complete following section to the code, just after the last line, before the closing PHP tag, so it look like this:
defined('_JEXEC') or die;
if (!isset($this->error))
{
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;

if (($this->error->getCode()) == '404') {
header('Location: /index.php?option=com_content&view=article&id=999');
exit;
}

?>
Replace the article id (999 in this case) by the article ID of your own article.
Download the file here (put it in your template folder and replace the article's ID):
error.php (joomla 3 version, zipped)

IMPROVED CODE

An alternative which might even be better than both examples above is to replace the line starting with header("Location.... with:
header("HTTP/1.0 404 Not Found");
echo file_get_contents(JURI::root().'/index.php?option=com_content&view=article&id=999');
Note that on some hosts the slash before index.php? needs to be removed to prevent errors.
What this does is to send a 404 HTTP header to the browser, stay on the same URL, and retrievethe content of the 404 page, instead of just going there.

AVOID 404 ERRORS

Of course you should try to avoid 404 errors in the first place. Therefore it is important to have a readable URL structure that helps people to easily navigate it. So, say if you a URL like this:/webshop/products/product1, sometimes people tend to just remove the last word because they want to see all products. So, make sure this page actually exists.
The second reason that people can end up on your 404 page is because they used an old link. In this case you should redirect them, using a 301-redirect. This is explained an a separate article.

Khắc phục lỗi không hiện giao diện di động của jooshoping

Chèn đoạn mã vào css của file cgrocket_thestore.css





@media all and (max-width: 700px) and (min-width: 450px)
{
.responsive .jshop_list_product .jshop .jshop_categ {
  float: left;
  padding: 0;
  vertical-align: top;
  width: 48% !important;

}
}
@media all and (max-width: 449px)
{
.responsive .jshop_list_product .jshop .jshop_categ {
  float: left;
  padding: 0;
  vertical-align: top;
  width: 93% !important;

}
}