国内流行的内容管理系统(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.

69 lines
2.5KB

  1. <?php
  2. if (!defined('DEDEINC')) exit('dedebiz');
  3. /**
  4. * 专题主题调用标签
  5. *
  6. * @version $Id: arclist.lib.php 2 8:29 2010年7月8日Z tianya $
  7. * @package DedeBIZ.Taglib
  8. * @copyright Copyright (c) 2022, DedeBIZ.COM
  9. * @license https://www.dedebiz.com/license
  10. * @link https://www.dedebiz.com
  11. */
  12. function ch_specialtopic($noteinfo, $arcTag, $refObj, $fname = '')
  13. {
  14. require_once(DEDEINC.'/taglib/arclist.lib.php');
  15. if ($noteinfo == '') return '';
  16. $noteid = $arcTag->GetAtt('noteid');
  17. $rvalue = '';
  18. $tempStr = GetSysTemplets('channel_spec_note.htm');
  19. $dtp = new DedeTagParse();
  20. $dtp->LoadSource($noteinfo);
  21. if (is_array($dtp->CTags)) {
  22. foreach ($dtp->CTags as $k => $ctag) {
  23. $notename = $ctag->GetAtt('name');
  24. //指定名称的专题节点
  25. if ($noteid != '' && $ctag->GetAtt('noteid') != $noteid) {
  26. continue;
  27. }
  28. $isauto = $ctag->GetAtt('isauto');
  29. $idlist = trim($ctag->GetAtt('idlist'));
  30. $rownum = trim($ctag->GetAtt('rownum'));
  31. $keywords = '';
  32. $stypeid = 0;
  33. if (empty($rownum)) $rownum = 40;
  34. //通过关键词和栏目id自动获取模式
  35. if ($isauto == 1) {
  36. $idlist = '';
  37. $keywords = trim($ctag->GetAtt('keywords'));
  38. $stypeid = $ctag->GetAtt('typeid');
  39. }
  40. $listTemplet = trim($ctag->GetInnerText()) != '' ? $ctag->GetInnerText() : GetSysTemplets('spec_arclist.htm');
  41. $idvalue = lib_arclistDone(
  42. $refObj,
  43. $ctag,
  44. $stypeid,
  45. $rownum,
  46. $ctag->GetAtt('col'),
  47. $ctag->GetAtt('titlelen'),
  48. $ctag->GetAtt('infolen'),
  49. $ctag->GetAtt('imgwidth'),
  50. $ctag->GetAtt('imgheight'),
  51. 'all',
  52. 'default',
  53. $keywords,
  54. $listTemplet,
  55. 0,
  56. $idlist,
  57. $ctag->GetAtt('channel'),
  58. '',
  59. $ctag->GetAtt('att')
  60. );
  61. $notestr = str_replace('~notename~', $notename, $tempStr);
  62. $notestr = str_replace('~spec_arclist~', $idvalue, $notestr);
  63. $rvalue .= $notestr;
  64. if ($noteid != '' && $ctag->GetAtt('noteid') == $noteid) break;
  65. }
  66. }
  67. $dtp->Clear();
  68. return $rvalue;
  69. }