国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.7KB

  1. <?php if(!defined('DEDEINC')) exit('Request Error!');
  2. /**
  3. * 连载图书最新内容调用
  4. *
  5. * @version $Id: bookcontentlist.lib.php 1 9:29 2010年7月6日Z tianya $
  6. * @package DedeCMS.Taglib
  7. * @copyright Copyright (c) 2007 - 2020, DesDev, Inc.
  8. * @license http://help.dedecms.com/usersguide/license.html
  9. * @link http://www.dedecms.com
  10. */
  11. /*>>dede>>
  12. <name>连载内容</name>
  13. <type>全局标记</type>
  14. <for>V55,V56,V57</for>
  15. <description>连载图书最新内容调用</description>
  16. <demo>
  17. {dede:bookcontentlist row='12' booktype='-1' orderby='lastpost' author='' keyword=''}
  18. <table width="100%" border="0" cellspacing="2" cellpadding="2">
  19. <tr>
  20. <td width='40%'>
  21. [[field:cataloglink/]] [field:booklink/]</td>
  22. <td width='40%'>[field:contentlink/]</td>
  23. <td width='20%'>[field:lastpost function="GetDateMk(@me)"/]</td>
  24. </tr>
  25. </table>
  26. {/dede:bookcontentlist}
  27. </demo>
  28. <attributes>
  29. <iterm>row:调用记录条数</iterm>
  30. <iterm>booktype:图书类型,0 图书、1 漫画,默认全部</iterm>
  31. <iterm>orderby:排序类型,当按排序类型为 commend 表示推荐图书</iterm>
  32. <iterm>author:作者</iterm>
  33. <iterm>keyword:关键字</iterm>
  34. </attributes>
  35. >>dede>>*/
  36. require_once(DEDEINC.'/taglib/booklist.lib.php');
  37. function lib_bookcontentlist(&$ctag, &$refObj)
  38. {
  39. global $dsql, $envs, $cfg_dbprefix, $cfg_cmsurl;
  40. $attlist="row|12,booktype|-1,titlelen|30,orderby|lastpost,author|,keyword|";
  41. FillAttsDefault($ctag->CAttribute->Items,$attlist);
  42. extract($ctag->CAttribute->Items, EXTR_SKIP);
  43. if( !$dsql->IsTable("{$cfg_dbprefix}story_books") ) return '没安装连载模块';
  44. return lib_booklist($ctag, $refObj, 1);
  45. }