本帖最后由 casey 于 2010-6-11 14:56 编辑
1、修改文件admincp.php 106行
修改- array('items', 'comments', 'attachments', 'tags', 'reports', 'reportmanage'),
复制代码 为- array('items', 'comments', 'attachments', 'tags','gettag', 'reports', 'reportmanage'),
复制代码 2、修改文件batch.common.php 271行
增加内容- elseif($action == 'relatetag') {
-
- $subjectenc = rawurlencode(strip_tags($_GET['subjectenc']));
- $messageenc = rawurlencode(strip_tags($_GET['messageenc']));
- $return = '';
- $data = @implode('', file("http://search.qihoo.com/sint/related_kw.html?title=$subjectenc&content=$messageenc&ics=$charset&ocs=$charset"));
- if($data) {
- $parser = xml_parser_create();
- xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
- xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
- xml_parse_into_struct($parser, $data, $values, $index);
- xml_parser_free($parser);
-
- $kws = array();
-
- foreach($values as $valuearray) {
- if($valuearray['tag'] == 'kw' || $valuearray['tag'] == 'ekw') {
- if(PHP_VERSION > '5' && $charset != 'utf-8') {
- $valuearray['value'] = encodeconvert("UTF-8", $valuearray['value']);
- } else {
- $valuearray['value'] = trim($valuearray['value']);
- }
- $kws[] = $valuearray['value'];
- }
- }
- if($kws) {
- foreach($kws as $kw) {
- $kw = htmlspecialchars($kw);
- $return .= $kw.' ';
- }
- $return = htmlspecialchars($return);
- }
-
- }
- echo $return;
- }
复制代码 3、上传gettag.php到admin目录
|