当前位置: 首页>>代码示例>>PHP>>正文


PHP WoW_Locale类代码示例

本文整理汇总了PHP中WoW_Locale的典型用法代码示例。如果您正苦于以下问题:PHP WoW_Locale类的具体用法?PHP WoW_Locale怎么用?PHP WoW_Locale使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了WoW_Locale类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     // Check query
     $searchQuery = isset($_GET['q']) ? $_GET['q'] : null;
     if ($searchQuery != null && mb_strlen($searchQuery) < 3) {
         $searchQuery = null;
     }
     if (preg_match('/\\@/', $searchQuery)) {
         $fast_access = explode('@', $searchQuery);
         if (isset($fast_access[0], $fast_access[1])) {
             header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/character/' . trim($fast_access[1]) . trim($fast_access[0]) . '/');
             exit;
         }
     }
     WoW_Search::SetSearchQuery($searchQuery);
     // Perform Search
     WoW_Search::PerformSearch();
     // Set active page
     if (isset($_GET['f']) && in_array($_GET['f'], array('search', 'wowarenateam', 'article', 'wowcharacter', 'wowitem', 'post', 'wowguild'))) {
         $page = $_GET['f'];
     } else {
         $page = 'search';
     }
     WoW_Search::SetCurrentPage($page);
     WoW_Template::SetPageIndex('search');
     WoW_Template::SetPageData('page', 'search');
     WoW_Template::SetPageData('searchQuery', $searchQuery);
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:JunkyBulgaria,项目名称:WoWCS,代码行数:31,代码来源:search.php

示例2: main

 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s  game-index', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     $url_data = WoW::GetUrlData('game');
     if (empty($url_data['action1'])) {
         WoW_Template::SetPageIndex('game');
         WoW_Template::SetPageData('page', 'game');
     } elseif ($url_data['action1'] == 'guide') {
         switch ($url_data['action2']) {
             case 'getting-started':
             case 'how-to-play':
             case 'playing-together':
             case 'late-game':
                 WoW_Template::SetPageIndex('game_guide_' . str_replace('-', '_', $url_data['action2']));
                 WoW_Template::SetPageData('body_class', 'game-guide-' . $url_data['action2']);
                 WoW_Template::SetPageData('page', 'game_guide_' . str_replace('-', '_', $url_data['action2']));
                 break;
             default:
                 WoW_Template::SetPageIndex('game_guide_what_is_wow');
                 WoW_Template::SetPageData('body_class', 'game-guide-what-is-wow');
                 WoW_Template::SetPageData('page', 'game_guide_what_is_wow');
                 break;
         }
     } elseif ($url_data['action1'] == 'race') {
         $race_id = WoW_Utils::GetRaceIDByKey($url_data['action2']);
         if ($race_id > 0) {
             WoW_Game::LoadRace($race_id);
             WoW_Template::SetPageIndex('game_race');
             WoW_Template::SetPageData('body_class', 'race-' . $url_data['action2']);
             WoW_Template::SetPageData('race', $url_data['action2']);
             WoW_Template::SetPageData('page', 'game_race');
             WoW_Template::SetPageData('raceId', $race_id);
         } else {
             WoW_Template::SetPageIndex('game_race_index');
             WoW_Template::SetPageData('body_class', 'game-race-index');
             WoW_Template::SetPageData('page', 'game_race_index');
         }
     } elseif ($url_data['action1'] == 'class') {
         $class_id = WoW_Utils::GetClassIDByKey($url_data['action2']);
         if ($class_id > 0) {
             WoW_Game::LoadClass($class_id);
             WoW_Template::SetPageIndex('game_class');
             WoW_Template::SetPageData('body_class', 'class-' . $url_data['action2']);
             WoW_Template::SetPageData('class', $url_data['action2']);
             WoW_Template::SetPageData('classId', $class_id);
             WoW_Template::SetPageData('page', 'game_class');
         } else {
             WoW_Template::SetPageIndex('game_class_index');
             WoW_Template::SetPageData('body_class', 'game-classes-index');
             WoW_Template::SetPageData('page', 'game_class_index');
         }
     } else {
         WoW_Template::ErrorPage(404);
     }
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:58,代码来源:game.php

