Browse Source

标签说明简化注释

pull/54/head
叙述、别离 1 month ago
parent
commit
ed94cdec33
24 changed files with 36 additions and 56 deletions
  1. +1
    -1
      src/system/taglib/adminname.lib.php
  2. +5
    -7
      src/system/taglib/arclist.lib.php
  3. +5
    -6
      src/system/taglib/arclistsg.lib.php
  4. +1
    -1
      src/system/taglib/autochannel.lib.php
  5. +2
    -2
      src/system/taglib/channel.lib.php
  6. +1
    -1
      src/system/taglib/channelartlist.lib.php
  7. +2
    -2
      src/system/taglib/flinktype.lib.php
  8. +1
    -1
      src/system/taglib/help/arclistsg.txt
  9. +1
    -1
      src/system/taglib/help/autochannel.txt
  10. +1
    -1
      src/system/taglib/help/channelartlist.txt
  11. +1
    -1
      src/system/taglib/help/hotwords.txt
  12. +1
    -1
      src/system/taglib/help/infoguide.txt
  13. +1
    -1
      src/system/taglib/help/infolink.txt
  14. +1
    -1
      src/system/taglib/help/mytag.txt
  15. +1
    -1
      src/system/taglib/help/type.txt
  16. +1
    -1
      src/system/taglib/hotwords.lib.php
  17. +1
    -4
      src/system/taglib/infoguide.lib.php
  18. +1
    -1
      src/system/taglib/infolink.lib.php
  19. +3
    -9
      src/system/taglib/likearticle.lib.php
  20. +1
    -6
      src/system/taglib/relation.lib.php
  21. +0
    -3
      src/system/taglib/softmsg.lib.php
  22. +2
    -2
      src/system/taglib/sonchannel.lib.php
  23. +1
    -1
      src/system/taglib/type.lib.php
  24. +1
    -1
      src/system/taglib/userinfo.lib.php

+ 1
- 1
src/system/taglib/adminname.lib.php View File

