From 0037d093a2039aee95b72559594b99f7393ee395 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?=
<93301500+xushubieli@users.noreply.github.com>
Date: Fri, 26 May 2023 15:41:03 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E5=8F=96=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=E5=A4=9A=E5=9B=BE=E7=89=87=E6=A0=87=E7=AD=BE=EF=BC=8C?=
=?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=A0=87=E7=AD=BE=E5=91=BD=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/system/common.func.php | 37 +++++++++++++++++-------
src/theme/apps/download_links.htm | 4 +--
src/theme/apps/flink_add.htm | 4 +--
src/theme/apps/flink_list.htm | 4 +--
src/theme/apps/heightsearch.htm | 4 +--
src/theme/apps/list_diyform.htm | 4 +--
src/theme/apps/post_diyform.htm | 4 +--
src/theme/apps/recommend.htm | 4 +--
src/theme/apps/showphoto.htm | 4 +--
src/theme/apps/view_diyform.htm | 4 +--
src/theme/apps/view_msg.htm | 4 +--
src/theme/apps/view_msg_catalog.htm | 4 +--
src/theme/apps/vote.htm | 4 +--
src/user/templets/album_add.htm | 4 +--
src/user/templets/album_edit.htm | 4 +--
src/user/templets/archives_add.htm | 4 +--
src/user/templets/archives_edit.htm | 4 +--
src/user/templets/archives_sg_add.htm | 4 +--
src/user/templets/archives_sg_edit.htm | 4 +--
src/user/templets/article_add.htm | 4 +--
src/user/templets/article_edit.htm | 4 +--
src/user/templets/buy.htm | 4 +--
src/user/templets/buy_action_payment.htm | 4 +--
src/user/templets/content_list.htm | 4 +--
src/user/templets/content_sg_list.htm | 4 +--
src/user/templets/edit_baseinfo.htm | 4 +--
src/user/templets/index.htm | 4 +--
src/user/templets/login.htm | 4 +--
src/user/templets/mypay.htm | 4 +--
src/user/templets/mystow.htm | 4 +--
src/user/templets/operation.htm | 4 +--
src/user/templets/pm-main.htm | 4 +--
src/user/templets/reg-new.htm | 4 +--
src/user/templets/resetpassword.htm | 4 +--
src/user/templets/resetpassword2.htm | 4 +--
src/user/templets/resetpassword3.htm | 4 +--
src/user/templets/soft_add.htm | 4 +--
src/user/templets/soft_edit.htm | 4 +--
38 files changed, 101 insertions(+), 84 deletions(-)
diff --git a/src/system/common.func.php b/src/system/common.func.php
index 4e952c71..f637fb32 100755
--- a/src/system/common.func.php
+++ b/src/system/common.func.php
@@ -527,10 +527,10 @@ function GetUpdateSQL()
fclose($fp);
return $result;
}
-/*会员中心调用默认主题模板*/
-if (!function_exists('pasterTempletDiy')) {
+/*会员中心调用默认主题模板*/
+if (!function_exists('obtaintheme')) {
require_once DEDEINC."/archive/partview.class.php";
- function pasterTempletDiy($path)
+ function obtaintheme($path)
{
global $cfg_basedir, $cfg_templets_dir, $cfg_df_style;
$tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style.'/'.$path;
@@ -539,9 +539,9 @@ if (!function_exists('pasterTempletDiy')) {
$dtp->Display();
}
}
-//标签调用标签[field:id function='GetMyTags(@me,2)'/]2表示调用文档2个标签
-if (!function_exists('GetMyTags')) {
- function GetMyTags($aid, $num=3)
+//标签调用[field:id function='obtaintags(@me,3)'/]3表示调用文档3个标签
+if (!function_exists('obtaintags')) {
+ function obtaintags($aid, $num = 3)
{
global $dsql, $cfg_cmspath;
$tags = '';
@@ -549,15 +549,32 @@ if (!function_exists('GetMyTags')) {
$dsql->Execute('tag',$query);
while($row = $dsql->GetArray('tag')) {
$link = $cfg_cmspath."/apps/tags.php?/{$row['tid']}";
- $tags.= ($tags==''?"{$row['tag']}" : "{$row['tag']}");
+ $tags .= ($tags==''?"{$row['tag']}" : "{$row['tag']}");
}
return $tags;
}
}
-//联动单筛选标签{dede:php}AddFilter(模型id,类型,'字段1,字段2');{/dede:php}类型对应以下case数值
+//提取文档多图片[field:body function='obtainimgs(@me,3)'/]3表示调用文档3张图片
+if (!function_exists('obtainimgs')) {
+ function obtainimgs($string, $num)
+ {
+ preg_match_all("/]*)\s*src=('|\")([^'\"]+)('|\")/", $string, $matches);
+ $imgsrc_arr = array_unique($matches[3]);
+ $count = count($imgsrc_arr);
+ $i = 0;
+ foreach($imgsrc_arr as $imgsrc)
+ {
+ if ($i == $num) break;
+ $result .= "
";
+ $i++;
+ }
+ return $result;
+ }
+}
+//联动单筛选{dede:php}AddFilter(模型id,类型,'字段1,字段2');{/dede:php}类型有三种,对应以下case值
function litimgurls($imgid = 0)
{
- global $lit_imglist, $dsql;
+ global $dsql, $lit_imglist;
$row = $dsql->GetOne("SELECT c.addtable FROM `#@__archives` AS a LEFT JOIN `#@__channeltype` AS c ON a.channel=c.id WHERE a.id='$imgid'");
$addtable = trim($row['addtable']);
$row = $dsql->GetOne("SELECT imgurls FROM `$addtable` WHERE aid='$imgid'");
@@ -586,7 +603,7 @@ function string_filter($str, $stype = "inject")
}
return $str;
}
-//联动单筛选发布三种类型
+//联动单筛选三种类型显示
function AddFilter($channelid, $type = 1, $fieldsnamef = '', $defaulttid = 0, $toptid = 0, $loadtype = 'autofield')
{
global $tid, $dsql, $id, $aid;
diff --git a/src/theme/apps/download_links.htm b/src/theme/apps/download_links.htm
index 125ce5ff..23aecb7a 100644
--- a/src/theme/apps/download_links.htm
+++ b/src/theme/apps/download_links.htm
@@ -10,7 +10,7 @@