-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpage-links.php
executable file
·50 lines (49 loc) · 1.7 KB
/
page-links.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 友链
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main>
<header>
<div class="container">
<h1><?php $this->archiveTitle(array(
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), ''); ?>
</h1>
<p class="subtitle">这是一个<span class="count">友链</span>页面</p>
</div>
</header>
<div class="container">
<div class="article-post">
<?php if ($this->options->fancybox): ?>
<?php
$pattern = '/\<img.*?src\=\"(.*?)\".*?alt\=\"(.*?)\".*?title\=\"(.*?)\"[^>]*>/i';
$replacement = '<a href="$1" data-fancybox="gallery" /><img class="lazy" data-original="$1" alt="$2" title="$3"></a>';
$content = preg_replace($pattern, $replacement, $this->content);
echo getContentTest($this->content);
?>
<?php else: ?>
<?php echo getContentTest($this->content); ?>
<?php endif; ?>
<h4>以下是链接</h4>
</div>
<div class="linkpage">
<ul id="friendsList">
<?php Links(); ?>
</ul>
</div>
</div>
<?php if ($this->options->TheComments): ?>
<div class="container">
<?php $this->need('comments.php'); ?>
</div>
<?php endif; ?>
</main><br><br>
<?php $this->need('footer.php'); ?>