Diễn Đàn Hỗ Trợ FM
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.


[Code] Hiện nhiều tab quảng cáo khi click chuột lần đầu tiên vào diễn đàn.

Tác giả: - vào lúc:
Kiwi
Bài viết : 289
Points : 601
Like : 160
Punbb
An toàn
Status : Đành vậy thế thôi
KiwiS-MOD
9/23/2016, 21:16
#1

Mô tả

Code phần này là  khi bạn click vào blog lần đầu tiên tất cả các cửa sổ đều xuất hiện và chỉ 1 lần duy nhất, những cú click tiếp theo trên cùng 1 trình duyệt thì các cửa sổ không xuất hiện nữa với khoảng thời gian nhất định.

Cách làm

Vào overall_header tìm:

Code:

<body>

Thay nó thành:

Code:

<body onclick='vtlai_popup();'>
<script language='javascript'>
//<![CDATA[
var sinhvienit=0;
function SVIT_ADS_GetCookie(Name){
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
return decodeURIComponent(document.cookie.match(re)[0].split("=")[1]);
return ""
}
function SVIT_ADS_SetCookie(name, value, days){
if (typeof days!="undefined"){
var expireDate = new Date()
var expstring=expireDate.setDate(expireDate.getDate()+days)
document.cookie = name+"="+decodeURIComponent(value)+"; expires="+expireDate.toGMTString()
}
else document.cookie = name+"="+decodeURIComponent(value);
}
function vtlai_popup()
{
var cookie_popup_ads = SVIT_ADS_GetCookie('sinhvienit_popup_ads');
if (cookie_popup_ads=='') {
if(sinhvienit==0)
{
sinhvienit=1;
var Time_expires = 24 * 3600 * 1000;
SVIT_ADS_SetCookie('sinhvienit_popup_ads','true',Time_expires);
var params = 'width=' + '600';
params += ', height=' + '500';
params += ',scrollbars=yes,status=1,toolbar=1,menubar=1,resizable=1,location=1,directories=1';
var vtlai_popup_0 = window.open('http://codeseo.net/', 'vtlai_popup_0', params +', top=0,left=0');
var vtlai_popup_1 = window.open('http://saoluu.net/', 'vtlai_popup_1', params +', top=0,left=0');
var vtlai_popup_2 = window.open('http://kenhtinhoc.net/', 'vtlai_popup_2', params +', top=0,left=0');
var vtlai_popup_3 = window.open('http://saufacebook.net/', 'vtlai_popup_3', params +', top=0,left=0');
}
}
}
//]]>
</script>


Lưu ý: Tìm trong code có các link sau và thay thành link bạn muốn mở tab

Code:

http://codeseo.net/
http://saoluu.net/
http://kenhtinhoc.net/
http://saufacebook.net/

Vậy là xong rồi Smile
Tags: #code #tips

Được sửa bởi Titus ngày 9/23/2016, 22:38; sửa lần 1.
Giựt
Bài viết : 272
Points : 440
Like : 89
Punbb
Cẩn thận
Status : Giựt đẹp trai
GiựtMOD
9/23/2016, 22:12
#2
Đù , phải hướng dẫn xem thay link ở chỗ nào chớ thằng lày Smile