當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WoW_Locale::getString方法代碼示例

本文整理匯總了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>
開發者ID:GetPlay,項目名稱:WorldOfWarCraft-WebSite,代碼行數:31,代碼來源:wow_content_forum_index.php

示例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">&#160;</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>
開發者ID:JunkyBulgaria,項目名稱:WoWCS,代碼行數:31,代碼來源:wow_content_forum_blizztracker.php


注:本文中的WoW_Locale::getString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。