@@ -10,7 +10,7 @@ if (!defined('DEDEINC')) exit ('dedebiz');
* @link https://www.dedebiz.com
*/
/**
* 编辑标签
* adminname解析标签
*
* @access public
* @param object $ctag 解析标签


+ 5
- 7
src/system/taglib/arclist.lib.php View File

@@ -396,12 +396,10 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele
'weight' => $row['weight'],
'arclist' => $liststr
);
}//if hasRow
else {
} else {
$artlist .= '';
}
//进行判断,如果启用排序则文档输出为重新排序后的文档
//var_dump($isweight=='y' && count($orderWeight) == $line);
//进行判断,如果启用排序则文档输出为重新排序后的文档var_dump($isweight=='y' && count($orderWeight) == $line);
$isweight = strtolower($isweight);
if ($isweight == 'y') {
$artlist = '';
@@ -412,14 +410,14 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele
}
}
if ($col > 1) $artlist .= "</td>\r\n";
}//Loop Col
}
if ($col > 1) $i += $col - 1;
if ($col > 1) $artlist .= "</tr>\r\n";
}//loop line
}
if ($col > 1) $artlist .= "</table>\r\n";
$dsql->FreeResult("al");
$idsstr = join(',', $ids);
//保存ID缓存
//保存id缓存
if ($needSaveCache) {
if ($idsstr == '') $idsstr = '0';
if ($cfg_cache_type == 'content' && $idsstr != '0') {


+ 5
- 6
src/system/taglib/arclistsg.lib.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit ('dedebiz');
/**
* 自定义模型列表标签
* 自定义文档列表标签
*
* @version $id:arclistsg.lib.php 9:29 2010年7月6日 tianya $
* @package DedeBIZ.Taglib
@@ -207,16 +207,15 @@ function lib_arclistsg(&$ctag, &$refObj)
$GLOBALS['autoindex']++;
}
$artlist .= $dtp2->GetResult()."\r\n";
} //if hasRow
else {
} else {
$artlist .= '';
}
if ($col > 1) $artlist .= "</div>\r\n";
} //Loop Col
}
if ($col > 1) $i += $col - 1;
} //loop line
}
$dsql->FreeResult("al");
//保存ID缓存
//保存id缓存
$idsstr = join(',', $ids);
if ($idsstr != '' && $needcache && $cfg_index_cache > 0) {
$mintime = time() - ($cfg_index_cache * 3600);


+ 1
- 1
src/system/taglib/autochannel.lib.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit ('dedebiz');
/**
* 按排序位置获取单个栏目链接
* 指定排序栏目信息标签
*
* @version $id:autochannel.lib.php 9:29 2010年7月6日 tianya $
* @package DedeBIZ.Taglib


+ 2
- 2
src/system/taglib/channel.lib.php View File

@@ -106,12 +106,12 @@ function lib_channel(&$ctag, &$refObj)
}
if ($col > 1) $likeType .= "</dd>\r\n";
$GLOBALS['autoindex']++;
}//Loop Col
}
if ($col > 1) {
$i += $col - 1;
$likeType .= "</dl>\r\n";
}
}//Loop for $i
}
$dsql->FreeResult();
if ($cacheid != '') {
WriteCacheBlock($cacheid, $likeType);


+ 1
- 1
src/system/taglib/channelartlist.lib.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit ('dedebiz');
/**
* 当前栏目下级栏目文档列表标签
* 当前栏目列表标签
*
* @version $id:channelartlist.lib.php 9:29 2010年7月6日 tianya $
* @package DedeBIZ.Taglib


+ 2
- 2
src/system/taglib/flinktype.lib.php View File

@@ -19,7 +19,7 @@ function lib_flinktype(&$ctag, &$refObj)
$totalrow = $row;
$revalue = '';
$equery = "SELECT * FROM `#@__flinktype` ORDER BY id ASC LIMIT 0,$totalrow";
if (trim($ctag->GetInnerText()) == '') $innertext = "<li>[field:typename/]</li>";
if (trim($ctag->GetInnerText()) == '') $innertext = "[field:typename/]";
else $innertext = $ctag->GetInnerText();
if (!isset($type)) $type = '';
$dtp = new DedeTagParse();
@@ -34,7 +34,7 @@ function lib_flinktype(&$ctag, &$refObj)
}
$DedeBIZ = new stdClass;
$DedeBIZ->id = 999;
$DedeBIZ->typename = 'Dede';
$DedeBIZ->typename = 'DedeBIZ';
if ($type == 'DedeBIZ') $row[] = $DedeBIZ;
foreach ($row as $key => $value) {
if (is_array($dtp->CTags)) {


+ 1
- 1
src/system/taglib/help/arclistsg.txt View File

@@ -1,4 +1,4 @@
自定义模型列表标签
自定义文档列表标签
>>dede>>
{dede:arclistsg typeid='' row='' col='' titlelen='' flag='h' orderway='' keyword='' limit='0,1'}
<a href='[field:arcurl/]'>[field:title/]</a>


+ 1
- 1
src/system/taglib/help/autochannel.txt View File

@@ -1,4 +1,4 @@
按排序位置获取单个栏目链接信息
指定排序栏目信息标签
>>dede>>
{dede:autochannel partsort='' typeid=''}{/dede:autochannel}
>>dede>>


+ 1
- 1
src/system/taglib/help/channelartlist.txt View File

@@ -1,4 +1,4 @@
当前栏目下级栏目文档列表标签
当前栏目列表标签
>>dede>>
{dede:channelartlist typeid='' notypeid='' row='6'}
<ul>


+ 1
- 1
src/system/taglib/help/hotwords.txt View File

@@ -1,4 +1,4 @@
网站搜索热门关键词标签
热搜标签
>>dede>>
{dede:hotwords/}
>>dede>>


+ 1
- 1
src/system/taglib/help/infoguide.txt View File

@@ -1,4 +1,4 @@
分类信息地区与小分类搜索标签
分类信息地区搜索标签
>>dede>>
{dede:infoguide/}
>>dede>>

+ 1
- 1
src/system/taglib/help/infolink.txt View File

@@ -1,4 +1,4 @@
分类信息地区与类型快捷链接标签
分类信息地区链接标签
>>dede>>
{dede:infolink/}
>>dede>>

+ 1
- 1
src/system/taglib/help/mytag.txt View File

@@ -1,4 +1,4 @@
自定义宏标标签
自定义宏标标签
>>dede>>
{dede:mytag typeid='0' name=''/}
>>dede>>


+ 1
- 1
src/system/taglib/help/type.txt View File

@@ -1,4 +1,4 @@
指定单个栏目数据标签
指定栏目信息标签
>>dede>>
{dede:type typeid=''}
<a href="[field:typelink/]">[field:typename/]</a>


+ 1
- 1
src/system/taglib/hotwords.lib.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit ('dedebiz');
/**
* 网站搜索热门关键词标签
* 热搜标签
*
* @version $id:hotwords.lib.php 9:29 2010年7月6日 tianya $
* @package DedeBIZ.Taglib


+ 1
- 4
src/system/taglib/infoguide.lib.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit ('dedebiz');
/**
* 分类信息地区与小分类搜索标签
* 分类信息地区搜索标签
*
* @version $id:infoguide.lib.php 9:29 2010年7月6日 tianya $
* @package DedeBIZ.Taglib
@@ -12,9 +12,6 @@ if (!defined('DEDEINC')) exit ('dedebiz');
function lib_infoguide(&$ctag, &$refObj)
{
global $dsql, $nativeplace, $infotype, $hasSetEnumJs, $cfg_mainsite;
//$attlist="row|10,titlelen|30";
//FillAttsDefault($ctag->CAttribute->Items,$attlist);
//extract($ctag->CAttribute->Items, EXTR_SKIP);
if (empty($refObj->Fields['typeid'])) {
$row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE channeltype='-8' And reid = '0' ");
$typeid = (is_array($row) ? $row['id'] : 0);


+ 1
- 1
src/system/taglib/infolink.lib.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit ('dedebiz');
/**
* 分类信息地区与类型快捷链接标签
* 分类信息地区链接标签
*
* @version $id:infolink.lib.php 9:29 2010年7月6日 tianya $
* @package DedeBIZ.Taglib


+ 3
- 9
src/system/taglib/likearticle.lib.php View File

@@ -47,10 +47,8 @@ function lib_likearticle(&$ctag, &$refObj)
$n = 1;
foreach ($keywords as $k) {
if ($n > 3) break;
if (trim($k) == '') continue;
else $k = addslashes($k);
$keyword .= ($keyword == '' ? " CONCAT(arc.keywords,' ',arc.title) LIKE '%$k%' " : " OR CONCAT(arc.keywords,' ',arc.title) LIKE '%$k%' ");
$n++;
}
@@ -65,12 +63,12 @@ function lib_likearticle(&$ctag, &$refObj)
if (!empty($typeid)) {
$typeid = " AND arc.typeid IN($typeid) AND arc.id<>$arcid ";
}
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND ($keyword) $typeid $orderquery limit 0, $row";
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND ($keyword) $typeid $orderquery limit 0, $row";
} else {
if (!empty($typeid)) {
$typeid = " arc.typeid IN($typeid) AND arc.id<>$arcid ";
}
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND $typeid $orderquery limit 0, $row";
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND $typeid $orderquery limit 0, $row";
}
$innertext = trim($ctag->GetInnerText());
if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm');
@@ -154,18 +152,14 @@ function lib_likearticle(&$ctag, &$refObj)
$GLOBALS['autoindex']++;
}
$artlist .= $dtp2->GetResult()."\r\n";
}
//if hasRow
else {
} else {
$artlist .= '';
}
if ($col > 1) $artlist .= "</td>\r\n";
}
//Loop Col
if ($col > 1) $i += $col - 1;
if ($col > 1) $artlist .= "</tr>\r\n";
}
//loop line
if ($col > 1) $artlist .= "</table>\r\n";
$dsql->FreeResult("al");
return $artlist;


+ 1
- 6
src/system/taglib/relation.lib.php View File

@@ -138,20 +138,15 @@ function lib_relation(&$ctag, &$refObj)
}
$GLOBALS['autoindex']++;
}

$artlist .= $dtp2->GetResult()."\r\n";
}
//if hasRow
else {
} else {
$artlist .= '';
}
if ($col > 1) $artlist .= "</td>\r\n";
}
//Loop Col
if ($col > 1) $i += $col - 1;
if ($col > 1) $artlist .= "</tr>\r\n";
}
//loop line
if ($col > 1) $artlist .= "</table>\r\n";
$dsql->FreeResult("al");
return $artlist;


+ 0
- 3
src/system/taglib/softmsg.lib.php View File

@@ -12,9 +12,6 @@ if (!defined('DEDEINC')) exit ('dedebiz');
function lib_softmsg(&$ctag, &$refObj)
{
global $dsql;
//$attlist="type|textall,row|30,titlelen|30,linktype|1";
//FillAttsDefault($ctag->CAttribute->Items,$attlist);
//extract($ctag->CAttribute->Items, EXTR_SKIP);
$revalue = '';
$row = $dsql->GetOne(" SELECT * FROM `#@__softconfig`");
if (is_array($row)) $revalue = $row['downmsg'];


+ 2
- 2
src/system/taglib/sonchannel.lib.php View File

@@ -44,12 +44,12 @@ function lib_sonchannel(&$ctag, &$refObj)
}
if ($col > 1) $likeType .= "</dd>\r\n";
$GLOBALS['autoindex']++;
} //Loop Col
}
if ($col > 1) {
$i += $col - 1;
$likeType .= "</dl>\r\n";
}
} //Loop for $i
}
$dsql->FreeResult();
return $likeType;
}

+ 1
- 1
src/system/taglib/type.lib.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit ('dedebiz');
/**
* 指定单个栏目数据标签
* 指定栏目信息标签
*
* @version $id:type.lib.php 9:29 2010年7月6日 tianya $
* @package DedeBIZ.Taglib


+ 1
- 1
src/system/taglib/userinfo.lib.php View File

@@ -33,7 +33,7 @@ function lib_userinfo(&$ctag, &$refObj)
$row['face'] = empty($row['face'])? $GLOBALS['cfg_mainsite'].'/static/web/img/admin.png' : $row['face'];
foreach($ctp->CTags as $tagid=>$ctag)
{
if (isset($row[$ctag->GetName()])){
if (isset($row[$ctag->GetName()])) {
$ctp->Assign($tagid,$row[$ctag->GetName()]);
}
}


Loading…
Cancel
Save