{php} /** * Timeline item for public user pages. * Variables: $post, $siteConfig */ $cid = $post['cid']; $ptptext = renderArticleEmojis(cleanArticleHtml($post['ptptext'] ?? '')); $ptpimag = $post['ptpimag'] ?? ''; $ptpvideo = $post['ptpvideo'] ?? ''; $ptpmusic = $post['ptpmusic'] ?? ''; $ptplx = $post['ptplx'] ?? 'only'; $ptpdw = $post['ptpdw'] ?? ''; $ptptime = $post['ptptime'] ?? ''; $ptpys = isFlag($post['ptpys'] ?? 1, 1); $ptpaud = isFlag($post['ptpaud'] ?? 1, 1); $isLongArticle = $ptplx === 'article'; $articleTitle = trim((string)($post['article_title'] ?? '')); $articleCover = assetUrl($post['article_cover'] ?? '/assets/img/thumbnailbg.svg'); if ($articleTitle === '') { $articleTitle = strCut(strip_tags($post['ptptext'] ?? ''), 30, ''); } $showAuditLock = !empty($showAuditLock); $appendFms = $appendFms ?? true; $time = strtotime($ptptime) ?: time(); $givenDate = date('Y-m-d', $time); if (date('Ymd') === date('Ymd', $time)) { $dayLabel = '今天'; $monthLabel = ''; } elseif (date('Ymd', strtotime('-1 day')) === date('Ymd', $time)) { $dayLabel = '昨天'; $monthLabel = ''; } else { $dayLabel = date('d', $time); $monthLabel = date('m', $time) . '月'; } if ($ptpys === 0) { $lockIcon = ''; } elseif ($showAuditLock && $ptpaud === 0) { $lockIcon = ''; } elseif ($showAuditLock && $ptpaud === -2) { $lockIcon = ''; } elseif ($showAuditLock && strtotime($ptptime) > time()) { $lockIcon = ''; } else { $lockIcon = ''; } $detailUrl = '/view/' . $cid; $dateStyle = $siteConfig['shougbsx'] ?? ''; $videoParts = explode('|', $ptpvideo); $videoUrl = assetUrl($videoParts[0] ?? ''); $videoCover = assetUrl($videoParts[1] ?? ''); $videoAutoplay = isFlag($siteConfig['videoauplay'] ?? 0) === 1 ? 'autoplay' : ''; $videoPlayIcon = isFlag($siteConfig['videoauplay'] ?? 0) === 0 ? '' : ''; $images = []; if ($ptpimag !== '') { $images = array_values(array_filter(explode('(+@+)', $ptpimag), function ($value) { return trim((string)$value) !== ''; })); } $imageCount = count($images); {/php}
{$mus.2|default=''}
共{$imageCount}张