Showing posts with label Thủ thuật vBB. Show all posts
Showing posts with label Thủ thuật vBB. Show all posts

Friday, December 21, 2012

Hướng dẩn chèn rank(Biểu tượng) cho nhóm thành viên

Hướng dẩn chèn rank cho nhóm thành viên

Đầu tiên các bạn Upload ảnh(iểu tượng) lên host
Nếu chưa có ảnh thì dùng bộ Rank do kenhdaihoc.com design tại đây
Share bộ rank mới còn nóng hổi Design by kenhdaihoc.com

Tiếp theo vào Admincp ==> User Ranks ==>Add New User Rank và làm theo ảnh bên dưới





Tạo xong các bạn vào User Rank Quản lý click vào update user titles and ranks để cập nhật danh hiệu thành viên

Cuối cùng là xem thành quả!





Chúc các bạn thành công!

Friday, December 14, 2012

Mod tạo Popup thông báo, quảng cáo cho vBB 4

Mod này giúp bạn tạo thông báo giữa trang, nút đóng thông báo được ghi nhớ bằng cookie, tùy chọn nhóm thành viên sẽ thấy thông báo popup.



Center Popup for vBulletin 4


AdminCP Options:

Cách cài đặt:
Download
Hoặc 

 - UPload thư mục vtlai_js ngang hàng file index.php
AdminCP-> Manage Products -> Add/Import Product: Import file product-vtlai_preload_popup.xml

Change log:
v 1.1: Thêm tùy chọn nhóm thành viên sẽ nhìn thấy popup. Nhóm của Khách có Id=0


Nguồn sinhvienit.net

Wednesday, December 5, 2012

Fix Friendly URL 4.2 , tiếng việt không dấu cho vBB 4.1.x

Friendly url vbb 4.2.0 - fix lỗi url tiếng việt vbulletin 4.2


1. Upload file do_not_upload/rewrite/apache2/.htaccess trong bản mã nguồn phân phối vào ngang hàng với admincp.

2. ACP >> vBulletin Options >> Server Settings and Optimization Options

Friendly URLs : Mod Rewrite Friendly URLs



3. 
Mở file includes/class_friendly_url.php và tìm
     
        $fragment = preg_replace(self::CLEAN_URL_REGEX, '-', strip_tags($fragment)); 

        $fragment = trim(preg_replace('#-+#', '-', $fragment), '-');

Thay thành


$translite_simbols = array (  '#(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)#',  
'#(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)#',  
'#(ì|í|ị|ỉ|ĩ)#',  
'#(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)#',  
'#(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)#',  
'#(ỳ|ý|ỵ|ỷ|ỹ)#',  
'#(đ)#',  
'#(À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ)#',  
'#(È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ)#',  
'#(Ì|Í|Ị|Ỉ|Ĩ)#',  
'#(Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ)#',  
'#(Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ)#',  
'#(Ỳ|Ý|Ỵ|Ỷ|Ỹ)#',  
'#(Đ)#',  
"/[^a-zA-Z0-9\-\_]/",  
) ;  
$replace = array (  
'a',  
'e',  
'i',  
'o',  
'u',  
'y',  
'd',  
'A',  
'E',  
'I',  
'O',  
'U',  
'Y',  
'D',  
'-',  
) ;  
$fragment = preg_replace($translite_simbols, $replace, $fragment);  

$fragment = preg_replace('/(-)+/', '-', $fragment);


Thêm .html vào cuối link:


Mở file includes/class_friendly_url.php
Tìm return $fragment; ra cái đầu tiên á (dòng 410 trên VBB 4.2), thêm vào trước dòng sau:
$fragment = $fragment.".html";

Phiên bản củ hơn xem tại đây : 

Fix Friendly URLs tiếng việt không dấu cho vBB 4.1.x


http://kenhdaihoc.com/forum/threads/6618-Fix-Friendly-URLs-tieng-viet-khong-dau-cho-vBB-4-1-x.kdh


Sưu tầm

