如果您想了解织梦系统dedecms5.7调用文档评论次数的方案和织梦相关文章调用的知识,那么本篇文章将是您的不二之选。我们将深入剖析织梦系统dedecms5.7调用文档评论次数的方案的各个方面,并为您
如果您想了解织梦系统dedecms5.7调用文档评论次数的方案和织梦相关文章调用的知识,那么本篇文章将是您的不二之选。我们将深入剖析织梦系统dedecms5.7调用文档评论次数的方案的各个方面,并为您解答织梦相关文章调用的疑在这篇文章中,我们将为您介绍织梦系统dedecms5.7调用文档评论次数的方案的相关知识,同时也会详细的解释织梦相关文章调用的运用方法,并给出实际的案例分析,希望能帮助到您!
本文目录一览:- 织梦系统dedecms5.7调用文档评论次数的方案(织梦相关文章调用)
- 360检测织梦系统dedecms重定向漏洞的解决方案
- dedecms5.7织梦系统首页sql调用disucuz2.5内容
- dedecms5.7织梦系统首页调用问答的代码
- dedecms5.7织梦调用文档评论次数的办法
织梦系统dedecms5.7调用文档评论次数的方案(织梦相关文章调用)
解决方案cmsxx_archives 添加postcount int(10) UNSIGNED default 0
然后打开plus\feedback.php 找到大约220左右
//保存评论内容
if($comtype == 'comments')
{
$arctitle = addslashes($title);
if($msg!='')
{
$inquery = "INSERT INTO `cmsxx_feedback`(`aid`,`typeid`,`username`,`arctitle`,`ip`,`ischeck`,`dtime`, `mid`,`bad`,`good`,`ftype`,`face`,`msg`)
VALUES ('$aid','$typeid','$username','$arctitle','$ip','$ischeck','$dtime', '{$cfg_ml->M_ID}','0','0','$feedbacktype','$face','$msg'); ";
//插入位置1
$rs = $dsql->ExecuteNoneQuery($inquery);
if(!$rs)
{
echo $dsql->GetError();
exit();
}
//插入位置2
插入位置1内容:
$rowc = $dsql->GetOne("Select count(*) as count from `cmsxx_feedback` where aid ='$aid'");
$pcount = $rowc ['count'];
$inquery2 = "update `cmsxx_archives` set postcount = '$pcount' where id = '$aid'";
插入位置2内容:
$rs = $dsql->ExecuteNoneQuery($inquery2);
if(!$rs)
{
echo $dsql->GetError();
exit();
}
只需要复制以上内容到你想调用的地方即可。 本文章网址:http://www.ppssdd.com/code/13328.html。转载请保留出处,谢谢合作!
360检测织梦系统dedecms重定向漏洞的解决方案
打开download.PHP(在根目录下的plus文件夹中),在文件第89行找到代码header("location:$link");
将此代码替换为
if(stristr($link,$cfg_basehost)) { header("location:$link"); } else { header("location:$cfg_basehost"); }
修改保存后,重新检测已显示漏洞修复了。
提示,download.PHP代码中,header("location:$link");的位置并不都固定在89行,不同文件有所差异,大家可能需要耐心找一下。
dedecms5.7织梦系统首页sql调用disucuz2.5内容
注明:如果你安装在不同的数据库,需要在sql中指定数据库,我这边是jtb,与企业的织梦CMS不是安装在同库中。调用图文帖子的办法:
{dede:sql sql="SELECT jtb.pre_forum_threadimage.tid, jtb.pre_forum_threadimage.attachment, jtb.pre_forum_thread.tid, jtb.pre_forum_thread.fid, jtb.pre_forum_thread.subject FROM jtb.pre_forum_threadimage
LEFT JOIN jtb.pre_forum_thread ON jtb.pre_forum_thread.tid = jtb.pre_forum_threadimage.tid
WHERE displayorder >=0 LIMIT 0 , 2"}
<li><a href=http://www.dede58.com/a/dedejq/"/bbs/forum.php?mod=viewthread&tid=[field:tid /]"><img src=http://www.dede58.com/a/dedejq/"bbs/data/attachment/forum/[field:attachment/]" width="153px" height="100px" /></a></li>
<li><a href=http://www.dede58.com/a/dedejq/"/bbs/forum.php?mod=viewthread&tid=[field:tid /]">[field:subject function="cn_substr('@me',28)" /]</a></li>
{/dede:sql}
调用即图中右边的部分,网友*关注的问题是dz置顶贴,在dz表中的字段是由displayorder控制的,帖子中回复个数可以用[field:replies /]显示,而浏览量则是[field:views /]
<div>
<h2>网友*关注的问题</h2>
<ul>{dede:loop table="jtb.pre_forum_thread" if="displayorder>0" sort="tid" row="4"}
<li><a href=http://www.dede58.com/a/dedejq/"/bbs/forum.php?mod=viewthread&tid=[field:tid /]"> [field:subject function="cn_substr('@me',48)" /]</a> <p><b>[field:replies /]</b>个回答 <strong>[field:views /]</strong>人关注</p></li>
{/dede:loop}
</ul>
</div>
<div>
<h2>患者新的交流</h2>
<ul>{dede:loop table="jtb.pre_forum_thread" sort="tid" row="4"}
<li><a href=http://www.dede58.com/a/dedejq/"/bbs/forum.php?mod=viewthread&tid=[field:tid /]"> [field:subject function="cn_substr('@me',48)" /]</a> <p><b>[field:replies /]</b>个回答 <strong>[field:views /]</strong>人关注</p></li>
{/dede:loop}
</ul>
</div> 本文章网址:http://www.ppssdd.com/code/13391.html。转载请保留出处,谢谢合作!
dedecms5.7织梦系统首页调用问答的代码
鉴于网站修正的需要,现在保存织梦CMS调用问答模块的代码在这里,以方便未来有可能使用到,下面给出调用问答到首页的代码,供大家参考,适用于织梦CMS v5.7版本,我是这个版本的,其他版本可以修改表面来进行修正调用 。织梦CMS 5.7首页调用问答的代码
{dede:sql sql="select hos_ask.id,hos_ask.title,hos_askanswer.content from hos_ask LEFT JOIN hos_askanswer on hos_ask.id=hos_askanswer.askid where hos_askanswer.ifanswer=1 and hos_askanswer.ifcheck=1 and hos_ask.bestanswer=hos_askanswer.id order by hos_ask.id desc LIMIT 0,4"}
<ul>
<li><a href=http://www.dede58.com/a/dedejq/"/ask/?ct=question&askaid=[field:id/]" target="_blank">[field:title function=cn_substr(@me,60)/]</a></li>
<li>[field:content function=cn_substr(html2text(@me),60)/]...<a href=http://www.dede58.com/a/dedejq/"/ask/?ct=question&askaid=[field:id/]">[详细]</a></li>
</ul>
{/dede:sql}
显示四行问答的代码 :
{dede:ask row='4' qtype='new' tid='0' titlelen='60'}<li>·<a href=http://www.dede58.com/a/dedejq/"[field:url/]" target="_blank">[field:title/]</a></li>{/dede:ask} 本文章网址:http://www.ppssdd.com/code/13392.html。转载请保留出处,谢谢合作!
dedecms5.7织梦调用文档评论次数的办法
建站解决办法
只需要复制以上内容到你想调用的地方即可。
今天关于织梦系统dedecms5.7调用文档评论次数的方案和织梦相关文章调用的介绍到此结束,谢谢您的阅读,有关360检测织梦系统dedecms重定向漏洞的解决方案、dedecms5.7织梦系统首页sql调用disucuz2.5内容、dedecms5.7织梦系统首页调用问答的代码、dedecms5.7织梦调用文档评论次数的办法等更多相关知识的信息可以在本站进行查询。
本文标签: