本文整理汇总了PHP中WoW_Locale::getString方法的典型用法代码示例。如果您正苦于以下问题:PHP WoW_Locale::getString方法的具体用法?PHP WoW_Locale::getString怎么用?PHP WoW_Locale::getString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WoW_Locale
的用法示例。
在下文中一共展示了WoW_Locale::getString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
<div class="bt-mask">
<div id="bt-holder">
<?php
$blizz_posts = WoW_Forums::GetLoadedBlizzPosts();
$posts_count = count($blizz_posts);
if (is_array($blizz_posts)) {
for ($i = 0; $i < $posts_count; ++$i) {
if ($i % 3 == 0) {
echo '<div class="bt-set">';
}
if ($blizz_posts[$i]['post_days'] > 0) {
$before_text = sprintf(WoW_Locale::getString('template_blizztracker_posted_before_days'), $blizz_posts[$i]['post_days'], $blizz_posts[$i]['post_hours']);
} elseif ($blizz_posts[$i]['post_days'] == 0 && $blizz_posts[$i]['post_hours'] > 0) {
$before_text = sprintf(WoW_Locale::getString('template_blizztracker_posted_before_hours'), $blizz_posts[$i]['post_hours'], $blizz_posts[$i]['post_minutes']);
} elseif ($blizz_posts[$i]['post_hours'] == 0) {
$before_text = sprintf(WoW_Locale::getString('template_blizztracker_posted_before_minutes'), $blizz_posts[$i]['post_minutes']);
}
echo sprintf('<a href="topic/%d%s">
<span class="desc"><span class="int">‘%s’</span></span>
<span class="info"><span class="char">%s</span> %s %s <strong>%s</strong>:"%s"</span>
</a>', $blizz_posts[$i]['thread_id'], $blizz_posts[$i]['link'], $blizz_posts[$i]['message_short'], $blizz_posts[$i]['author'], $before_text, WoW_Locale::GetString('template_forums_in'), $blizz_posts[$i]['categoryTitle'], $blizz_posts[$i]['threadTitle_short']);
if ($i % 3 == 2) {
echo '</div>';
}
}
if ($i % 3 == 0) {
echo '<div class="bt-set">';
}
echo '<a href="blizztracker/">
<span class="desc"><span class="int">' . WoW_Locale::GetString('template_forums_blizztracker_all') . '</span></span>
<span class="info"></span>
示例2: sprintf
echo sprintf('<tr id="postRow%d" class="blizzard">
<td class="post-icon">
<div class="forum-post-icon">
<div class="blizzard_icon"><a href="../topic/%d#%d" data-tooltip="%s"></a></div>
</div>
</td>
<td class="post-title">
<div class="content"><a href="../topic/%d?page=13#%d">‘%s’</a></div>
<div class="desc">[<a href="../%d/" class="forum-source">%s</a>] <a href="../topic/%d?page=13#%d">%s</a> - %s</div>
</td>
<td class="post-pageNav"> </td>
<td class="post-author">
<span class="type-blizzard">%s<img src="/wow/static/images/layout/cms/icon_blizzard.gif" alt="" />
</span>
</td>
</tr>', $post['thread_id'], $post['thread_id'], $post['post_id'], WoW_Locale::getString('template_blizztracker_jump_first'), $post['thread_id'], $post['thread_id'], $post['message_short'], $post['cat_id'], $post['categoryTitle'], $post['thread_id'], $post['post_id'], $post['threadTitle'], $before_text, $post['author']);
}
}
?>
</tbody>
</table>
</div>
<div class="forum-actions topic-bottom">
<div class="actions-panel">
<?php
// paging
echo WoW_Paginator::Initialize(WoW_Template::GetPageData('current_page'), $total_blizz_posts, 15, 'blizztracker');
?>
</div>
</div>
</div>