dedecms將標(biāo)題直接鏈接到外部鏈接_DedeCms教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
真正的【將標(biāo)題直接鏈接到外部鏈接】
功能:
將標(biāo)題直接鏈接到外部鏈接,后臺(tái)文章錄入:直接添加轉(zhuǎn)向網(wǎng)址即可,無須其他選擇,不轉(zhuǎn)向請(qǐng)留空。
網(wǎng)址為動(dòng)態(tài)轉(zhuǎn)向,記錄點(diǎn)擊數(shù),外連和動(dòng)態(tài)文章一樣可以設(shè)置收費(fèi)等。
改法:
第一步
假設(shè)dede_為表前綴,則在dede_archives 添加一字段
字段名:redirecturl
打開:view.php
找到:
CODE: $arc->Display();
$arc->Close(); [Copy to clipboard]
前面加入:
CODE: $url = new Archives($aid);
$redirecturl = $url->ArcInfos['redirecturl'];
if ($redirecturl != "") {
$dsql = new DedeSql(false);
$dsql->SetQuery("Update dede_archives set click=click 1 where ID='$aid'");
$dsql->ExecuteNoneQuery();
header("Location:$redirecturl");
exit();
}
$url->Close(); [Copy to clipboard]
打開:article_add.php
找到
CODE: <table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80">閱讀權(quán)限:</td>
<td width="224"> <select name="arcrank" id="arcrank" style="width:150">
<?
$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">發(fā)布選項(xiàng):</td>
<td><input name="ishtml" type="radio" class="np" value="1" checked>
生成HTML
<input type="radio" name="ishtml" class="np" value="0">
僅動(dòng)態(tài)瀏覽</td>
</tr>
</table> [Copy to clipboard]
后面加入:
CODE: <table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80">轉(zhuǎn)向網(wǎng)址:</td>
<td width="520"><input name="redirecturl" type="text" id="redirecturl" style="width:250px"></td>
</tr>
功能:
將標(biāo)題直接鏈接到外部鏈接,后臺(tái)文章錄入:直接添加轉(zhuǎn)向網(wǎng)址即可,無須其他選擇,不轉(zhuǎn)向請(qǐng)留空。
網(wǎng)址為動(dòng)態(tài)轉(zhuǎn)向,記錄點(diǎn)擊數(shù),外連和動(dòng)態(tài)文章一樣可以設(shè)置收費(fèi)等。
改法:
第一步
假設(shè)dede_為表前綴,則在dede_archives 添加一字段
字段名:redirecturl
打開:view.php
找到:
CODE: $arc->Display();
$arc->Close(); [Copy to clipboard]
前面加入:
CODE: $url = new Archives($aid);
$redirecturl = $url->ArcInfos['redirecturl'];
if ($redirecturl != "") {
$dsql = new DedeSql(false);
$dsql->SetQuery("Update dede_archives set click=click 1 where ID='$aid'");
$dsql->ExecuteNoneQuery();
header("Location:$redirecturl");
exit();
}
$url->Close(); [Copy to clipboard]
打開:article_add.php
找到
CODE: <table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80">閱讀權(quán)限:</td>
<td width="224"> <select name="arcrank" id="arcrank" style="width:150">
<?
$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">發(fā)布選項(xiàng):</td>
<td><input name="ishtml" type="radio" class="np" value="1" checked>
生成HTML
<input type="radio" name="ishtml" class="np" value="0">
僅動(dòng)態(tài)瀏覽</td>
</tr>
</table> [Copy to clipboard]
后面加入:
CODE: <table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80">轉(zhuǎn)向網(wǎng)址:</td>
<td width="520"><input name="redirecturl" type="text" id="redirecturl" style="width:250px"></td>
</tr>
查看更多 DedeCms教程 織夢(mèng)模板 織夢(mèng)DedeCms視頻教程 織夢(mèng)dedecms專題
相關(guān)DedeCms教程:
- Dedecms生成百度地圖圖文教程
- 織夢(mèng)dedecms生成下拉式友情鏈接列表
- DEDECMS使用拼音首字母做欄目名稱
- 織夢(mèng)DEDECMS站群增強(qiáng)版 DedeCMS搭建站群首選
- DedeCMS Error:Tag disabled:php錯(cuò)誤的完整處理方法
- dedecms編碼轉(zhuǎn)換方法 gbk轉(zhuǎn)UTF-8,UTF-8轉(zhuǎn)GBK
- 防XSS,sql注射,代碼執(zhí)行,文件包含的通用代碼
- DedeCms教程:優(yōu)化DedeCMS搜索結(jié)果
- DedeCms教程:Linux+Apache+PHP+MySQL服務(wù)器環(huán)境(CentOS篇)
- DedeCms教程:LuManager服務(wù)器管理軟件安裝DEDECMS軟件
- DedeCms教程:Ubuntu/Debian上安裝 PHP 5.3, Nginx 和 PHP-fpm
- DedeCms教程:windows server 2003 php 環(huán)境搭建
DedeCms教程教程Rss訂閱Cms教程搜索
DedeCms教程推薦
猜你也喜歡看這些
- DEDECMS合肥優(yōu)家裝飾整站源碼
- 織夢(mèng)CMS大氣企業(yè)工作室模板
- 織夢(mèng)寬屏網(wǎng)站建站公司模板(整站帶數(shù)據(jù))
- 織夢(mèng)網(wǎng)絡(luò)工作室/廣告公司網(wǎng)站模板下載(含數(shù)據(jù))
- 織夢(mèng)綠色小清新文章模板(適合文章類網(wǎng)站)
- 織夢(mèng)過濾設(shè)備公司企業(yè)網(wǎng)站模板 大氣美觀
- dedecms藍(lán)色大氣機(jī)械公司模板
- 織夢(mèng)森林消防裝備企業(yè)網(wǎng)站模版
- dedecms機(jī)械設(shè)備企業(yè)模版
- dedecms投資理財(cái)企業(yè)公司織夢(mèng)模板
- 相關(guān)鏈接:
復(fù)制本頁鏈接| 搜索dedecms將標(biāo)題直接鏈接到外部鏈接| DedeCms模板| Dede模板| 織夢(mèng)模板| dedecms
- 教程說明:
DedeCms教程-dedecms將標(biāo)題直接鏈接到外部鏈接。