dedecms将标题直接链接到外部链接(2)_DedeCms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

</table> [Copy to clipboard]
打开:article_edit.php
找到:
CODE: <table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80">阅读权限:</td>
<td width="224">
<select name="arcrank" id="arcrank" style="width:150">
<option value='<?=$arcRow["arcrank"]?>'><?=$arcRow["rankname"]?></option>
<?
$urank = $cuserLogin->getUserRank();
$dsql = new DedeSql(false);
$dsql->SetQuery("Select * from dede_arcrank where adminrank<='$urank'");
$dsql->Execute();
while($row = $dsql->GetObject())
{
echo " <option value='".$row->rank."'>".$row->membername."</option>
";
}
$dsql->Close();
?>
</select> </td>
<td width="63">发布选项:</td>
<td>
<input name="ishtml" type="radio" class="np" value="1"<?if($arcRow["ismake"]!=-1) echo " checked";?>>
生成HTML
<input type="radio" name="ishtml" class="np" value="0"<?if($arcRow["ismake"]==-1) echo " checked";?>>
仅动态浏览
</td>
</tr>
</table> [Copy to clipboard]
后面加入:
CODE: <table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80">转向网址:</td>
<td width="520"><input name="redirecturl" type="text" id="redirecturl" style="width:250px" value="<?=$arcRow["redirecturl"]?>"></td>
</tr>
</table> [Copy to clipboard]

打开:action_archives_save.php
找到
CODE: if($ishtml==0) $ismake = -1; [Copy to clipboard]
改为
CODE: if($redirecturl!="") $ishtml = 0;
if($ishtml==0) $ismake = -1; [Copy to clipboard]
适当地方加入:
CODE: $redirecturl = cn_substr($redirecturl,250); [Copy to clipboard]
查询语句:对照加入redirecturl
CODE:
//加入数据库的SQL语句
//----------------------------------
$inQuery = "INSERT INTO dede_archives(
typeid,typeid2,sortrank,iscommend,ismake,channel,
arcrank,click,money,title,color,writer,source,litpic,

查看更多 DedeCms教程  织梦模板  织梦DedeCms视频教程  织梦dedecms专题

来源:模板无忧//所属分类:DedeCms教程/更新时间:2007-01-28
相关DedeCms教程