本文整理汇总了PHP中WoW::GetBlogData方法的典型用法代码示例。如果您正苦于以下问题:PHP WoW::GetBlogData方法的具体用法?PHP WoW::GetBlogData怎么用?PHP WoW::GetBlogData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WoW
的用法示例。
在下文中一共展示了WoW::GetBlogData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
示例2:
<div class="page-sep">
…
</div>
<a href="<?php
echo WoW::GetWoWPath();
?>
/wow/blog/<?php
echo WoW::GetBlogData('id');
?>
?page=14#page-comments">14</a>
<a href="<?php
echo WoW::GetWoWPath();
?>
/wow/blog/<?php
echo WoW::GetBlogData('id');
?>
?page=2#page-comments"><?php
echo WoW_Locale::GetString('template_articles_full_caption');
?>
></a>
</div>-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
示例3: NavigationMenu
//.........这里部分代码省略.........
$data3 = '/character/' . @$url_data[2] . @$url_data[3] . @$url_data[4];
$label[3] = WoW_Locale::GetString('template_profile_achievements');
} elseif ($url_data[4] == '/statistic/') {
$count = 3;
$data3 = '/character/' . @$url_data[2] . @$url_data[3] . @$url_data[4];
$label[3] = WoW_Locale::GetString('template_profile_statistics');
} elseif ($url_data[4] == '/reputation/') {
$count = 3;
$data3 = '/character/' . @$url_data[2] . @$url_data[3] . @$url_data[4];
$label[3] = WoW_Locale::GetString('template_profile_reputation');
} elseif ($url_data[4] == '/pvp/') {
$count = 3;
$data3 = '/character/' . @$url_data[2] . @$url_data[3] . @$url_data[4];
$label[3] = 'PvP';
} elseif ($url_data[4] == '/feed/') {
$count = 3;
$data3 = '/character/' . @$url_data[2] . @$url_data[3] . @$url_data[4];
$label[3] = WoW_Locale::GetString('template_profile_feed');
} elseif ($url_data[4] == '/mount/') {
$count = 3;
$data3 = '/character/' . @$url_data[2] . @$url_data[3] . @$url_data[4];
$label[3] = WoW_Locale::GetString('template_profile_mounts');
} elseif ($url_data[4] == '/companion/') {
$count = 3;
$data3 = '/character/' . @$url_data[2] . @$url_data[3] . @$url_data[4];
$label[3] = WoW_Locale::GetString('template_profile_companions');
}
}
$label[2] = str_replace(array('/', '+'), array('', ' '), @$url_data[3] . ' @ ' . @$url_data[2]);
$_data = array(0 => '/', 1 => '/game/', 2 => '/character/' . @$url_data[2] . @$url_data[3] . $subdata4, 3 => $data3, 4 => NULL, 5 => NULL);
for ($a = 0; $a <= $count; ++$a) {
$path_search_data[$a] = $_data[$a];
}
break;
case '/blog/':
$dynamic_content = true;
$_data = array(0 => '/', 1 => '/blog/' . @$url_data[2]);
$label[1] = WoW::GetBlogData('title');
for ($a = 0; $a < count($_data); ++$a) {
$path_search_data[$a] = $_data[$a];
}
break;
case '/forum/':
$dynamic_content = true;
$_data = array(0 => '/', 1 => '/forum/', 2 => '/forum/#forum' . WoW_Forums::GetGlobalCategoryId(), 3 => '/forum/' . WoW_Forums::GetCategoryId() . '/', 4 => '/forum/topic/' . WoW_Forums::GetThreadId() . '/', 5 => '/forum/topic/post/' . @$url_data[4] . '/edit', 6 => '/forum/topic/post/' . @$url_data[4] . '/delete', 7 => '/forum/blizztracker/');
for ($a = 0; $a < count($url_data); ++$a) {
$path_search_data[$a] = $_data[$a];
}
if (isset($url_data[2]) && $url_data[2] != '/topic/') {
if (isset($url_data[2]) && $url_data[2] == '/blizztracker/') {
$path_search_data[2] = $_data[7];
$label[2] = WoW_Locale::GetString('template_blizztracker_title');
unset($path_search_data[3]);
} else {
$path_search_data[3] = $_data[3];
}
}
if (isset($url_data[2]) && $url_data[2] == '/topic/') {
if ($url_data[3] == '/post/') {
$path_search_data[3] = $_data[3];
$path_search_data[4] = $_data[5];
$label[4] = WoW_Forums::GetThreadTitle();
unset($path_search_data[5]);
unset($path_search_data[6]);
} else {
$path_search_data[3] = $_data[3];
$path_search_data[4] = $_data[4];
$label[4] = WoW_Forums::GetThreadTitle();
}
}
break;
default:
$path_search_data = $url_data;
break;
}
/*
* BUG!!! Need Rewritten and Reworked script...
* Need This <span class="breadcrumb-arrow"></span>
*/
echo '<ol class="ui-breadcrumb">';
$path_data = '';
for ($i = 0; $i < count($path_search_data); ++$i) {
if ($i == count($path_search_data) - 1) {
$last = true;
}
if ($dynamic_content) {
$path_data = $path_search_data[$i];
} else {
$path_data .= $url_data[$i];
}
$path_data = str_replace('//', '/', $path_data);
if (!isset($label[$i])) {
$menu = self::array_searchRecursive($path_data, $navigationMenu);
} else {
$menu['label'] = $label[$i];
}
echo '<li' . ($last == true ? ' class="last"' : null) . '><a href="' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . $path_data . '" rel="np">' . $menu['label'] . '</a></li>';
}
echo '</ol>';
}