function.mtcommentauthoridentity.php
来自「1. 记录每个帖子的访问人情况」· PHP 代码 · 共 22 行
PHP
22 行
<?phpfunction smarty_function_MTCommentAuthorIdentity($args, &$ctx) { $cmt = $ctx->stash('comment'); if ($cmt['comment_commenter_id']) { # load author related to this commenter. $auth = $ctx->mt->db->fetch_author($cmt['comment_commenter_id']); if (!$auth) return "?"; $link = $ctx->mt->config['IdentityURL']; $link = preg_replace('@/$@', '', $link); $link .= "/" . $auth['author_name']; $blog = $ctx->stash('blog'); $root_url = $ctx->mt->Config['PublishCommenterIcon'] ? $blog['blog_site_url'] : ($ctx->mt->config['StaticWebPath'] ? $ctx->mt->config['StaticWebPath'] : $ctx->mt->config['CGIPath']) . "images"; if (!preg_match('!/$!', $root_url)) $root_url .= '/'; return "<a class=\"commenter-profile\" href=\"$link\"><img alt='[TypeKey Profile Page]' src='$root_url"."nav-commenters.gif' /></a>"; } else { return ""; }}?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?