|
发表于 2007-4-17 16:34:35
|
|阅读模式
来自 中国山东济南
此功能对于手工添加是没什么用的,但是! 对于采集的站长可以省老多时间!!!!!!!!!!!!!!!!!!!!!!!
我现在只用DEDE3.01 弄过3.1后台 4.0还没看
此功能哦都是在DEDE3.01下测试的
这样子,采集完数据,直接在列表页搞来搞去就OK了,哈哈
取消推荐功能
如果你的文章推荐了,DEDE版本下只能进入文章管理然后把 推荐 选框去掉-然后再点确定-后台又得找列表.弄过的都晓得这样非常麻烦滴.
方法:
- 在\DEDE目录下 查找archives_do.php文件
- 找到这个
- [code]//推荐文档
- function commendArchives();
- ---------------------------*/
- else if($dopost=="commendArchives")
- {
- SetPageRank(5);
- if( $aid!="" && !ereg("(".$aid."`|`".$aid.")",$qstr) ) $qstr .= "`".$aid;
- if($qstr==""){
- ShowMsg("参数无效!",$ENV_GOBACK_URL);
- exit();
- }
- $qstrs = explode("`",$qstr);
- $dsql = new DedeSql(false);
- foreach($qstrs as $aid)
- {
- $aid = ereg_replace("[^0-9]","",$aid);
- if($aid=="") continue;
- $dsql->SetQuery("Update #@__archives set [color=Red]iscommend='11'[/color] where ID='$aid'");
- $dsql->ExecuteNoneQuery();
- }
- $dsql->Close();
- ShowMsg("成功把所选的文档设为推荐!",$ENV_GOBACK_URL);
- exit();
- }
- /*--------------------------
复制代码
将红字改为iscommend='0'
然后去DEDE后台列表中右键,点"推荐"的时候,实际上是取消推荐 [/code]
如果你想在列表增加颜色和加粗的,看下面
- 文件方位 dede\templets\content_list.htm
- 原代码
- [code]//上下文菜单
- function ShowMenu(obj,aid,atitle)
- {
- var eobj,popupoptions
- popupoptions = [
- new ContextItem("浏览文档",function(){ window.open("archives_do.php?aid="+aid+"&dopost=viewArchives"); }),
- new ContextItem("编辑文档",function(){ location="archives_do.php?aid="+aid+"&dopost=editArchives"; }),
- new ContextSeperator(),
- new ContextItem("更新HTML",function(){ var qstr=getCheckboxItem(); location="archives_do.php?aid="+aid+"&dopost=makeArchives&qstr="+qstr; }),
- new ContextItem("审核文档",function(){ var qstr=getCheckboxItem(); location="archives_do.php?aid="+aid+"&dopost=checkArchives&qstr="+qstr; }),
- new ContextItem("推荐文档",function(){ var qstr=getCheckboxItem(); location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; }),
- new ContextSeperator(),
- new ContextItem("删除文档",function(){ var qstr=getCheckboxItem(); location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; }),
- new ContextSeperator(),
- new ContextItem("全部选择",function(){ selAll(); }),
- new ContextItem("取消选择",function(){ noSelAll(); }),
- new ContextSeperator(),
- new ContextItem("频道管理",function(){ location="catalog_main.php"; })
- ]
- ContextMenu.display(popupoptions)
- }
复制代码
想加什么随便加 ,我加了三行
- new ContextItem("加粗",function(){ var qstr=getCheckboxItem(); location="archives_do.php?aid="+aid+"&dopost=jiachu&qstr="+qstr; }),
- new ContextItem("变红",function(){ var qstr=getCheckboxItem(); location="archives_do.php?aid="+aid+"&dopost=bianhong&qstr="+qstr; }),
- new ContextItem("变蓝",function(){ var qstr=getCheckboxItem(); location="archives_do.php?aid="+aid+"&dopost=bianlan&qstr="+qstr; }),
复制代码
下一步去找dede\archives_do.php
增加三个选项就是
- //加粗
- function jiancu();
- ---------------------------*/
- else if($dopost=="jiachu")
- {
- SetPageRank(5);
- if( $aid!="" && !ereg("(".$aid."`|`".$aid.")",$qstr) ) $qstr .= "`".$aid;
- if($qstr==""){
- ShowMsg("参数无效!",$ENV_GOBACK_URL);
- exit();
- }
- $qstrs = explode("`",$qstr);
- $dsql = new DedeSql(false);
- foreach($qstrs as $aid)
- {
- $aid = ereg_replace("[^0-9]","",$aid);
- if($aid=="") continue;
- $dsql->SetQuery("Update #@__archives set iscommend='5' where ID='$aid'");
- $dsql->ExecuteNoneQuery();
- }
- $dsql->Close();
- ShowMsg("成功把所选的文档设为推荐!",$ENV_GOBACK_URL);
- exit();
- }
- /*--------------------------
- //变红
- function bianhong();
- ---------------------------*/
- else if($dopost=="bianhong")
- {
- SetPageRank(5);
- if( $aid!="" && !ereg("(".$aid."`|`".$aid.")",$qstr) ) $qstr .= "`".$aid;
- if($qstr==""){
- ShowMsg("参数无效!",$ENV_GOBACK_URL);
- exit();
- }
- $qstrs = explode("`",$qstr);
- $dsql = new DedeSql(false);
- foreach($qstrs as $aid)
- {
- $aid = ereg_replace("[^0-9]","",$aid);
- if($aid=="") continue;
- $dsql->SetQuery("Update #@__archives set color='#FF0000' where ID='$aid'");
- $dsql->ExecuteNoneQuery();
- }
- $dsql->Close();
- ShowMsg("成功把所选的文档设为推荐!",$ENV_GOBACK_URL);
- exit();
- }
- /*--------------------------
- //变蓝
- function bianlan();
- ---------------------------*/
- else if($dopost=="bianlan")
- {
- SetPageRank(5);
- if( $aid!="" && !ereg("(".$aid."`|`".$aid.")",$qstr) ) $qstr .= "`".$aid;
- if($qstr==""){
- ShowMsg("参数无效!",$ENV_GOBACK_URL);
- exit();
- }
- $qstrs = explode("`",$qstr);
- $dsql = new DedeSql(false);
- foreach($qstrs as $aid)
- {
- $aid = ereg_replace("[^0-9]","",$aid);
- if($aid=="") continue;
- $dsql->SetQuery("Update #@__archives set color='#0000FF' where ID='$aid'");
- $dsql->ExecuteNoneQuery();
- }
- $dsql->Close();
- ShowMsg("成功把所选的文档设为推荐!",$ENV_GOBACK_URL);
- exit();
- }
- /*--------------------------
复制代码 [/code]
没事别吵来吵去了,多研究研究技术
你看我不会ASP,不会PHP,都能改程序了
[ 本帖最后由 裸舞ing 于 2007-4-17 19:22 编辑 ] |
评分
-
查看全部评分
|