本文整理汇总了PHP中topic_link函数的典型用法代码示例。如果您正苦于以下问题:PHP topic_link函数的具体用法?PHP topic_link怎么用?PHP topic_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了topic_link函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _e
_e('Topics Started');
?>
</h4>
<?php
if ($topics) {
?>
<ol>
<?php
foreach ($topics as $topic) {
?>
<li<?php
alt_class('topics');
?>
>
<a href="<?php
topic_link();
?>
"><?php
topic_title();
?>
</a> -
<?php
printf(__('Started: %s ago'), get_topic_start_time());
?>
|
<span class="freshness"><?php
if (get_topic_start_time('timestamp') < get_topic_time('timestamp')) {
printf(__('Most recent reply: %s ago'), get_topic_time());
} else {
_e('No replies.');
示例2: bb_admin_list_posts
//.........这里部分代码省略.........
</tr>
</tfoot>
<tbody>
<?php
foreach ($bb_posts as $bb_post) {
?>
<tr id="post-<?php
post_id();
?>
"<?php
alt_class('post', post_del_class());
?>
>
<td class="check-column"><input type="checkbox" name="post[]" value="<?php
post_id();
?>
" /></td>
<td class="post">
<?php
post_text();
?>
<div>
<span class="row-actions">
<a href="<?php
echo esc_url(get_post_link());
?>
"><?php
_e('View');
?>
</a>
<?php
bb_post_admin(array('before_each' => ' | ', 'each' => array('undelete' => array('before' => ' ')), 'last_each' => array('before' => ' | ')));
?>
</span>
</div>
</td>
<td class="author">
<?php
if (get_post_author_id()) {
?>
<a href="<?php
user_profile_link(get_post_author_id());
?>
">
<?php
post_author_avatar('16');
?>
<?php
post_author();
?>
</a>
<?php
} else {
?>
<span>
<?php
post_author_avatar('16');
?>
<?php
post_author();
?>
</span>
<?php
}
?>
</td>
<td class="topic">
<a href="<?php
topic_link($bb_post->topic_id);
?>
"><?php
topic_title($bb_post->topic_id);
?>
</a>
</td>
<td class="date">
<?php
if (bb_get_post_time('U') < time() - 86400) {
bb_post_time('Y/m/d\\<\\b\\r \\/\\>H:i:s');
} else {
printf(__('%s ago'), bb_get_post_time('since'));
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}
}