示例3: main

 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     WoW_Template::SetPageIndex('realm_status');
     WoW_Template::SetPageData('page', 'realm_status');
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:9,代码来源:status.php

示例4: main

 public function main()
 {
     WoW_Template::SetPageData('carousel', WoW::GetCarouselData());
     WoW_Template::SetPageData('wow_news', WoW::GetLastNews(20, isset($_GET['page']) ? (int) ($_GET['page'] - 1) : 0));
     WoW_Template::SetPageData('body_class', sprintf('%s homepage', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('index');
     WoW_Template::SetMenuIndex('menu-home');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:JunkyBulgaria,项目名称:WoWCS,代码行数:10,代码来源:home.php

示例5: main

 public function main()
 {
     if (!WoWConfig::$EnableBNPage && !isset($_GET['skipRedirect'])) {
         WoW::RedirectTo('wow/' . WoW_Locale::GetLocale());
     }
     WoW_Template::SetTemplateTheme('bn');
     WoW_Template::SetMenuIndex('index');
     WoW_Account::UserGames();
     WoW_Template::SetPageIndex('index');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:11,代码来源:home.php

示例6: LoadLocale

 public static function LoadLocale()
 {
     if (self::$locale_name == null || self::$locale_id == -1) {
         return false;
     }
     if (!@(include WOW_DIRECTORY . '/includes/locales/locale_' . self::$locale_name . '.php')) {
         @(include WOW_DIRECTORY . '/includes/locales/locale_' . WoWConfig::$DefaultLocale . '.php');
     }
     self::$locale_holder = $WoW_Locale;
     return true;
 }
开发者ID:Kheros,项目名称:wowhead,代码行数:11,代码来源:class.locale.php

示例7: main

 public function main()
 {
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     WoW_Template::SetTemplateTheme('wow');
     $url_data = WoW::GetUrlData('guild');
     $guild_error = false;
     if (!$url_data) {
         WoW_Template::ErrorPage(404);
     } elseif (!WoW_Guild::LoadGuild($url_data['name'], WoW_Utils::GetRealmIDByName($url_data['realmName']))) {
         WoW_Template::ErrorPage(404);
     } else {
         $primary = WoW_Account::GetActiveCharacter();
         WoW_Template::SetPageData('guild-authorized', false);
         if (is_array($primary) && isset($primary['realmName'])) {
             if ($primary['realmName'] == WoW_Guild::GetGuildRealmName() && $primary['guildId'] == WoW_Guild::GetGuildID()) {
                 WoW_Template::SetPageData('guild-authorized', true);
             }
         }
         switch ($url_data['action0']) {
             default:
                 WoW_Template::SetPageData('guild-page', 'summary');
                 WoW_Template::SetPageIndex('guild_page');
                 WoW_Template::SetPageData('page', 'guild_page');
                 break;
             case 'perk':
                 WoW_Template::SetPageData('guild-page', 'perks');
                 WoW_Template::SetPageIndex('guild_perks');
                 WoW_Template::SetPageData('page', 'guild_perks');
                 break;
             case 'roster':
                 switch ($url_data['action1']) {
                     default:
                         WoW_Template::SetPageIndex('guild_roster');
                         WoW_Template::SetPageData('page', 'guild_roster');
                         break;
                     case 'professions':
                         WoW_Guild::InitProfessions();
                         WoW_Template::SetPageIndex('guild_professions');
                         WoW_Template::SetPageData('page', 'guild_professions');
                         break;
                 }
                 WoW_Template::SetPageData('guild-page', 'roster');
                 break;
         }
         WoW_Template::SetPageData('guildName', $url_data['name']);
         WoW_Template::SetPageData('realmName', $url_data['realmName']);
         WoW_Template::SetMenuIndex('menu-game');
     }
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:50,代码来源:guild.php

示例8: main

 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s  media-content', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     $url_data = WoW::GetUrlData('media');
     if (empty($url_data['action1'])) {
         WoW_Template::SetPageIndex('media');
         WoW_Template::SetPageData('page', 'media');
     } else {
         WoW_Template::ErrorPage(404);
     }
     WoW_Template::SetMenuIndex('menu-media');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:14,代码来源:media.php

示例9: main

 public function main()
 {
     header('Content-type: text/plain');
     WoW_Template::SetTemplateTheme('wow');
     if (isset($_GET['locale']) && WoW_Locale::IsLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']))) {
         WoW_Locale::SetLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']));
     }
     $searchQuery = isset($_GET['term']) ? $_GET['term'] : null;
     if ($searchQuery != null && mb_strlen($searchQuery) < 3 || $searchQuery == null) {
         die('{"reason":"A term parameter is required.","status":"nok"}');
     }
     WoW_Search::SetSearchQuery($searchQuery);
     WoW_Search::PerformItemsSearch(10);
     WoW_Template::LoadTemplate('page_ta_lookup');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:15,代码来源:ta.php

示例10: LoadLocale

 public static function LoadLocale()
 {
     if (self::$locale_name == null || self::$locale_id == -1) {
         return false;
     }
     if (!@(include WOW_DIRECTORY . '/aplicacion/locales/locale_' . self::$locale_name . '.php')) {
         @(include WOW_DIRECTORY . '/aplicacion/locales/locale_' . WoWConfig::$DefaultLocale . '.php');
     }
     if (!@(include WOW_DIRECTORY . '/aplicacion/locales/menu_' . self::$locale_name . '.php')) {
         @(include WOW_DIRECTORY . '/aplicacion/locales/menu_' . WoWConfig::$DefaultLocale . '.php');
     }
     self::$locale_holder = $WoW_Locale;
     self::$menu_holder = self::$navigation = self::prepareBreadCrumb($Menu);
     return true;
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:15,代码来源:class.locale.php

示例11: PerformItemsSearch

 private static function PerformItemsSearch()
 {
     if (!isset(self::$m_results['items'])) {
         self::$m_results['items'] = array();
     }
     // Find item IDs
     $items = DB::World()->select("\n        SELECT\n        `a`.`entry`\n        FROM `%s` AS `a`\n        WHERE %s LIKE '%s' LIMIT 200", WoW_Locale::GetLocaleID() != LOCALE_EN ? 'locales_item' : 'item_template', WoW_Locale::GetLocaleID() != LOCALE_EN ? '`a`.`name_loc' . WoW_Locale::GetLocaleID() . '`' : '`a`.`name`', '%' . self::$m_query . '%');
     if (!$items) {
         return;
     }
     $item_id = array();
     foreach ($items as $item) {
         // Generate IDs array
         $item_id[] = $item['entry'];
     }
     // Request items
     self::$m_results['items'] = WoW_Items::GetExtendedItemInfo($item_id);
 }
开发者ID:Kheros,项目名称:wowhead,代码行数:18,代码来源:class.search.php

示例12: main

 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     $url_data = WoW::GetUrlData('blog');
     $blog_id = $url_data['blog_id'];
     if (!$blog_id || !WoW::LoadBlog($blog_id)) {
         WoW_Template::ErrorPage(404);
     } else {
         WoW_Template::SetPageData('wow_news', WoW::GetLastNews());
         WoW_Template::SetPageData('blog_title', WoW::GetBlogData('title'));
         WoW_Template::SetPageData('overall_meta_title', WoW::GetBlogData('title'));
         WoW_Template::SetPageData('overall_meta_img', '/cms/blog_thumbnail/' . WoW::GetBlogData('image'));
         WoW_Template::SetPageIndex('blog');
         WoW_Template::SetPageData('page', 'blog');
     }
     WoW_Template::SetMenuIndex('menu-home');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:19,代码来源:blog.php

示例13: main

 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s zone-index expansion-3', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('zones');
     WoW_Template::SetPageData('page', 'zones');
     $url_data = WoW::GetUrlData('zone');
     if (isset($url_data['action3'])) {
         exit;
     }
     if (isset($url_data['action1']) && $url_data['action1'] != null) {
         // Try to find zone
         if (WoW_Game::IsZone($url_data['action1'])) {
             WoW_Template::SetPageData('zoneKey', $url_data['action1']);
             if (isset($url_data['action2']) && $url_data['action2'] != null) {
                 if (in_array($url_data['action2'], array('loot', 'quests', 'quest-rewards', 'achievements', 'comments'))) {
                     die('NYI');
                 }
                 if (WoW_Game::IsBoss($url_data['action2'])) {
                     WoW_Template::SetPageIndex('boss');
                     WoW_Template::SetPageData('page', 'boss');
                     WoW_Template::SetPageData('bossKey', $url_data['action2']);
                     WoW_Game::LoadBoss($url_data['action2']);
                     // save in memory
                     WoW_Template::SetPageData('body_class', sprintf('%s zone-%s boss-%s', WoW_Locale::GetLocale(LOCALE_DOUBLE), $url_data['action1'], $url_data['action2']));
                 }
             } else {
                 WoW_Template::SetPageIndex('zone');
                 WoW_Template::SetPageData('page', 'zone');
                 WoW_Game::LoadZone($url_data['action1']);
                 // save in memory
                 WoW_Template::SetPageData('body_class', sprintf('%s zone-%s', WoW_Locale::GetLocale(LOCALE_DOUBLE), $url_data['action1']));
             }
         }
     }
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:JunkyBulgaria,项目名称:WoWCS,代码行数:38,代码来源:zone.php

示例14: main

 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s  faction-index expansion-3', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('faction');
     WoW_Template::SetPageData('page', 'faction');
     $url_data = WoW::GetUrlData('faction');
     if (isset($url_data['action2']) && $url_data['action2'] != null) {
         exit;
         // [PH]
     }
     if (isset($url_data['action1']) && $url_data['action1'] != null) {
         // Try to find zone
         if (WoW_Game::IsZone($url_data['action1'])) {
             WoW_Template::SetPageIndex('zone');
             WoW_Template::SetPageData('page', 'zone');
             WoW_Game::LoadZone($url_data['action1']);
             // save in memory
         }
     }
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:JunkyBulgaria,项目名称:WoWCS,代码行数:23,代码来源:faction.php

示例15: sprintf

<div>
    <div class="sidebar-title">
        <h3 class="title-friends">
            <a href="<?php 
echo WoW::GetWoWPath();
?>
/wow/vault/character/friend"><?php 
echo sprintf(WoW_Locale::GetString('template_character_friends_caption'), WoW_Account::GetFriendsListCount());
?>
</a>
        </h3>
    </div>
    <div class="sidebar-content">
    <?php 
$friends = WoW_Account::GetFriendsListForPrimaryCharacter();
if (is_array($friends)) {
    foreach ($friends as $friend) {
        echo sprintf('<a href="%s" class="sidebar-tile">
            <span class="icon-frame frame-27"><img src="%s/wow/static/images/2d/avatar/%d-%d.jpg" width="27" height="27" /></span>
            <strong>%s</strong>
            <span class="color-c%d">%s</span>
            <span class="clear"><!-- --></span>
        </a>', $friend['url'], WoW::GetWoWPath(), $friend['race_id'], $friend['gender'], $friend['name'], $friend['class_id'], sprintf(WoW_Locale::GetString('template_character_friends_character'), $friend['level'], $friend['race_string'], $friend['class_string']));
    }
}
?>
    </div>
</div>
开发者ID:JunkyBulgaria,项目名称:WoWCS,代码行数:28,代码来源:wow_character_friends_page.php


注:本文中的WoW_Locale类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。