dedecms将标题直接链接到外部链接(2)_DedeCms教程
教程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使用拼音首字母做栏目名称
- 织梦DEDECMS站群增强版 DedeCMS搭建站群首选
- DedeCMS Error:Tag disabled:php错误的完整处理方法
- dedecms编码转换方法 gbk转UTF-8,UTF-8转GBK
- 防XSS,sql注射,代码执行,文件包含的通用代码
- DedeCms教程:优化DedeCMS搜索结果
- DedeCms教程:Linux+Apache+PHP+MySQL服务器环境(CentOS篇)
- DedeCms教程:LuManager服务器管理软件安装DEDECMS软件
- DedeCms教程:Ubuntu/Debian上安装 PHP 5.3, Nginx 和 PHP-fpm
- DedeCms教程:windows server 2003 php 环境搭建