Old school Swatch Watches
Share đoạn code tạo tag url thân thiện cho tool post fl xtgem | Xtgem | WapMasTer - Diễn đàn truyện - Xtseo.Xtgem.Com
* MT-A *
* Cấp bậc: mem
2015-05-24 14:08

+ đầu tiên mở tool post thêm đoạn code này:
Từ khóa:

<input name="tag" type="text">

Copy code

+ chỗ phần khai báo biến thêm đoạn code này:
$tag = cvnokia($_POST['tag']);
$urltag = rwurl($tag);

Copy code

thêm đoạn này vào ngay dưới phần kết thúc khai báo mấy biến kia:
//tạo tag url thân thiện
$mang = explode(',',$tag);
foreach ($mang as $item){
$filetag = rwurl($item);
curl_setopt($ch, CURLOPT_URL, 'http://xtgem.com/filebrowser/file_save?__token='.$token.'&act=edit_file&file=/tag/'.$filetag.'');
curl_setopt($ch, CURLOPT_POSTFIELDS, array('value' => cvnokia('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" />
<!--parser:xtscript-->
var $text = '.$item.'
var $texttag = '.$filetag.'
<xt:include file="/xt/headtag.xt"/> 
<!--/parser:xtscript-->
 </head><body>
<xt:include file="/xt/bodytag.xt"/> 
</body></html>'), 'submit' => 'Save'));
curl_exec($ch);
$taotag .= '<a href="/tag/'.$filetag.'" title="'.$item.'">'.$item.'</a>, ';
}

Copy code

+ còn đây là phần tạo tên file để có thể tìm kiếm ra kết quả được thêm ngay dưới code trên:
//Tạo nội dung vào key
curl_setopt($ch, CURLOPT_URL, 'http://xtgem.com/filebrowser/file_save?__token='.$token.'&act=edit_file&file=/key/'.rwurl($title).'-'.$urltag.'-'.rwurl($title).'');
curl_setopt($ch, CURLOPT_POSTFIELDS, array('value' => cvnokia('[ten]'.$title.'[/ten][tag]'.$taotag.'[/tag][link]/'.rwurl($title).'.html[/link][info]'.$noidung.'[/info]'), 'submit' => 'Save'));
curl_exec($ch);

Copy code

+ muốn thêm tag vào bài viết thì chèn đoạn này vào mấy chỗ [info] và [ten] ý hoặc khai báo luôn:
[tag]'.$taotag.'[/tag]
Copy code

=> vậy là xong chế file tìm kiếm thì ae tự tham khảo nha, có gì không hiểu cứ cmt ở đây, hoặc paste tool post ra mình add cho
Chia sẻ:
BBCode:

Link:
Thành viên: BOT, & 11 Khách ghé thăm!
Từ khóa: Share, đoạn, code, tạo, tag, url, thân, thiện, cho, tool, post, fl, xtgem,

Share đoạn code tạo tag url thân thiện cho tool post fl xtgem