Tuesday, December 4, 2012

Chèn Khung Facebook Comment Vào Vbb

DEMO: forum

B1:
 Bạn cần truy cập vào trang này điền thông tin website của mình để tạo ứng dụng: http://developers.facebook.com/setup/

Sau khi hoàn tất việc đăng ký bạn sẽ nhận được App ID và App Secret chú ý đến App ID nhé 
B2: Thêm ID khi nãy vào chổ Your App IDBạn có thể thay đổi chiều rông ngay chỗ width="800"
<!-- FB Comments -->        
<h2 class="blockhead" style="padding-top:5px;"><span class="optiontitle">Facebook comments</span></h2>
        <div id="thread_tags_list" class="thread_info_block blockbody formcontrols floatcontainer">
           <div class="blockrow floatcontainer">
                <div id='tag_list_cell'>
    <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=Your App ID&amp;xfbml=1"></script><fb:comments expr:xid="Your App ID" simple="1" num_posts="10" width="800" publish_feed="true"></fb:comments><br/>
                </div>
            </div>
        </div>
<img src="clear.gif" height="10" /><br />
<!-- /FB Comments kenhdaihoc.com-->


B3: Tùy chọn chèn khung vào bài viết hoặc ở đâu đó mà bạn thích

- Nếu dưới bài viết đầu tiên giống forum kenhdaihoc.com thì chèn dưới temp chipstyle_showlist- Nếu muốn chèn trên khung Relpy thì thêm vào sau code sau
    <vb:if condition="$show['largereplybutton']">
        <a href="{vb:raw $vboptions.vbforum_url++{vb:if "$vboptions['vbforum_url']", '/', ''++newreply.php?{vb:raw session.sessionurl++p={vb:raw LASTPOSTID++&amp;noquote=1"class="newcontent_textcontrol" id="newreplylink_bottom"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread++<vb:else />{vb:rawphrase closed_thread++</vb:if></a>
    </vb:if>

Chúc bạn thành công!

Chuyển bài viết sang box khác khi duyệt bài

Chuyển bài viết sang box khác khi duyệt bài - Move Thread to Other forum when Moderate
Có khi nào trong lúc duyệt bài bạn muốn di chuyển 1 đề tài nào đó sang chuyên mục khác ngay khi duyệt không ? Nếu có thì bài viết này thực sự hữu ích đối với bạn 


(Áp dụng cho mọi phiên bản vBB)


Ảnh demo:

Ảnh ban đầu



Sau khi hoàn thành






Chuyển bài viết sang box khác khi duyệt bài - Move Thread to Other forum when Moderate



Cách thực hiện

Mở file mocp/moderate.php



Tìm đoạn này (Khoảng dòng 420):

print_label_row('<b>' . $vbphrase['forum'] . '</b>', '<a href="../' . fetch_seo_url('forum', array('forumid' => $thread['forumid'], 'title' => $vbulletin->forumcache["$thread[forumid]"]['title'])) . "\" target=\"_blank\">" . $vbulletin->forumcache["$thread[forumid]"]['title'] . "</a>");
Thêm vào phía sau

print_forum_chooser($vbphrase['forum'], "forumid[$thread[threadid]]", $thread['forumid']);

Tìm tiếp (Khoảng dòng 600):

$threadman->set_info('skip_first_post_update', true);


Thêm vào phía sau

$fid=intval($_POST['forumid'][$threadinfo['threadid']]);

if($fid)

$threadman->set('forumid', $fid);



Chúc bạn thành công  
Trích: sinhvienit.net


Nếu bạn thấy bài viết này hay và có ích với bạn hãy nhấn nhấn "Thank" và chia sẻ bài viết này nhé 

Skin giáng sinh 2012 đẹp cho vbb 4.2


Skin Noel 2012 đẹp cho vbb 4.2, skin giáng sinh 2012, skin christmis 2012, style noel 2012 vbb

Demo: 
http://vbdemo.com/forum.php?styleid=84

[DOWNLOAD]
http://www.mediafire.com/?h86atli9lkg4g04
http://upfile.vn/1ZM9


Saturday, October 6, 2012

Popup hiển thị Like Facebook ra ngoài forumhome



1. Upload the folder "fancybox" to forum root directory. 

2. In Admin CP, Go to Style Manager --> Choose style --> Edit template --> "header" file

3. Add the following code at the top of the header file. Remember to change domain address and "fb_id with facebook page ID". Recommended to use CDN(Content Delivery Network) for pulling js & css files. 


<!-- Facebook fancybox  -->
<link rel='stylesheet' href='/fancybox/scs.css' type='text/css' media='all' />
<script type='text/javascript' src='/fancybox/jquery.js'></script>
<script type='text/javascript' src='/fancybox/scs.js'></script>
<script type='text/javascript' src='/fancybox/launch.js'></script>


<script type='text/javascript'>
var lb_l_ret = {"fb_id":"202949229819601","display_on_post":"1","show_once":"15","delay":"15000","display_on_page":"","fancybox":"","display_on_homepage":"","facebookheader":"","gaevent":"","eam":"","display_on_archive":"","hideonlike":""};
</script>
<!-- End of Facebook fancybox -->


4. To change the timing of inline facebook pop up, modify "delay":"15000" entry with necessary value. 1000 = 1 second. Here value 15000 means displaying the facebook pop up after 15 seconds. 
Avoid using less than 5 to 10 seconds, who bothers to LIKE your facebook page without knowing you. Optimal & user friendly - 15/20/30 seconds.





* Chý ý: Cách lấy ID của trang Facebook 
- Vào trang facebook của bạn (VD: https://www.facebook.com/kenhdaihoccom)
- Chọn "Chỉnh sửa trang" -->Quản trị viên
- Bạn sẻ thấy link dạng (https://www.facebook.com/pages/edit/?id=202949229819601&sk=admin) 
- và bạn để ý dãy số "202949229819601" <-- đây chính là ID của bạn




Tuesday, October 2, 2012

Xóa bỏ thông kê số "Chủ đề" và "Bài viết" trên forumhome vbb

Trong TUT này, tôi sẽ hướng dẫn các bạn xóa bỏ dòng chữ "Bài viết: xxx" và "Chủ đề: xxx" ở forumhome.


Demo:http://kenhdaihoc.com


Đầu tiên, vào AdminCP => Styles & Templates => Style Manager => Edit Templates => Forum Home Template.


Vào lần lượt
forumhome_forumbit_level1_post
forumhome_forumbit_level1_post_with_forumicon 
forumhome_forumbit_level2_post
forumhome_forumbit_level2_post_with_forumicon 

và xóa đoạn code sau:


<h4 class="nocss_label">{vb:rawphrase forum_statistics}:</h4>
<ul class="forumstats td">
<li>{vb:rawphrase threads}: {vb:raw forum.threadcount}</li>
<li>{vb:rawphrase posts}: {vb:raw forum.replycount}</li>
</ul>
Sau đó vào CSS Templates => forumbits.css, sửa lại thông số % cho phù hợp với diễn đàn của bạn, dưới đây là thông số mà conmotit.com đang dùng.




.forumbit_post .foruminfo {
width: 63%;
min-width: 30%;
float: {vb:stylevar left};
clear: {vb:stylevar right};
min-height: {vb:stylevar forumicon_size};
}
Độ rộng last post Info:


.forumbit_post .forumrow .forumlastpost {
width: 29%;
font-size: {vb:stylevar mid_fontSize};
padding-top: {vb:math {vb:stylevar padding}/2};
Forumhead 'Last Post' title alignment


.forumbit_nopost .forumhead .forumtitle {
font-size: {vb:stylevar font.fontSize};
min-width: 67%;
}
Chỉnh sửa độ rộng (width:...% cho phù hợp


Cuối cùng có thể vào Settings - Options - Forum Listings Display Options - Last Thread Title Maximum Displayed Characters, và giới hạn số kí tự tên của last post trên forumhome

Sưu tâm

Monday, September 24, 2012

Chuyển file Attach trong Database quan lưu trữ file trên host hoăc qua host

khi ta attachment lễn diễn đàn thì nó luôn dính vào database, nhưng một khi diễn đàn của mình phát triển lớn mạnh và có rất nhiều file đính kèm, dẫn tới database nặng hơn, và mỗi khi mình backup và restore thì cũng sinh ra lỗi khi cái table attrachment dính vào database của mình. Vậy biên pháp nào để khắc phục được khi upload file đính kèm lên mà ko dính dáng đến database, restore và backup ko sinh ra lỗi đồng thời cũng giảm nhẹ luôn database của mình? Đó chính là dùng phương pháp chuyển file đính kèm vào thư mục trong host của mình hoặc chuyển qua host khác. 

Sau đây là bài hướng dẫn, các bạn đọc và làm theo nha, rất đơn giản

HƯỚNG DẪN CHUYỂN FILE ĐÍNH KÈM VÀO FOLDER TRONG HOST CỦA MÌNH
- Bạn vào Admincp-->Attachment-->Attachment Storage Type-->Bấm tiếp tục 


- Tiếp theo login vô FTP của host tạo 1 thư mục (Tạo ở đâu cũng được miễn là trong thư mục gốc)với tên bất kỳ chẳng hạn là attachment và CHMOD nó thành 777
- Sau khi chạy xong bạn hãy điền đường dẫn đến thư mục bạn vừa tạo (để biết chính xác đường dẫn này bạn có thể úp 1 con Shell hay forumpath lên để biết đường dẫn)


Đến phần Edit Storage Type bạn nhấp tiếp tục tiếp (ở ô Number of attachments to process per cycle là số vòng lặp file đính kèm chạy mỗi lần , mặc định là 300 bạn có thể thay đổi lại tùy thích nhưng mình nghĩ để mặc định là được rồi 


- Đợi một chút là nó chạy xong

- Nhấn đồng ý ở bước cuồi cùng là xong. 



HƯỚNG DẪN CHUYỂN FILE ĐÍNH KÈM QUA HOST KHÁC

Nếu các bạn muốn file attrachment nằm ở host khác thì làm tương tự như ở trên,đến lúc điền đường dẫn của bạn thì bạn thay đường dẫn tới địa chỉ của host bên kia là Okie (Nhớ CHMOD thư mục bên host kia là 777 lun nhé)

Vậy là xong roài . Bây giờ khi backup dữ liệu bạn chỉ việc backup các table bình thường rất nhẹ và nhanh .Còn các File đính kèm nằm trong table kia thì sao, bạn dùng IDM hay soft hỗ trợ download khác để down tất cả về là Okie !

Lưu ý: Nếu muốn thực hiện những bước trên thì trước tiên thì host không để ở chế độ SAFE MODE. Như thế thì mới có thể làm được nhwungx bước trên, còn nếu host có chế độ SAFE MODE thì liên hện chủ host để tắt chế độ đó thì mới có thể làm được.
Ảnh LoveIT -  Bài viết sưu tầm

Hiển thị Avatar trong danh mục bài viết cho VBB - User Avatars In Thread Listing

DEMO xem ảnh nhé
Link bài viết tại diễn đàn

User Avatars In Thread Listing - Hiển thị Avatar trong danh mục bài viết cho VBB












Sunday, September 23, 2012

Number of Days Registered to Post Links - Hạn chế số ngày đăng ký mới post link

Number of Days Registered to Post Links


Mod này có tác dụng hạn chế số ngày đăng ký mới post link


With this hack you will be able to make so that users can post links at your forum after they have been registered members for a certain period of time set by you. By default it is set to 1 week. 

After installing the hack, go to Settings-Options->Number of Days Registered to Post Links. 

There you can enable and disable the hack. You can also enter the minimum number of days a user must be a register member in order to post links. You can also choose which User Groups and/or Individual users and/or forums will be excluded from the number of days register limit.



DOWNLOAD HERE

OR HERE

Nếu bạn thấy bài viết này hay và có ích với bạn hãy nhấn nhấn "Thank" và chia sẻ bài viết này nhé 

Friday, September 7, 2012

Code popup New tab cho quảng cáo

Một số trang web có phần code Popup rất chuyên nghiệp là mở tab mới chứ không như các popup truyền thống là bật ra màn hình sẽ rất khó chịu, sau đây mình xin chia sẻ các bạn code popup.
Mở tab mới code này được một số website như: phimvang.org, thaudem.com, nethoabinh.com .... đang sử dụng hiệu quả popup bật ra tăng gấp 1,5 lần so với code popup truyền thống và chạy được trên tất cả các trình duyệt.

Download đính kèm
Sau đó chèn đoạn code sau vào chỗ bạn cần hiển thị popup

<script type="text/javascript" src="http://kenhdaihoc.googlecode.com/files/popup.js"></script>

Thay Đường dẫn đường dẫn popup và chỉnh sửa lại code cho phù hợp nhé

Download đính kèm

Saturday, August 11, 2012

Hướng dẩn đặt captcha khi viết bài để chống spam cho vbb

B1: Bạn phải chắc chắn là đã bật "Human Verification" tại: Settings -> Human Verification Options -> Ảnh xác nhận

B2: Groups -> "Chọn nhóm muốn bật Human Verification -> Edit Usergroup -> Usergroup Options -> Require Human Verification on Configured Actions -> Yes

B3: Vào Human Verified Actions -> chọn Post

Thành quả:



Xem thêm các thủ thuật vBB khác tại đây

Monday, August 6, 2012

[ Phần 4] Tạo hình nền ngoài forumhome cho vbb

Hôm nay mình xin hướng dẩn các bạn tạo hình nền ngoài forumhome cho vbb, Nếu bạn nào thấy hứng thú thì dùng nhé

Thủ thuật này cũng khá đơn giản

Xem demo trước nhé

Ảnh ban đầu


Ảnh sau khi edit( cái nên mình làm hơi mờ nhé)

Hướng dẩn:
Vào template forumbits.css
Tìm class sau:
.forumbit_nopost .forumbit_nopost .forumrow, .forumbit_post .forumrow {
         background: {vb:stylevar forumrow_background};

Thay dòng màu đỏ bằng
        background-image: url(link ảnh);

Chúc thành công!

[ phần 3] Tạo hiệu ứng khi rê chuột qua menu vbb


Nếu bạn nào có hứng thú với menu kiểu này thì Hôm nay mình xin hướng dẩn các bạn làn nhé

Demo: http://kenhdaihoc.com



Hướng dẩn
Vào template vbulletin-chrome.css
Tìm: .navtabs li a.navtab:hover {

Thau đoạn code 


.navtabs li a.navtab:hover {
background:transparent url(themes/styleorigin/gradients/selected-tab-gradient-with-top-alpha.png) repeat-x   0 -4px;
        _background-image:none;
/*color:rgb(0, 0, 0);*/
color:rgb(255, 255, 255);
}

Thành

.navtabs li a.navtab:hover {
background: #FFA54F;
        color: white;
        text-decoration: none;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
}

Chúc thành công!

[ phần 2] Hướng dẩn edit khung đăng nhập kéo thả

Hướng dẩn tạo khung đăng nhập kéo thả tại đây: http://kenhdaihoc.com/forum/threads/799-Tao-Khung-Dang-Nhap-keo-tha-kenhdaihoc-com-dang-dung.kdh


Xem 2 ảnh và biết mình muốn làm gì nhé

nh ban đầu


Sau khi edit


Hướng dẩn
Mởi file slide.css tìm đến class #toppanel và xóa dòng width: 100%; là ok
Rỏ hơn là đoạn này

#toppanel {
position: absolute; /*Panel will overlap content */
/*position: relative;*/ /*Panel will "push" the content down */
top: 0;
width: 100%;
z-index: 999;
text-align: center;
margin-left: auto;
margin-right: auto;
}

[ phần 1 ] Hướng dẩn edit skin originstyle by kenhdaihoc.com

Thu hẹp độ rộng giữa mỗi Forum

Các bạn xem 2 ảnh và xem sự khác biệt nhé


Ảnh ban đầu


Ảnh sau khi sửa


Hướng dẩn
Vào  admincp tìm template additional.css 
Sau đó tìm đoạn code sau
.r_forum_footer_block {width: 100%;margin: 0px;margin-left: auto;margin-right: auto;padding: 0px;}

Code này nằm Dưới: /* origin style forumname footer cells ================================== */ 

Thay bằng code sau 
.r_forum_footer_block {width: 100%;height:0px;margin: 0px;margin-left: auto;margin-right: auto;padding: 0px;}

Có gì comment bên đươi, chúc thành công!

Saturday, July 28, 2012

Code quảng cáo giữa site cho vBB


Code quảng cáo giữa site
Demo:



Để làm được việc này các bạn chèn đoạn code sau vào vị trí muốn hiển thị (nếu muốn hiển thị tất cả các trang các bạn có thể chèn vào footer)

<script type="text/javascript" src="http://XXXXXXXX/jquery.js"></script>


<style type=”text/css”>#floating{      z-index: 450;position: absolute;width: 490px;height: 368px;}        #overPage                {                    background: black;z-index: 350;position: absolute;left: 0;top: 0;                 } </style><
!–Begin Adv Popup–>
           <div id=”ctl00_ContentPlaceHolder1_Adv_Popup_pnAdv”>
            <div id=”overPage”></div><div id=”floating”>
                <img src=”link ảnh” width=”490″ height=”360″ usemap=”#offline”border=”0″ style=”cursor: pointer” />
               </div><map name=”offline”>
                  <area shape=”rect” coords=”420,0,490,30″ onclick=”javascript:closeMe();” alt=”Close”style=”cursor: pointer” />
                  <area shape=”rect” coords=”0,30,490,330″ href=”Url site click vào ảnh  ” target=”_blank” onclick=”javascript:closeMe();” style=”cursor: pointer” />
                   </map>
!–Begin Adv Popup–>           <div id=”ctl00_ContentPlaceHolder1_Adv_Popup_pnAdv”>            <div id=”overPage”></div><div id=”floating”>                <img src=”link ảnh” width=”490″ height=”360″ usemap=”#offline”border=”0″ style=”cursor: pointer” />               </div><map name=”offline”>                  <area shape=”rect” coords=”420,0,490,30″ onclick=”javascript:closeMe();” alt=”Close”style=”cursor: pointer” />                  <area shape=”rect” coords=”0,30,490,330″ href=”Url site click vào ảnh  ” target=”_blank” onclick=”javascript:closeMe();” style=”cursor: pointer” />                   </map>!–Begin Adv Popup–>           <div id=”ctl00_ContentPlaceHolder1_Adv_Popup_pnAdv”>            <div id=”overPage”></div><div id=”floating”>                <img src=”link ảnh” width=”490″ height=”360″ usemap=”#offline”border=”0″ style=”cursor: pointer” />               </div><map name=”offline”>                  <area shape=”rect” coords=”420,0,490,30″ onclick=”javascript:closeMe();” alt=”Close”style=”cursor: pointer” />                  <area shape=”rect” coords=”0,30,490,330″ href=”Url site click vào ảnh  ” target=”_blank” onclick=”javascript:closeMe();” style=”cursor: pointer” />                   </map><script language=”javascript” type=”text/javascript”>var lastScroll;var delay = 30;var speed = 500;var img_w = 490;var img_h = 360;function centerIt()
                 {$(“#overPage”).css(“width”, $(window).width())
                     ;$(“#overPage”).css(“height”, $(document).height());$(“#floating”).css(“left”, $(window).width() / 2 – img_w / 2);
                           $(“#floating”).css(“top”, $(window).height() / 2 – img_h / 2 + $(document).scrollTop());}$(document).ready(function() {$(“#overPage”).css(“opacity”, 0.7);
$(“#overPage,#floating”).show();centerIt();
});
$(window).scroll(function() {setTimeout(function()
{ ani(); }, delay);lastScroll = new Date().getTime();});
$(window).resize(function() {centerIt();});function ani()
 {if ((new Date().getTime() – lastScroll) >= (delay – 20))
{$(“#floating”).animate({ top: ($(window).height() / 2 – img_h / 2 + $(document).scrollTop())
 }, speed);
}}
function closeMe()
 {$(“#overPage,#floating”).hide();}
</script>
                 {$(“#overPage”).css(“width”, $(window).width())                     ;$(“#overPage”).css(“height”, $(document).height());$(“#floating”).css(“left”, $(window).width() / 2 – img_w / 2);                           $(“#floating”).css(“top”, $(window).height() / 2 – img_h / 2 + $(document).scrollTop());}$(document).ready(function() {$(“#overPage”).css(“opacity”, 0.7);$(“#overPage,#floating”).show();centerIt();});$(window).scroll(function() {setTimeout(function(){ ani(); }, delay);lastScroll = new Date().getTime();});$(window).resize(function() {centerIt();});function ani() {if ((new Date().getTime() – lastScroll) >= (delay – 20)){$(“#floating”).animate({ top: ($(window).height() / 2 – img_h / 2 + $(document).scrollTop()) }, speed);}}function closeMe() {$(“#overPage,#floating”).hide();}</script>                 {$(“#overPage”).css(“width”, $(window).width())                     ;$(“#overPage”).css(“height”, $(document).height());$(“#floating”).css(“left”, $(window).width() / 2 – img_w / 2);                           $(“#floating”).css(“top”, $(window).height() / 2 – img_h / 2 + $(document).scrollTop());}$(document).ready(function() {$(“#overPage”).css(“opacity”, 0.7);$(“#overPage,#floating”).show();centerIt();});$(window).scroll(function() {setTimeout(function() { ani(); }, delay);lastScroll = new Date().getTime();});$(window).resize(function() {centerIt();});function ani() {if ((new Date().getTime() – lastScroll) >= (delay – 20)) {$(“#floating”).animate({ top: ($(window).height() / 2 – img_h / 2 + $(document).scrollTop()) }, speed);}}function closeMe() {$(“#overPage,#floating”).hide();}</script></div><!–End Adv Popup–>


Thay đổi các dòng màu đỏ cho đúng nè.Thêm code mới: dạng get cookie chỉ hiện 1 lần
<div id="quangcaochan" style="width:0px;height:0px;position:fixed;background-color:white;z-index:100">

 <script>        var cookie_quangcaochan = SVIT_ADS_GetCookie('dj247net_quangcaochan_info');        if (cookie_quangcaochan != '')         {            $("#quangcaochan").css('display','none');            $("#quangcaochan").html('');        }    </script>    <a id='tatquangcaochan' style="float:right;color:grey;cursor:pointer">Tắt quảng cáo (X)</a>    <a href="http://domain lick baner sẽ đến" target="_blank"><img src="http://doamin/banner.png" width="440px" height="280px"/></a>   <script>        var w = $(window).width()/2 - 320;        var h = $(window).height()/2 - 240;        $("#quangcaochan").css({'top':h,'left':w,'width':'640px','height':'480px','z-index':'100000'});        $("#tatquangcaochan").click(function(){            $("#quangcaochan").html('');            $("#quangcaochan").css('display','none');            var Time_expires = 60*60*10*1000;            SVIT_ADS_SetCookie('dj247net_quangcaochan_info','true',Time_expires);        });    </script>    </div></div>