久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

dedecms首頁digg調(diào)用方法

 autocad學(xué)習(xí) 2012-08-13
首先到plus文件夾下復(fù)制一份digg_ajax.php,,重命名為indexdigg.php, 在indexdigg.php中找到如下代碼
  1. $digg = '<div class="diggbox digg_good" onmousemove="this.style.backgroundPosition=\'left bottom\';" onmouseout="this.style.backgroundPosition=\'left top\';" onclick="postDigg(\'good\','.$id.')">
  2. <div class="digg_act">頂一下</div>
  3. <div class="digg_num">('.$row['goodpost'].')</div>
  4. <div class="digg_percent">
  5. <div class="digg_percent_bar"><span style="width:'.$row['goodper'].'%"></span></div>
  6. <div class="digg_percent_num">'.$row['goodper'].'%</div>
  7. </div>
  8. </div>
  9. <div class="diggbox digg_bad" onmousemove="this.style.backgroundPosition=\'right bottom\';" onmouseout="this.style.backgroundPosition=\'right top\';" onclick="postDigg(\'bad\','.$id.')">
  10. <div class="digg_act">踩一下</div>
  11. <div class="digg_num">('.$row['badpost'].')</div>
  12. <div class="digg_percent">
  13. <div class="digg_percent_bar"><span style="width:'.$row['badper'].'%"></span></div>
  14. <div class="digg_percent_num">'.$row['badper'].'%</div>
  15. </div>
  16. </div>';
替換為:
  1. <script language="javascript" type="text/javascript">
  2. <!--
  3. function postDigg(ftype,aid)
  4. {
  5. var taget_obj = document.getElementById("digg"+aid);
  6. var saveid = GetCookie('diggid');
  7. if(saveid != null)
  8. {
  9. var saveidsaveids = saveid.split(',');
  10. var hasid = false;
  11. saveid = '';
  12. j = 1;
  13. for(i=saveids.length-1;i>=0;i--)
  14. {
  15. if(saveids==aid && hasid) continue;
  16. else {
  17. if(saveids==aid && !hasid) hasid = true;
  18. saveid += (saveid=='' ? saveids : ','+saveids);
  19. j++;
  20. if(j==20 && hasid) break;
  21. if(j==19 && !hasid) break;
  22. }
  23. }
  24. if(hasid) { alert("您已經(jīng)頂過該帖,,請不要重復(fù)頂帖 ,!"); return; }
  25. else saveid += ','+aid;
  26. SetCookie('diggid',saveid,1);
  27. }
  28. else
  29. {
  30. SetCookie('diggid',aid,1);
  31. }
  32. myajax = new DedeAjax(taget_obj,false,false,'','','');
  33. var url = "{dede:global.cfg_phpurl/}/indexdigg.php?action="+ftype+"&id="+aid;
  34. myajax.SendGet2(url);
  35. }
  36. function getDigg(aid)
  37. {
  38. var taget_obj = document.getElementById('newdigg');
  39. myajax = new DedeAjax(taget_obj,false,false,'','','');
  40. myajax.SendGet2("{dede:global.cfg_phpurl/}/indexdigg.php?id="+aid);
  41. DedeXHTTP = null;
  42. }
  43. -->
  44. </script>
頂一下排行榜代碼:
  1. <div id="newdigg"><span class=dinga>
  2. <span class=shuzi id='digg[field:id/]'>[field:goodpost/]</span>人喜歡此文章</span>
  3. <span class=ding><a href="javascript:postDigg('good',[field:id/]);">頂一下!</a></span>
  4. </div>
 
 

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點,。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約