首页 > 教程 >

去除dedecms织梦升级友情链接增加织梦链投放链接

2023-02-19教程围观

简介方法如下:点击后台-模板-标签源码管理找到flink.lib.php友情链接点击更改:将下列全部代码复制到里面替换,保存即可!注意下gbk和uft8的编码。建议先复制到dreamweaver再复制到后台编辑器里即可!

  

方法如下: 点击后台 - 模板 - 标签源码管理 找到

f .lib.php                                  友情链接

点击更改:

将下列全部代码复制到里面替换,保存即可!

<?php if(!defined('DEDEINC')) {  exit("Request Error!"); }function lib_f (&$ctag,&$refObj) {  global $dsql;  $attlist="type|textall,row|24, len|24, type|1,typeid|0";  FillAttsDefault($ctag->CAttribute->Items,$attlist);  extract($ctag->CAttribute->Items, EXTR_SKIP); $totalrow = $row;  $revalue = ''; $wsql = " where ischeck >= '$ type' ";  if($typeid == 0)  {   $wsql .= '';  }  else  {   $wsql .= "And typeid = '$typeid'";  }  if($type=='image')  {   $wsql .= " And logo<>'' ";  }  else if($type=='text')  {   $wsql .= " And logo='' ";  } $equery = "Select * from dede_f  $wsql order by sortrank asc limit 0,$totalrow"; if(trim($ctag->GetInnerText())=='') $innertext = "<li>[field:  /]</li>";  else $innertext = $ctag->GetInnerText();    $dsql->SetQuery($equery);  $dsql->Execute();  while($dbrow=$dsql->Get ())  {   if($type=='text'||$type=='textall')   {    $  = "<a href='".$dbrow->url."' target='_blank'>".cn_substr($dbrow->webname,$ len)."</a> ";   }   else if($type=='image')   {    $  = "<a href='".$dbrow->url."' target='_blank'><img src="".$dbrow->logo."' width='88' height='31' border='0'></a> ";   }   else   {    if($dbrow->logo=='')    {     $  = "<a href='".$dbrow->url."' target='_blank'>".cn_substr($dbrow->webname,$ len)."</a> ";    }    else    {     $  = "<a href='".$dbrow->url."' target='_blank'><img src="".$dbrow->logo."' width='88' height='31' border='0'></a> ";    }   }   $rbtext = preg_replace("/[field:url([/s]{0,})]/isU", $row['url'], $innertext);    $rbtext = preg_replace("/[field:webname([/s]{0,})]/isU", $row['webname'], $rbtext);    $rbtext = preg_replace("/[field:logo([/s]{0,})]/isU", $row['logo'], $rbtext);    $rbtext = preg_replace("/[field: ([/s]{0,})]/isU", $ , $rbtext);    $revalue .= $rbtext;  }  return $revalue; } ?>
 注意下gbk和uft8的编码。建议先复制到dreamweaver再复制到后台编辑器里即可!

 

下载链接:网站源码/小程序源码/网站模板下载

Tags: 织梦 链接 升级 去除 增加