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'); }
public function action_guild_news() { if (!WoW_Account::IsLoggedIn()) { exit; } $guild_name = WoW_Account::GetActiveCharacterInfo('guildName'); $guild_realm = WoW_Account::GetActiveCharacterInfo('realmId'); if (!$guild_name || !$guild_realm) { exit; } if (!WoW_Guild::LoadGuild($guild_name, $guild_realm)) { exit; } WoW_Template::SetTemplateTheme('wow'); WoW_Template::LoadTemplate('guild_news_page'); }
</tr> </thead> <tbody> </tbody> </table> </div> <script type="text/javascript"> //<![CDATA[ $(function() { Professions.table = new Table('#professions', { column: 0 }); }); //]]> </script> <?php $professions = WoW_Guild::GetGuildProfessions(); $roster = WoW_Guild::GetGuildMembers(); if (is_array($professions)) { foreach ($professions as $prof_id => $prof) { $prof_info = DB::WoW()->selectRow("SELECT `name_%s` AS `name`, `icon` FROM `DBPREFIX_professions` WHERE `id` = %d LIMIT 1", WoW_Locale::GetLocale(), $prof_id); if (!$prof_info) { continue; } echo sprintf('<div id="professions-%d" class="parentTable"> <a href="javascript:;" class="table-bar" onclick="Professions.toggleSection(this);"> <span class="toggler"> <span class="icon-frame frame-18" style=\'background-image: url("http://eu.battle.net/wow-assets/static/images/icons/18/%s.jpg");\'> </span> %s (<span class="total">%d</span>) </span> </a> <div id="professions-table-%d" class="table childTable">
?> "> <a href="<?php echo WoW_Guild::GetGuildUrl(); ?> achievement" class=" has-submenu" rel="np"><span class="arrow"><span class="icon"><?php echo WoW_Locale::GetString('template_guild_menu_achievements'); ?> </span></span></a> </li> <li class="<?php echo WoW_Template::GetPageData('guild-page') == 'perks' ? ' active' : null; ?> "> <a href="<?php echo WoW_Guild::GetGuildUrl(); ?> perk" class="" rel="np"><span class="arrow"><span class="icon"><?php echo WoW_Locale::GetString('template_guild_menu_perks'); ?> </span></span></a> </li> <li class="<?php echo WoW_Template::GetPageData('guild-authorized') == false ? ' disabled' : null; echo WoW_Template::GetPageData('guild-page') == 'rewards' ? ' active' : null; ?> "> <a href="<?php echo WoW_Template::GetPageData('guild-authorized') == true ? '/vault/guild/reward' : 'javascript:;'; ?> " class=" vault" rel="np"><span class="arrow"><span class="icon"><?php
?> /wow/player/rating-pegi.jpg'; //]]> </script> <meta name="title" content="<?php echo WoW_Template::GetPageData('overall_meta_title') != null ? WoW_Template::GetPageData('overall_meta_title') : 'World of Warcraft'; ?> " /> <link rel="image_src" href="<?php echo WoW_Template::GetPageData('overall_meta_img') != null ? WoW_Template::GetPageData('overall_meta_img') : WoW::GetWoWPath() . '/wow/static/images/icons/facebook/game.jpg'; ?> " /> <?php switch (WoW_Template::GetPageData('page')) { case 'character_profile': echo sprintf('<style type="text/css">#content .content-top { background: url("%s/wow/static/images/character/summary/backgrounds/race/%d.jpg") left top no-repeat; }.profile-wrapper { background-image: url("%s/wow/static/images/2d/profilemain/race/%d-%d.jpg"); }</style>', WoW::GetWoWPath(), WoW_Characters::GetRaceID(), WoW::GetWoWPath(), WoW_Characters::GetRaceID(), WoW_Characters::GetGender()); break; case 'character_talents': echo sprintf('<style type="text/css">.talentcalc-cell .icon .texture { background-image: url(%s/wow/wow-assets/static/images/talents/icons/%d-greyscale.jpg); }</style>', WoW::GetWoWPath(), WoW_Characters::GetClassID()); break; case 'guild': echo sprintf('<style type="text/css">#content .content-top { background: url("%s/wow/static/images/guild/summary/bg-%s.jpg") left top no-repeat; }</style>', WoW::GetWoWPath(), WoW_Guild::GetGuildFactionText()); break; case 'zone': echo sprintf('<style type="text/css">#content .content-top { background: url("%s/wow/static/images/wiki/zone/bgs/%s.jpg") 0 0 no-repeat; }</style>', WoW::GetWoWPath(), WoW_Template::GetPageData('zone_key')); break; } ?> </head>
private static function HandleProfessions() { if (!self::IsCorrect()) { WoW_Log::WriteError('%s : guild was not found.', __METHOD__); return false; } if (!is_array(self::$guild_professions)) { if (!self::LoadProfessions()) { return false; } } $professions = self::$guild_professions; self::$guild_professions = array(); foreach ($professions as $prof) { self::AddProfession($prof); // Add profession to professions list self::AddProfessionToGuildMember($prof); // Add professions to guild roster } unset($professions, $prof); return true; }
public static function GetPageTitle() { switch (WoW_Template::GetPageIndex()) { case 'character_profile_simple': case 'character_profile_advanced': return sprintf('%s @ %s - %s - ', WoW_Characters::GetName(), WoW_Characters::GetRealmName(), WoW_Locale::GetString('template_menu_game')); case 'character_talents': return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_talents'), WoW_Locale::GetString('template_menu_game')); case 'character_achievements': return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_achievements'), WoW_Locale::GetString('template_menu_game')); case 'character_reputation': return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_reputation'), WoW_Locale::GetString('template_menu_game')); case 'character_statistics': return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_statistics'), WoW_Locale::GetString('template_menu_game')); case 'character_pvp': return sprintf('PvP - %s - ', WoW_Locale::GetString('template_menu_game')); case 'character_feed': return sprintf('%s - %s - ', WoW_Locale::GetString('template_character_feed'), WoW_Locale::GetString('template_menu_game')); case 'item': return sprintf('%s - ', WoW_Template::GetPageData('itemName')); case 'item_list': return sprintf('%s - ', WoW_Template::GetPageData('last-crumb')); case 'guild_page': return sprintf('%s @ %s - ', WoW_Guild::GetGuildName(), WoW_Guild::GetGuildRealmName()); case 'guild_perks': return sprintf('%s - %s - ', WoW_Locale::GetString('template_guild_menu_perks'), WoW_Locale::GetString('template_menu_game')); case 'guild_roster': case 'guild_professions': return sprintf('%s - %s - ', WoW_Locale::GetString('template_guild_menu_roster'), WoW_Locale::GetString('template_menu_game')); case 'search': return WoW_Search::GetSearchQuery() != null ? sprintf('%s - %s - ', WoW_Search::GetSearchQuery(), WoW_Locale::GetString('template_search')) : sprintf('%s - ', WoW_Locale::GetString('template_search')); case 'realm_status': return sprintf('%s - %s - ', WoW_Locale::GetString('template_realm_status'), WoW_Locale::GetString('template_menu_game')); case 'blog': return sprintf('%s - ', WoW_Template::GetPageData('blog_title')); case 'game': return sprintf('%s - ', WoW_Locale::GetString('template_menu_game')); case 'game_guide_what_is_wow': return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_what_is_wow'), WoW_Locale::GetString('template_menu_game')); case 'game_guide_getting_started': return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_getting_started'), WoW_Locale::GetString('template_menu_game')); case 'game_guide_how_to_play': return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_how_to_play'), WoW_Locale::GetString('template_menu_game')); case 'game_guide_playing_together': return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_playing_together'), WoW_Locale::GetString('template_menu_game')); case 'game_guide_late_game': return sprintf('%s - %s - ', WoW_Locale::GetString('template_menu_game_guide_late_game'), WoW_Locale::GetString('template_menu_game')); case 'game_race_index': return sprintf('%s - %s - ', WoW_Locale::GetString('template_game_race_index'), WoW_Locale::GetString('template_menu_game')); case 'game_race': return sprintf('%s - %s - ', WoW_Locale::GetString('character_race_' . WoW_Template::GetPageData('raceId')), WoW_Locale::GetString('template_menu_game')); case 'game_class_index': return sprintf('%s - %s - ', WoW_Locale::GetString('template_game_class_index'), WoW_Locale::GetString('template_menu_game')); case 'game_class': return sprintf('%s - %s - ', WoW_Locale::GetString('character_class_' . WoW_Template::GetPageData('classId')), WoW_Locale::GetString('template_menu_game')); case 'password_reset': return sprintf('%s - Battle.Net', WoW_Locale::GetString('login_help_title')); case 'password_reset_select': case 'password_reset_secred_answer': case 'password_reset_success': case 'password_reset_confirm': case 'password_reset_changed': return sprintf('%s - Battle.Net', WoW_Locale::GetString('template_account_password_reset_title')); case 'dashboard': return sprintf('%s - Battle.Net', WoW_Locale::GetString('expansion_' . WoW_Account::GetExpansion())); case 'landing': switch (WoW_Template::GetPageData('landing')) { case 'what_is': return sprintf('%s - Battle.Net', WoW_Locale::GetString('template_bn_what_is_it_title')); } break; case 'creation_tos': case 'creation_success': case 'account_conversion': case 'management': return WoW_Locale::GetString('template_management_main_title'); //[PH] //[PH] case 'auction_lots': return sprintf('%s - %s - ', WoW_Locale::GetString('template_auction_menu_lots'), WoW_Locale::GetString('template_menu_game')); case 'forum_index': return sprintf('%s - ', WoW_Locale::GetString('template_menu_forums')); case 'forum_category': return sprintf('%s - %s - ', WoW_Template::GetPageData('forum_category_title'), WoW_Locale::GetString('template_menu_forums')); case 'forum_thread': return sprintf('%s - %s - ', WoW_Template::GetPageData('forum_thread_title'), WoW_Locale::GetString('template_menu_forums')); case 'forum_blizztracker': return sprintf('%s - %s - ', WoW_Locale::GetString('template_blizztracker_title'), WoW_Locale::GetString('template_menu_forums')); case 'zones': return sprintf('%s - %s - ', WoW_Locale::GetString('template_game_dungeons_and_raids'), WoW_Locale::GetString('template_menu_game')); case 'zone': return sprintf('%s - %s - ', WoW_Template::GetPageData('zone_name'), WoW_Locale::GetString('template_menu_game')); case 'pvp_arena': return sprintf('PvP - %s - ', WoW_Locale::GetString('template_menu_game')); case 'character_companions_mounts': return sprintf('%s - %s - ', WoW_Locale::GetString('template_profile_' . WoW_Template::GetPageData('category') . 's'), WoW_Locale::GetString('template_menu_game')); case 'shop': return sprintf('%s - ', WoW_Locale::GetString('template_shop_title')); default: return ''; } }
</div> <div class="list-header"> <strong class="level"><?php echo WoW_Locale::GetString('template_guild_perks_guild_level'); ?> </strong> <strong class="perk"><?php echo WoW_Locale::GetString('template_guild_perks_perk_desc'); ?> </strong> </div> <div id="perks-list" class="perks-list"> <ul> <?php WoW_Guild::InitPerks(); $perks = WoW_Guild::GetGuildPerksData(); if (is_array($perks)) { foreach ($perks as $perk) { echo sprintf('<li class="locked" id="p%d"> <div class="level">%d</div> <div class="icon-wrapper"> <span class="icon-frame frame-50"><img src="http://eu.battle.net/wow-assets/static/images/icons/56/%s.jpg" alt="" width="50" height="50" /></span> <div class="symbol"></div></div> <div><strong>%s</strong><p>%s</p></div> <span class="clear"><!-- --></span></li>', $perk['id'], $perk['level'], $perk['icon'], $perk['name'], $perk['desc']); } } ?> </ul> </div> </div>
echo WoW_Locale::GetString('template_guild_top_contributors'); ?> </h3> <div class="profile-box-simple"> <?php echo WoW_Locale::GetString('template_guild_no_contributors'); ?> </div> </div> </div> <div class="summary-left"> <?php if (WoW_Template::GetPageData('guild-authorized')) { echo sprintf('<div class="summary-motd"> <div class="description"><span class="icon">%s</span></div> </div>', WoW_Guild::GetGuildMOTD()); } ?> <div class="summary-activity"> <h3 class="category "><?php echo WoW_Locale::GetString('template_guild_feed_recent_news'); ?> </h3> <div class="profile-box-simple"> <?php WoW_Template::LoadTemplate('block_guild_news'); ?> </div> </div> </div> <span class="clear"><!-- --></span>
<div> <div class="sidebar-title"> <h3 class="title-friends"> <a href="<?php echo WoW_Guild::GetGuildURL(); ?> "><?php echo sprintf(WoW_Locale::GetString('template_guild_news'), WoW_Guild::GetGuildFeedCount()); ?> </a> </h3> </div> <div class="sidebar-content"> <div id="news-list"> <ul class="activity-feed activity-feed-wide"> <?php WoW_Template::LoadTemplate('block_guild_news'); ?> </ul> </div> </div> </div>
<div class="color-tooltip-yellow">%s</div> </div> </div> </dd> <dt>%s</dt> </dl> </li>', $feed_link, sprintf(WoW_Locale::GetString($locale_string, $feed['gender']), $char_link, $achievement_link, $feed['points']), $i, $feed['icon'], $feed['name'], $feed['desc'], $feed['date']); $i++; break; case TYPE_ITEM_FEED: $feed_link = sprintf('<a href="%s/wow/%s/item/%d" class="color-q%d"> <span class="icon-frame frame-18" style=\'background-image: url("http://eu.battle.net/wow-assets/static/images/icons/18/%s.jpg");\'></span> </a>', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $feed['id'], $feed['quality'], $feed['icon']); $char_link = sprintf('<a href="%s/wow/%s/character/%s/%s/">%s</a>', WoW::GetWoWPath(), WoW_Locale::GetLocale(), WoW_Guild::GetGuildRealmName(), $feed['charName'], $feed['charName']); $item_link = sprintf('<a href="%s/wow/%s/item/%d" class="color-q%d">%s</a>', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $feed['id'], $feed['quality'], $feed['name']); echo sprintf('<li class="item-purchased first"> <dl> <dd> %s %s </dd> <dt>%s</dt> </dl> </li>', $feed_link, sprintf(WoW_Locale::GetString('template_guild_feed_obtained_item', $feed['gender']), $char_link, $item_link), $feed['date']); break; } } echo sprintf('</ul><a class="profile-linktomore" href="%snews" rel="np">%s</a><span class="clear"><!-- --></span>', WoW_Guild::GetGuildUrl(), WoW_Locale::GetString('template_guild_feed_all_feeds')); } else { echo WoW_Locale::GetString('template_guild_feed_no_news'); }
<a href="?page=2">2</a> </li> <li> <a href="?page=3">3</a> </li> <li> <a href="?page=4">4</a> </li> <li class="cap-item"><a href="?page=2"><?php echo WoW_Locale::GetString('template_articles_full_caption'); ?> </a></li> </ul> </div> <?php echo sprintf(WoW_Locale::GetString('template_guild_roster_results_count'), 1, WoW_Guild::GetFilteredGuildMembersCount(), WoW_Guild::GetGuildMembersCount()); ?> <span class="clear"><!-- --></span> </div> </div> </div> <span class="clear"><!-- --></span> </div> <script type="text/javascript"> //<![CDATA[ var MsgProfile = { tooltip: { feature: { notYetAvailable: "<?php echo WoW_Locale::GetString('template_feature_not_available'); ?>