本文整理汇总了PHP中qa_admin_sub_navigation函数的典型用法代码示例。如果您正苦于以下问题:PHP qa_admin_sub_navigation函数的具体用法?PHP qa_admin_sub_navigation怎么用?PHP qa_admin_sub_navigation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qa_admin_sub_navigation函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: donut_get_sub_navigation
function donut_get_sub_navigation($page_type, $template = '')
{
require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
require_once QA_INCLUDE_DIR . 'qa-app-format.php';
require_once QA_INCLUDE_DIR . 'qa-app-admin.php';
$sub_nav = array();
switch ($page_type) {
case 'questions':
$sort = qa_get('sort');
$sub_nav = donut_qs_sub_navigation($sort, array());
break;
case 'unanswered':
$categoryslugs = qa_request_parts(1);
$by = qa_get('by');
$sub_nav = donut_unanswered_sub_navigation($by, $categoryslugs);
break;
case 'users':
$sub_nav = donut_users_sub_navigation();
break;
case 'admin':
$sub_nav = qa_admin_sub_navigation();
break;
default:
break;
}
return $sub_nav;
}
示例2: qa_array_insert
case 'points_per_q_voted_up':
case 'points_per_a_voted_up':
case 'points_q_voted_max_gain':
case 'points_a_voted_max_gain':
$prefix = '+';
break;
case 'points_per_q_voted_down':
case 'points_per_a_voted_down':
case 'points_q_voted_max_loss':
case 'points_a_voted_max_loss':
$prefix = '–';
break;
case 'points_base':
$prefix = '+';
break;
default:
$prefix = '<span style="visibility:hidden;">+</span>';
// for even alignment
break;
}
$optionfield['prefix'] = '<span style="width:1em; display:inline-block; display:-moz-inline-stack;">' . $prefix . '</span>';
$qa_content['form']['fields'][$optionname] = $optionfield;
}
qa_array_insert($qa_content['form']['fields'], 'points_post_a', array('blank0' => array('type' => 'blank')));
qa_array_insert($qa_content['form']['fields'], 'points_vote_up_q', array('blank1' => array('type' => 'blank')));
qa_array_insert($qa_content['form']['fields'], 'points_multiple', array('blank2' => array('type' => 'blank')));
$qa_content['navigation']['sub'] = qa_admin_sub_navigation();
return $qa_content;
/*
Omit PHP closing tag to help avoid accidental output
*/
示例3: doctype
//.........这里部分代码省略.........
$useo_social_tc_desc_length = 120;
}
$this->metas['tc-description']['content'] = useo_get_excerpt($description, 0, $useo_social_tc_desc_length);
$this->metas['tc-description']['type'] = 'property="twitter:description"';
// image
$tc_image = qa_opt('useo_social_tc_image');
if (!empty($tc_image)) {
$this->metas['tc-image']['content'] = $tc_image;
$this->metas['tc-image']['type'] = 'property="twitter:image"';
}
// handler
// twitter handler goes into "site" field of meta tag
$tc_handler = qa_opt('useo_social_tc_handler');
if (!empty($tc_handler)) {
$this->metas['tc-handler']['content'] = $tc_handler;
$this->metas['tc-handler']['type'] = 'property="twitter:site"';
}
}
if (qa_opt('useo_social_schema_enable')) {
// Twitter Cards
// title
$this->metas['gp-title']['content'] = $title;
$this->metas['gp-title']['type'] = 'itemprop="name"';
// description
$this->metas['gp-title']['content'] = $description;
$this->metas['gp-title']['type'] = 'itemprop="description"';
// type
$gp_type = qa_opt('useo_social_schema_page_type');
if ($gp_type == 2) {
$gp_page_type = 'Question';
} elseif ($gp_type == 3) {
$gp_page_type = 'Article';
}
if (isset($gp_page_type)) {
$this->metas['gp-title']['content'] = '';
$this->metas['gp-title']['type'] = 'itemscope itemtype="http://schema.org/' . $gp_page_type . '"';
}
// description
$gp_image = qa_opt('useo_social_gp_thumbnail');
if (!empty($gp_image)) {
$this->metas['gp-image']['content'] = $gp_image;
$this->metas['gp-image']['type'] = 'itemprop="image"';
}
}
}
// category link titles
$useo_cat_desc_map = array();
$categoryid_list = array();
//prepare category navigation ids
if (isset($this->content['navigation']['cat']) && qa_opt('useo_cat_title_nav_enable')) {
$category_nav = $this->content['navigation']['cat'];
unset($category_nav['all']);
foreach ($category_nav as $index => $item) {
$categoryid_list[$item['categoryid']] = $item['categoryid'];
}
}
// prepare question list ids
if (isset($this->content["q_list"]["qs"]) && qa_opt('useo_cat_title_qlist_enable')) {
foreach ($this->content["q_list"]["qs"] as $index => $item) {
if ($item['raw']['categoryid']) {
$categoryid_list[$item['raw']['categoryid']] = $item['raw']['categoryid'];
}
}
}
// get all category titles
if (count($categoryid_list)) {
$result = qa_db_query_sub('SELECT categoryid, content FROM ^categorymetas WHERE categoryid IN ($) AND title=$', $categoryid_list, 'useo_cat_title');
$useo_cat_desc_map = qa_db_read_all_assoc($result, 'categoryid');
if (isset($this->content["q_list"]["qs"])) {
foreach ($this->content["q_list"]["qs"] as $index => $item) {
if (isset($item['raw']['categoryid']) && isset($useo_cat_desc_map[$item['raw']['categoryid']])) {
$this->content["q_list"]["qs"][$index]['where']['title'] = $useo_cat_desc_map[$item['raw']['categoryid']]['content'];
}
}
}
}
// set category title for navigation
if (count(@$this->content['navigation']['cat']) && qa_opt('useo_cat_title_nav_enable')) {
foreach ($this->content['navigation']['cat'] as $index => $item) {
if (isset($item['categoryid']) && isset($useo_cat_desc_map[$item['categoryid']])) {
$this->content['navigation']['cat'][$index]["popup"] = $useo_cat_desc_map[$item['categoryid']]['content'];
}
}
}
// Administrator panel navigation item
if ($this->request == 'admin/ulitmate_seo') {
if (empty($this->content['navigation']['sub'])) {
$this->content['navigation']['sub'] = array();
}
require_once QA_INCLUDE_DIR . 'qa-app-admin.php';
$admin_nav = qa_admin_sub_navigation();
$this->content['navigation']['sub'] = array_merge($admin_nav, $this->content['navigation']['sub']);
}
if ($this->template == 'admin' or $this->request == 'ulitmate_seo') {
$this->content['navigation']['sub']['ulitmate_seo'] = array('label' => 'Ultimate SEO', 'url' => qa_path_html('admin/ulitmate_seo'));
if ($this->request == 'admin/ulitmate_seo') {
$this->content['navigation']['sub']['ulitmate_seo']['selected'] = true;
}
}
}
示例4: nav_item
function nav_item($key, $navlink, $class, $level = null)
{
if (qa_opt('admin_plus_dropdown')) {
if ($class == 'nav-sub-dropdown') {
$class = 'nav-sub';
}
if ($key == 'admin' && $class == 'nav-main') {
$this->output('<LI CLASS="qa-' . $class . '-item' . (@$navlink['opposite'] ? '-opp' : '') . (@$navlink['state'] ? ' qa-' . $class . '-' . $navlink['state'] : '') . ' qa-' . $class . '-' . $key . '">');
$this->nav_link($navlink, $class);
require_once QA_INCLUDE_DIR . 'qa-app-admin.php';
$this->nav_list(qa_admin_sub_navigation(), 'nav-sub-dropdown', 1 + $level);
$this->output('</LI>');
} else {
qa_html_theme_base::nav_item($key, $navlink, $class, $level);
}
} else {
qa_html_theme_base::nav_item($key, $navlink, $class, $level);
}
}
示例5: ra_sub_nav
function ra_sub_nav()
{
//require_once QA_INCLUDE_DIR.'qa-app-q-list.php';
require_once QA_INCLUDE_DIR . 'qa-app-admin.php';
$m = array();
$handle = qa_get_logged_in_handle();
$categoryslugs = qa_request_parts(1);
$countslugs = count($categoryslugs);
$sort = $countslugs && !QA_ALLOW_UNINDEXED_QUERIES ? null : qa_get('sort');
$by = qa_get('by');
$forfavorites = qa_get('show') != 'content';
$forcontent = qa_get('show') != 'favorites';
//$m['account']=qa_account_sub_navigation();
$m['admin'] = qa_admin_sub_navigation();
$m['questions'] = ra_answered_nav($sort, $categoryslugs);
$m['unanswered'] = ra_unanswered_nav($by, $categoryslugs);
$m['updates'] = array('all' => array('label' => qa_lang_html('misc/nav_all_my_updates'), 'url' => qa_path_html('updates'), 'selected' => $forfavorites && $forcontent), 'favorites' => array('label' => qa_lang_html('misc/nav_my_favorites'), 'url' => qa_path_html('updates', array('show' => 'favorites')), 'selected' => $forfavorites && !$forcontent), 'myposts' => array('label' => qa_lang_html('misc/nav_my_content'), 'url' => qa_path_html('updates', array('show' => 'content')), 'selected' => $forcontent && !$forfavorites));
//$m['activity']=qa_user_sub_navigation($handle, 'activity');
//$m['answers']=qa_user_sub_navigation($handle, 'answers');
//$m['profile']=qa_user_sub_navigation($handle, 'profile');
//$m['users']['questions']=qa_user_sub_navigation($handle, 'questions');
//$m['users']['wall']=qa_user_sub_navigation($handle, 'wall');
if (!QA_FINAL_EXTERNAL_USERS && qa_get_logged_in_level() >= QA_USER_LEVEL_MODERATOR) {
$m['user'] = array('users$' => array('url' => qa_path_html('users'), 'label' => qa_lang_html('main/highest_users')), 'users/special' => array('label' => qa_lang('users/special_users'), 'url' => qa_path_html('users/special')), 'users/blocked' => array('label' => qa_lang('users/blocked_users'), 'url' => qa_path_html('users/blocked')));
}
return $m;
}