Chèn đoạn mã sau vào cuối file index.php trong thư mục Joomla template của bạn.
Ví dụ: /joomla/templates/sieuhostvn/index.php.
Chèn vào cuối trang trước khi đóng thẻ </body>
Mã HTML:
<div id="AdsRight">
<jdoc:include type="modules" name="floatright" />
</div>
<div id="AdsLeft">
<jdoc:include type="modules" name="floatleft" />
</div>
Mã Javascript:
<script type="text/javascript">Hiển thị quảng cáo trượt phải
function f_clientWidth() {
return f_filterResults (
window.innerWidth ? window.innerWidth : 0,
document.documentElement ? document.documentElement.clientWidth : 0,
document.body ? document.body.clientWidth : 0
);
}
function f_clientHeight() {
return f_filterResults (
window.innerHeight ? window.innerHeight : 0,
document.documentElement ? document.documentElement.clientHeight : 0,
document.body ? document.body.clientHeight : 0
);
}
function f_scrollLeft() {
return f_filterResults (
window.pageXOffset ? window.pageXOffset : 0,
document.documentElement ? document.documentElement.scrollLeft : 0,
document.body ? document.body.scrollLeft : 0
);
}
function f_scrollTop() {
return f_filterResults (
window.pageYOffset ? window.pageYOffset : 0,
document.documentElement ? document.documentElement.scrollTop : 0,
document.body ? document.body.scrollTop : 0
);
}
function f_filterResults(n_win, n_docel, n_body) {
var n_result = n_win ? n_win : 0;
if (n_docel && (!n_result || (n_result > n_docel)))
n_result = n_docel;
return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
</script>
Hiển thị quảng cáo trượt trái
<script type="text/javascript">
var positionFooter;
var positionRight = 0;
var widthAds = 110;
var heightAds = 200;
var div = document.getElementById('divPositionRightBannerFloat');
if(div!=null)
positionRight = div.offsetTop;
document.getElementById('AdsRight').style.display = "block";
var yy = 0;
var toptop=0;
var beforeTop = 0;
// Hien thi quang cao truot phai
function ShowAds()
{
yy = f_clientWidth() - widthAds - 24;//padding left
toptop = (f_scrollTop() - beforeTop)/8;
beforeTop = toptop + beforeTop + 3;
if(beforeTop < 5)
document.getElementById('AdsRight').style.top = f_scrollTop() + 'px';
else
document.getElementById('AdsRight').style.top = beforeTop + 'px';
beforeTop = parseInt(document.getElementById('AdsRight').style.top.substring(0,document.getElementById('AdsRight').style.top.length - 2));
document.getElementById('AdsRight').style.left = yy + 'px';
document.getElementById('AdsRight').style.display = "block";
if(beforeTop < positionRight + heightAds)
document.getElementById('AdsRight').style.display = "none";
var divFooter = document.getElementById('divPositionFloatBannerFooter');
if(divFooter!=null)
positionFooter = divFooter.offsetTop;
if(beforeTop > positionFooter + heightAds)
document.getElementById('AdsRight').style.display = "none";
setTimeout('ShowAds()', 50);
}
ShowAds();
</script>
<script type="text/javascript">
// Hien thi quang cao truot trai
function ShowAds2()
{
yy = f_clientWidth() - widthAds - 24;//padding left
toptop = (f_scrollTop() - beforeTop)/8;
beforeTop = toptop + beforeTop + 3;
if(beforeTop < 5)
document.getElementById('AdsLeft').style.top = f_scrollTop() + 'px';
else
document.getElementById('AdsLeft').style.top = beforeTop + 'px';
beforeTop = parseInt(document.getElementById('AdsLeft').style.top.substring(0,document.getElementById('AdsLeft').style.top.length - 2));
document.getElementById('AdsLeft').style.right = yy + 'px';
document.getElementById('AdsLeft').style.display = "block";
if(beforeTop < positionRight + heightAds)
document.getElementById('AdsLeft').style.display = "none";
setTimeout('ShowAds2()', 50);
}
// Hien thi quang cao truot trai + phai
ShowAds2();
</script>
Hoặc tải file advertisement.js về và chèn đoạn mã sau
<script type="text/javascript" src="/cntt/js/advertisement.js"></script>Mã CSS chèn vào file template CSS hoặc chèn vào head:
#AdsRight{
z-index: 9999;
position: absolute;
width: 110px;
height: 200px;
display: none;
}
#AdsLeft{
z-index: 9999;
position: absolute;
width: 110px;
height: 200px;
display: none;
}
Truy cập Back End >> Quản lý mô đun.Chọn module cần trượt gán vào vị trí floatleft hoặc floatright.
| Cách trình bày trang chủ Frontend trong Joomla 1.5 < Lùi | Tiếp theo > Cách tạo module hiển thị tỉ giá ngoại tệ, thông tin thị trường trong Joomla |
|---|
Tin mới hơn:
- 11/05/2009 08:19 - Sửa lỗi JoomSEF trong Joomla
- 09/05/2009 15:06 - Thay đổi trình biên tập WYSIWYG editor trong Joomla
- 08/05/2009 16:45 - Cách sử dụng Code Highlighter GeSHi plugin/mambot trong Joomla
- 04/05/2009 23:52 - Tiện ích user tool trong Joomla Template JoomArt
- 03/05/2009 17:26 - Tạo quảng cáo nhiều hiệu ứng trong Joomla sử dụng jQuery
Tin cũ hơn:
- 08/04/2009 17:11 - Điều khiển vùng mainbody trên trang chủ Joomla
- 04/04/2009 20:27 - Phân quyền ACL (Access Control List) trong Joomla 1.6
- 04/04/2009 18:32 - Tìm hiểu Trình Cài Đặt Jooma Installer của Joomla 1.6
- 04/04/2009 15:48 - Joomla 1.6 những tính năng được mong đợi
- 04/04/2009 11:51 - Hướng dẫn cài đặt Joomla 1.5
Download Game bóng đá PES8 Việt Nam
Tải game bóng đá FiFa 09
Tải game Dragon ball Z - 7 viên ngọc rồng
Tải Game Bóng Đá Pro Evolution Soccer 6 Việt Nam
Download PES 2011 patch Việt Nam PESVN
Tải Game Bóng Đá FIFA 2009 RIP 1 CD
Download Pro Evolution Soccer 2011
Download Game THE SIMS 3
Tải Game bóng đá PES 2009
Download PES 2011 demo
XAPPR: Biến smartphone của bạn thành khẩu súng Laser, chơi game AR
Thiết lập Hotmail POP settings trên điện thoại
[Xbox 360 FAQs] - Những điều nên biết về Xbox 360
Windows 95/98/XP chạy trên các thiết bị Android một cách dễ dàng
Hướng dẫn phục hồi dữ liệu và Fix lỗi bị treo táo của iPhone, iPod
Fifa 12 cho các máy android 2.3 trở lên
Tải game Android miễn phí
iWep Pro v4.1.3 - Tìm mật khẩu mạng WiFi trên iOS
Activator 1.6.1 Việt hóa
L.A. Noire: The Complete Edition - THETA [Full ISO/Action/2011] [13.37GB]
Download 7554 demo
Download Game PC, cập nhật liên tục (torrent)
PES 2012 ra mắt bản mở rộng đầu tiên vào 11/10
PES2012 - Full version - Ngôn ngữ và bình luận tiếng Anh
PES2012 - Blurry disable làm mịn đồ họa
PES 2011 PATCH 4.1 - TRANSFER UPDATE - RELEASED
Download Prestashop 1.5
Download PrestaShop 1.4
Bổ sung Memcached vào PrestaShop 1.4
Hướng dẫn tích hợp Ngân Lượng vào PrestaShop
Sửa lỗi invalid carrier or no carrier selected trong PrestaShop
Sửa lỗi PrestaShop: Path is not the same between your browser and you server
Cài đặt PrestaShop
Thiết kế giao diện PrestaShop Theme
Hướng dẫn cài đặt themes trong PrestaShop
Hướng dẫn cách thêm ngôn ngữ cho PrestaShop
Bộ sưu tập Giao diện Premium PrestaShop Themes chuyên nghiệp
Giới thiệu về website thương mại điện tử 2.0 Prestashop
Macromedia Flash - Tạo hiệu ứng menu
Cài đặt Joomla 1.5 extensions


