Nét Đẹp Việt Nam

 Quên mật khẩu
 Register
Xem: 3983|Trả lời: 0
In Chủ đề trước Tiếp theo

SEO Tips for Discuz!

[Lấy địa chỉ]
Nhảy đến trang chỉ định
1#
1. Mở file: \templates\default\header.htm
  1. <meta name="keywords" content="{$metakeywords}$seokeywords" />
  2. <meta name="description" content="$metadescription $bbname $seodescription - Discuz! Board" />
  3. <meta name="generator" content="Discuz! $version" />
  4. <meta name="author" content="Discuz! Team and Comsenz UI Team" />
  5. <meta name="copyright" content="2001-2007 Comsenz Inc." />
  6. <meta name="MSSmartTagsPreventParsing" content="True" />
  7. <meta http-equiv="MSThemeCompatible" content="Yes" />
Sao chép mã
Sẽ thấy
  1. <meta name="generator" content="Discuz! $version" />
  2. <meta name="author" content="Discuz! Team and Comsenz UI Team" />
  3. <meta name="copyright" content="2001-2007 Comsenz Inc." />
Sao chép mã
Sửa theo website của bạn
  1. content="nội dung đặc tả"
Sao chép mã
2. Mở file: viewthread.php
Tìm
  1. while($post = $db->fetch_array($query)) {
Sao chép mã
Thêm dưới đó
  1. if($post['first']==1)
  2. $s_message=$post;
Sao chép mã
Tìm tiếp
  1. include template('viewthread');
Sao chép mã
Thêm trước đó
  1. if($s_message['participle']==''){
  2.         $messlist = trim(strip_tags($s_message['message']));
  3.         require("./php_s/lib_splitword_full.php");
  4.         $sp = new SplitWord();   
  5.         $strarr=$sp->FindNewWord($sp->SplitRMM($messlist));
  6.         $strarr=$sp->GetAlabNum($strarr);
  7.         $sp->Clear();
  8.         $strarr=explode(' ',$strarr);
  9.         foreach ($strarr as $val)
  10.         {        
  11.                 if(mb_strlen($val)>3&&!ereg('[0-9]+|[a-z]+',$val)&&!eregi("(0|1|2|3|A|B|C|D|F|W|S|\|"|,|.|?|<|>|{|}|[|]|*|&|^|%|#|@|!|~|(|)|+|-|||:|;|”|。|“)",$val)){
  12.                 $arraylist[]=$val;
  13.                 $metakeywords .=$val.' | '; 
  14.                 }
  15.                 if(count($arraylist)>9)  
  16.                 break;
  17.         }
  18.     if($metakeywords != '')
  19. $db->query("UPDATE `{$tablepre}posts` SET `participle` = '{$metakeywords}' WHERE `pid` ='{$s_message['pid']}' LIMIT 1 ;");
  20. }else {
  21. $metakeywords = $s_message['participle'];
  22.   $seokeywords = $navtitle;
  23.   $metadescription = strip_tags($metadescription);
  24.   $seodescription = preg_replace('/\s/isU','',strip_tags($seodescription));
  25. }
Sao chép mã
4. Chạy truy vấn SQL
  1. ALTER TABLE `cdb_posts` ADD `participle` VARCHAR( 255 ) NOT NULL COMMENT 'participle_char';
Sao chép mã
hoặc
  1. ALTER TABLE `cdb_posts` DROP `participle`;
  2. ALTER TABLE `cdb_posts` ADD `participle` VARCHAR( 255 ) NOT NULL COMMENT 'participle_char';
Sao chép mã
5. Giải nén và upload folder php_s lên thư mục chứa folder
Bạn phải đăng nhập mới được đăng bài Đăng nhập | Register

Quy tắc điểm

Phòng tối|iPhone|Archiver|G+|Youtube|Facebook|Twitter|Contact| Netdepviet.org

GMT+7, 19-4-2024 01:13 PM , Processed in 0.014013 second(s), 17 queries .

Powered by Discuz! X3.2

© 2006 Made with in Hanoi,Vietnam and Contents are published by all members

Trả lời nhanh Lên trên Trở lại danh sách