家好動(dòng)態(tài)
織夢系統(tǒng)二次開發(fā) 讓采集新聞軟件沒門
最近在做一個(gè)門戶網(wǎng)站,想對(duì)靜態(tài)文件名加密
dede 的默認(rèn)防采集,真的很差;而且對(duì)seo也很不利;在網(wǎng)站找了一下也沒有找到,只好自己想辦法來實(shí)現(xiàn)
在include/include/channelunit.helper.php 186行左右找到如下 函數(shù)修改
$articleDir = MfTypedir($typedir);
$articleRule = strtolower($namerule);
if($articleRule=='')
{
$articleRule = strtolower($GLOBALS['cfg_df_namerule']);
}
if($typedir=='')
{
$articleDir = $GLOBALS['cfg_cmspath'].$GLOBALS['cfg_arcdir'];
}
$dtime = GetDateMk($timetag);
list($y, $m, $d) = explode('-', $dtime);
$arr_rpsource = array('{typedir}','{y}','{m}','smwu0g0syey','{timestamp}','{aid}','{cc}');
//my_he 防采集
$str=md5($aid+'o');
$aid=substr($str,-6);
$arr_rpvalues = array($articleDir,$y, $m, $d, $timetag, $aid, dd2char($m.$d.$aid.$y));
if($filename != '')
{
$articleRule = dirname($articleRule).'/'.$filename.$GLOBALS['cfg_df_ext'];
}
$articleRule = str_replace($arr_rpsource,$arr_rpvalues,$articleRule);
if(preg_match("/\{p/", $articleRule))
{
$articleRule = str_replace('{pinyin}',GetPinyin($title).'_'.$aid,$articleRule);
$articleRule = str_replace('{py}',GetPinyin($title,1).'_'.$aid,$articleRule);
}
$articleUrl = '/'.preg_replace("/^\//", '', $articleRule);
if(preg_match("/index\.html/", $articleUrl) && $cfg_arc_dirname=='Y')
{
$articleUrl = str_replace('index.html', '', $articleUrl);
}
return $articleUrl;
}
}
}
dede 的默認(rèn)防采集,真的很差;而且對(duì)seo也很不利;在網(wǎng)站找了一下也沒有找到,只好自己想辦法來實(shí)現(xiàn)
在include/include/channelunit.helper.php 186行左右找到如下 函數(shù)修改
$articleDir = MfTypedir($typedir);
$articleRule = strtolower($namerule);
if($articleRule=='')
{
$articleRule = strtolower($GLOBALS['cfg_df_namerule']);
}
if($typedir=='')
{
$articleDir = $GLOBALS['cfg_cmspath'].$GLOBALS['cfg_arcdir'];
}
$dtime = GetDateMk($timetag);
list($y, $m, $d) = explode('-', $dtime);
$arr_rpsource = array('{typedir}','{y}','{m}','smwu0g0syey','{timestamp}','{aid}','{cc}');
//my_he 防采集
$str=md5($aid+'o');
$aid=substr($str,-6);
$arr_rpvalues = array($articleDir,$y, $m, $d, $timetag, $aid, dd2char($m.$d.$aid.$y));
if($filename != '')
{
$articleRule = dirname($articleRule).'/'.$filename.$GLOBALS['cfg_df_ext'];
}
$articleRule = str_replace($arr_rpsource,$arr_rpvalues,$articleRule);
if(preg_match("/\{p/", $articleRule))
{
$articleRule = str_replace('{pinyin}',GetPinyin($title).'_'.$aid,$articleRule);
$articleRule = str_replace('{py}',GetPinyin($title,1).'_'.$aid,$articleRule);
}
$articleUrl = '/'.preg_replace("/^\//", '', $articleRule);
if(preg_match("/index\.html/", $articleUrl) && $cfg_arc_dirname=='Y')
{
$articleUrl = str_replace('index.html', '', $articleUrl);
}
return $articleUrl;
}
}
}
家好網(wǎng)絡(luò)原創(chuàng)文章,本文地址:http://g3674.cn/news/news111.html,轉(zhuǎn)載請注明出處。
手 機(jī):15118212450
電 話:0769-33549760
Q Q:563980989 / 1751061171
Email:563980989@qq.com
地 址:廣東東莞市莞城區(qū)旗峰路旗峰樓601室