此网站为郑州seo技术博客网站,欢迎加好友互相探讨!
当前位置:郑州SEO博客 > Cms文章 > 正文

dede织梦:文章内容页调用

06-15 Cms文章

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>{dede:field.title/}-{dede:global.cfg_webname/}</title>
<link href="{dede:global.cfg_templeturl/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css"/>
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script>


踩顶部分

<script language="javascript" type="text/javascript">
<!--
    function CheckLogin(){
      var taget_obj = document.getElementById('_ajax_feedback');
      myajax =new DedeAjax(taget_obj,false,false,'','','');
      myajax.SendGet2("{dede:global.cfg_cmsurl/}/member/ajax_feedback.php");
      DedeXHTTP =null;
    }
    function checkSubmit(){
        if(document.feedback.msg.value!='') document.feedback.submit();
        else alert("评论内容不能为空!");
    }
function postBadGood(ftype,fid)
{
    var taget_obj = document.getElementById(ftype+fid);
    var saveid = GetCookie('badgoodid');
    if(saveid !=null)
    {
        var saveids = saveid.split(',');
        var hasid =false;
        saveid ='';
        j =1;
        for(i=saveids.length-1;i>=0;i--)
        {
            if(saveids[i]==fid && hasid) continue;
            else {
                if(saveids[i]==fid &&!hasid) hasid =true;
                saveid += (saveid==''? saveids[i] : ','+saveids[i]);
                j++;
                if(j==10&& hasid) break;
                if(j==9&&!hasid) break;
            }
        }
        if(hasid) { alert('您刚才已表决过了喔!'); returnfalse;}
        else saveid +=','+fid;
        SetCookie('badgoodid',saveid,1);
    }
    else
    {
        SetCookie('badgoodid',fid,1);
    }
    myajax =new DedeAjax(taget_obj,false,false,'','','');
    myajax.SendGet2("{dede:field name='phpurl'/}/feedback.php?aid="+fid+"&action="+ftype+"&fid="+fid);
    DedeXHTTP =null;
}
function postDigg(ftype,aid)
{
    var taget_obj = document.getElementById('newdigg');
    var saveid = GetCookie('diggid');
    if(saveid !=null)
    {
        var saveids = saveid.split(',');
        var hasid =false;
        saveid ='';
        j =1;
        for(i=saveids.length-1;i>=0;i--)
        {
            if(saveids[i]==aid && hasid) continue;
            else {
                if(saveids[i]==aid &&!hasid) hasid =true;
                saveid += (saveid==''? saveids[i] : ','+saveids[i]);
                j++;
                if(j==20&& hasid) break;
                if(j==19&&!hasid) break;
            }
        }
        if(hasid) { alert("您已经顶过该帖,请不要重复顶帖 !"); return; }
        else saveid +=','+aid;
        SetCookie('diggid',saveid,1);
    }
    else
    {
        SetCookie('diggid',aid,1);
    }
    myajax =new DedeAjax(taget_obj,false,false,'','','');
    var url ="{dede:global.cfg_phpurl/}/digg_ajax.php?action="+ftype+"&id="+aid;
    myajax.SendGet2(url);
    DedeXHTTP =null;
}
function getDigg(aid)
{
    var taget_obj = document.getElementById('newdigg');
    myajax =new DedeAjax(taget_obj,false,false,'','','');
    myajax.SendGet2("{dede:global.cfg_phpurl/}/digg_ajax.php?id="+aid);
    DedeXHTTP =null;
}
 
-->
</script>




</head>
<body>
         正文部分

调用格式:{&nbsp;dede:field.字段名/}<br />
  &nbsp;&nbsp;字段名的取值范围为<font color="#FF0000">主表及附加表</font>的全部字段!<br /><br />
 
文章标题:{dede:field.title/}<br />
文章地址:{dede:global.cfg_basehost/}{dede:field.arcurl/}<br />
缩略图片:<img src="{dede:field.picname/}"/><br />
文档关键词:{dede:field.keywords/}<br />
文章简介:{dede:field.description function='html2text(@me)'/}<br />
点击次数:<script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' language="javascript"></script><br /><br />
联系QQ:{dede:field.qq/}<br />
文章内容:{dede:field.body/}<br />


踩,顶部分
<div class="newdigg" id="newdigg">
                <div class="diggbox digg_good" onmousemove="this.style.backgroundPosition='left bottom';" onmouseout="this.style.backgroundPosition='left top';" onclick="javascript:postDigg('good',{dede:field.id/})">
                    <div class="digg_act">顶一下</div>
                    <div class="digg_num">({dede:field.goodpost/})</div>
                    <div class="digg_percent">
                        <div class="digg_percent_bar"><span style="width:{dede:field.goodper/}%"></span></div>
                        <div class="digg_percent_num">{dede:field.goodper/}%</div>
                    </div>
                </div>
                <div class="diggbox digg_bad" onmousemove="this.style.backgroundPosition='right bottom';" onmouseout="this.style.backgroundPosition='right top';" onclick="javascript:postDigg('bad',{dede:field.id/})">
                    <div class="digg_act">踩一下</div>
                    <div class="digg_num">({dede:field.badpost/})</div>
                    <div class="digg_percent">
                        <div class="digg_percent_bar"><span style="width:{dede:field.badper/}%"></span></div>
                        <div class="digg_percent_num">{dede:field.badper/}%</div>
                    </div>
                </div>
            </div>
             <script language="javascript" type="text/javascript">getDigg({dede:field.id/});</script>
</body>
</html>

 

版权保护: 本文由 郑州SEO博客 原创,转载请保留链接: http://www.zglblog.cn/cms/26.html


博客主人散乱和弦
男,文化程度不高性格有点犯二,已经20来岁,闲着没事喜欢研究各种SEO技术,资深技术宅。

热门文章

标签