Như tiêu đề cái có code mở pop up ra tab mới chứ không phải ra của sổ mới 1 lần/1 ip/ 1 ngày và đã tét chắc chắn thành công thì cho mình xin. Mình tìm nhiều nơi nhưng chưa được. Mong anh em giúp đỡ và hướng dẫn chi tiết. thanks all
Nếu đây là lần đầu tiên bạn tham gia diễn đàn, xin mời bạn xem phần Hỏi/Ðáp để biết cách dùng diễn đàn. Để có thể tham gia thảo luận bạn phải đăng ký làm thành viên, click vào đây để đăng ký.
Như tiêu đề cái có code mở pop up ra tab mới chứ không phải ra của sổ mới 1 lần/1 ip/ 1 ngày và đã tét chắc chắn thành công thì cho mình xin. Mình tìm nhiều nơi nhưng chưa được. Mong anh em giúp đỡ và hướng dẫn chi tiết. thanks all
Tạo file popup.js với nội dung sau:
Sửa lại link itvnn.net thành link cần popup, sau đó upload file popup.js này vào thư mụcclientscript của forumCode:function Set_Cookie(name, value, expires, path, domain, secure) { var today = new Date(); today.setTime(today.getTime()); if (expires) { expires = expires * 1000 * 60 * 60 * 12; } var expires_date = new Date(today.getTime() + (expires)); document.cookie = name + "=" + escape(value) + ((expires) ? ";expires=" + expires_date.toGMTString() : "") + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ((secure) ? ";secure" : ""); } function Get_Cookie(name) { var start = document.cookie.indexOf(name + "="); var len = start + name.length + 1; if ((!start) && (name != document.cookie.substring(0, name.length))) { return null; } if (start == -1) return null; var end = document.cookie.indexOf(";", len); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(len, end)); } function Delete_Cookie(name, path, domain) { if (Get_Cookie(name)) document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; } function popunder() { if (Get_Cookie('vnsTraGopLT6')) { return false; } else { Set_Cookie('vnsTraGopLT6', 'vnsTraGopLT PopUnder', '1', '/', '', ''); urls = ["http://itvnn.net"] var url = urls[Math.floor(Math.random() * urls.length)] params = 'width=' + screen.width; params += ', height=' + screen.height; params += ', top=0, left=0,scrollbars=yes' params += ', fullscreen=yes'; pop = window.open(url, 'window', params).blur(); window.focus(); return false; } }
Mở template FORUMHOME chèn vào như sau:
Chèn vào thẻ <body> sự kiện onclick: <body onclick="popunder();">
Chèn trước thẻ </head> đoạn code này:
<script type="text/javascript" src="clientscript/popup.js"></script>
Click vào vị trí bất kì trên trang chính forum thì popup sẽ hiện ra.
cuongmobi_88 (11-05-2012)
Cám ơn admin đã hướng dẫn chi tiết, nhưng đây là code popup bật ra trang mới chứ không phải popup bật ra tab mới. Mong admin xem lại giúp em.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks