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


PHP qa_path_html函數代碼示例

本文整理匯總了PHP中qa_path_html函數的典型用法代碼示例。如果您正苦於以下問題:PHP qa_path_html函數的具體用法?PHP qa_path_html怎麽用?PHP qa_path_html使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了qa_path_html函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: output_widget

 function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
 {
     require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
     global $qa_login_userid, $questionid, $relatedcount, $question, $relatedquestions, $qa_cookieid, $usershtml;
     list($question, $relatedquestions) = qa_db_select_with_pending(qa_db_full_post_selectspec($qa_login_userid, $questionid), qa_db_related_qs_selectspec($qa_login_userid, $questionid));
     if ($relatedcount > 1 && !$question['hidden']) {
         $minscore = qa_match_to_min_score(qa_opt('match_related_qs'));
         foreach ($relatedquestions as $key => $related) {
             if ($related['postid'] == $questionid || $related['score'] < $minscore) {
                 unset($relatedquestions[$key]);
             }
         }
         if (count($relatedquestions)) {
             $themeobject->output('<h2>' . qa_lang('main/related_qs_title') . '</h2>');
         } else {
             $themeobject->output('<h2>' . qa_lang('main/no_related_qs_title') . '</h2>');
         }
         $upper = qa_opt('related_qs_num') < count($relatedquestions) ? qa_opt('related_qs_num') : count($relatedquestions);
         foreach ($relatedquestions as $related) {
             if ($upper <= 0) {
                 break;
             }
             $themeobject->output('<p style="margin:0 0 10px 0; font-weight:bold;"><a href="' . qa_path_html(qa_q_request($related['postid'], $related['title'])) . '">' . $related['title'] . '</a></p>');
             $upper--;
         }
     }
 }
開發者ID:ayagup,項目名稱:qa-related-questions,代碼行數:27,代碼來源:qa-related-questions.php

示例2: output_widget

 function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
 {
     $widget_opt = @$themeobject->current_widget['param']['options'];
     require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
     require_once QA_INCLUDE_DIR . 'qa-app-format.php';
     require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
     $categoryslugs = '';
     $userid = qa_get_logged_in_userid();
     //	Get lists of recent activity in all its forms, plus category information
     list($questions1, $questions2, $questions3, $questions4) = qa_db_select_with_pending(qa_db_qs_selectspec($userid, 'created', 0, $categoryslugs, null, false, false, $qcount), qa_db_recent_a_qs_selectspec($userid, 0, $categoryslugs), qa_db_recent_c_qs_selectspec($userid, 0, $categoryslugs), qa_db_recent_edit_qs_selectspec($userid, 0, $categoryslugs));
     //	Prepare and return content for theme
     $content = qa_q_list_page_content(qa_any_sort_and_dedupe(array_merge($questions1, $questions2, $questions3, $questions4)), $qcount, 0, null, null, null, null, null, true, 'activity/', null, null, null, null);
     $content = $content['q_list']['qs'];
     if (@$themeobject->current_widget['param']['locations']['show_title']) {
         $themeobject->output('<h3 class="widget-title">' . qa_lang('cleanstrap/recent_activities') . ' <a href="' . qa_path_html('activity') . '">' . qa_lang('cleanstrap/view_all') . '</a></h3>');
     }
     $themeobject->output('<div class="ra-question-activity-widget">');
     $q_list = $content;
     $themeobject->output('<ul class="activity-list">');
     foreach ($q_list as $list) {
         $themeobject->output('<li class="clearfix ' . (is_featured($list['raw']['postid']) ? ' featured' : '') . '"><span class="fav-star icon-heart' . (@$list['raw']['userfavoriteq'] ? ' active' : '') . '"></span><span class="post-status-c">' . cs_post_status($list) . '</span><a href="' . $list['url'] . '">' . $list['title'] . '<span class="time">' . implode(' ', $list['when']) . '</span><span class="ans-count total-' . $list['raw']['acount'] . '">' . $list['raw']['acount'] . '</span></a></li>');
     }
     $themeobject->output('</ul>');
     $themeobject->output('</div>');
 }
開發者ID:microbye,項目名稱:CleanStrap,代碼行數:25,代碼來源:widget_question_activity.php

示例3: qa_get_user_avatar_html

function qa_get_user_avatar_html($flags, $email, $handle, $blobid, $width, $height, $size, $padding = false)
{
    if (qa_opt('avatar_allow_gravatar') && $flags & QA_USER_FLAGS_SHOW_GRAVATAR) {
        $html = qa_get_gravatar_html($email, $size);
    } elseif (qa_opt('avatar_allow_upload') && $flags & QA_USER_FLAGS_SHOW_AVATAR) {
        if (isset($blobid)) {
            $html = qa_get_avatar_blob_html($blobid, $width, $height, $size, $padding);
        } elseif (strlen($handle)) {
            $userprofile = qa_db_select_with_pending(qa_db_user_profile_selectspec($handle, false));
            if (!empty($userprofile['social_avatar'])) {
                $html = '<img src="' . $userprofile['social_avatar'] . '" width="' . $size . '" height="' . $size . '" class="qa-avatar-image" />';
            } else {
                $html = null;
            }
        }
    }
    if (!isset($html)) {
        if ((qa_opt('avatar_allow_gravatar') || qa_opt('avatar_allow_upload')) && qa_opt('avatar_default_show') && strlen(qa_opt('avatar_default_blobid'))) {
            $html = qa_get_avatar_blob_html(qa_opt('avatar_default_blobid'), qa_opt('avatar_default_width'), qa_opt('avatar_default_height'), $size, $padding);
        } else {
            $html = null;
        }
    }
    return isset($html) && strlen($handle) ? '<A HREF="' . qa_path_html('user/' . $handle) . '" CLASS="qa-avatar-link">' . $html . '</A>' : $html;
}
開發者ID:swuit,項目名稱:swuit-q2a,代碼行數:25,代碼來源:override-function.php

示例4: qa_priv_notification

function qa_priv_notification($uid, $oid, $badge_slug)
{
    require_once QA_INCLUDE_DIR . 'qa-app-users.php';
    require_once QA_INCLUDE_DIR . 'qa-app-emails.php';
    if (QA_FINAL_EXTERNAL_USERS) {
        $publictohandle = qa_get_public_from_userids(array($uid));
        $handle = @$publictohandle[$uid];
    } else {
        $user = qa_db_single_select(qa_db_user_account_selectspec($uid, true));
        $handle = @$user['handle'];
    }
    $subject = qa_opt('badge_email_subject');
    $body = qa_opt('badge_email_body');
    $body = preg_replace('/\\^if_post_text="([^"]*)"/', $oid ? '$1' : '', $body);
    // if post text
    $site_url = qa_opt('site_url');
    $profile_url = qa_path_html('user/' . $handle, null, $site_url);
    if ($oid) {
        $post = qa_db_read_one_assoc(qa_db_query_sub('SELECT * FROM ^posts WHERE postid=#', $oid), true);
        if ($post['parentid']) {
            $parent = qa_db_read_one_assoc(qa_db_query_sub('SELECT * FROM ^posts WHERE postid=#', $post['parentid']), true);
        }
        if (isset($parent)) {
            $anchor = urlencode(qa_anchor($post['basetype'], $oid));
            $post_title = $parent['title'];
            $post_url = qa_path_html(qa_q_request($parent['postid'], $parent['title']), null, qa_opt('site_url'), null, $anchor);
        } else {
            $post_title = $post['title'];
            $post_url = qa_path_html(qa_q_request($post['postid'], $post['title']), null, qa_opt('site_url'));
        }
    }
    $subs = array('^badge_name' => qa_opt('badge_' . $badge_slug . '_name'), '^post_title' => @$post_title, '^post_url' => @$post_url, '^profile_url' => $profile_url, '^site_url' => $site_url);
    qa_send_notification($uid, '@', $handle, $subject, $body, $subs);
}
開發者ID:NoahY,項目名稱:q2a-privileges,代碼行數:34,代碼來源:qa-plugin.php

示例5: process_request

 function process_request($request)
 {
     require_once QA_INCLUDE_DIR . 'mp-app-posts.php';
     require_once QA_INCLUDE_DIR . 'mp-db-users.php';
     $qa_content = qa_content_prepare();
     // if the user is not logged in, request user to login
     if (!qa_get_logged_in_userid()) {
         $qa_content['error'] = qa_insert_login_links('Please ^1log in^2 or ^3register^4 first.', $request);
         return $qa_content;
     }
     $qa_content['title'] = 'Course Announcements';
     // DISPLAY ANNOUCEMENTS
     $data = '<div class="qa-q-list">';
     // retrieve annoucements
     $announcements = mp_announcements_get_all(mp_get_categoryid());
     if (count($announcements) == 0) {
         $data .= "No announcements";
     } else {
         foreach ($announcements as $announcement) {
             $data .= '<div class="qa-q-list-item">';
             $data .= '<div class="qa-q-item-title">' . $announcement['title'] . '</div>';
             $data .= '<div class="qa-q-view-content">' . $announcement['content'] . '</div>';
             $data .= '<div class="qa-q-item-meta">Posted by <A HREF="' . qa_path_html('user/' . $announcement['handle']) . '">' . $announcement['handle'] . '</A> on ' . $announcement['created'] . '</div>';
             $data .= '</div>';
             $data .= '<div class="qa-q-list-item-clear" ></div>';
         }
     }
     $data .= '</div>';
     $qa_content['custom_2'] = $data;
     // create the sub menu for navigation
     $qa_content['navigation']['sub'] = mp_announcements_sub_navigation();
     $qa_content['navigation']['sub']['default']['selected'] = true;
     return $qa_content;
 }
開發者ID:TheProjecter,項目名稱:microprobe,代碼行數:34,代碼來源:mp-announcements-page.php

示例6: q2apro_save_most_viewed_questions

function q2apro_save_most_viewed_questions()
{
    // save checktime of cache
    qa_opt('q2apro_popularqu_checktime', time());
    $maxquestions = qa_opt('q2apro_popularqu_maxqu');
    $lastdays = qa_opt('q2apro_popularqu_lastdays');
    $ourTopQuestions = qa_db_read_all_assoc(qa_db_query_sub('SELECT postid, title, acount FROM `^posts` 
											WHERE `created` > NOW() - INTERVAL # DAY
											AND `type` = "Q"
											AND `closedbyid` IS NULL
											ORDER BY views DESC
											LIMIT #;', $lastdays, $maxquestions));
    $saveoutput = '';
    foreach ($ourTopQuestions as $qu) {
        $activity_url = qa_path_html(qa_q_request($qu['postid'], $qu['title']), null, qa_opt('site_url'), null, null);
        $questionlink = '<a href="' . $activity_url . '">' . htmlspecialchars($qu['title']) . '</a>';
        $answercnt = '';
        if (qa_opt('q2apro_popularqu_answercount')) {
            $acnttitle = $qu['acount'] == 1 ? qa_lang('q2apro_popularqu_lang/answer_one') : $qu['acount'] . ' ' . qa_lang('q2apro_popularqu_lang/answers');
            $answercnt = ' <span title="' . $acnttitle . '">(' . $qu['acount'] . ')</span>';
        }
        $saveoutput .= '<li>
							' . $questionlink . $answercnt . '
						</li>
						';
    }
    // save into cache
    qa_opt('q2apro_popularqu_cached', $saveoutput);
}
開發者ID:q2apro,項目名稱:q2apro-popular-questions-widget,代碼行數:29,代碼來源:qa-plugin.php

示例7: head_custom

    function head_custom()
    {
        qa_html_theme_base::head_custom();
        if (qa_opt('priv_active') && qa_opt('priv_check') && qa_get_logged_in_handle()) {
            $userid = qa_get_logged_in_userid();
            $notices = qa_db_read_one_value(qa_db_query_sub('SELECT meta_value FROM ^usermeta WHERE user_id=# AND meta_key=$ ', $userid, 'priv_notify'), true);
            if ($notices) {
                $all = explode('^', $notices);
                if (!$all[1]) {
                    // no new
                    return;
                }
                $n = explode(',', $all[1]);
                $this->notify = '<div class="notify-container">';
                $text = count($n) > 1 ? str_replace('#', count($n), qa_opt('priv_notify_text_multi')) : str_replace('^privilege', qa_lang('profile/' . $n[0]), qa_opt('priv_notify_text'));
                $text = str_replace('^profile', qa_path_html('user/' . qa_get_logged_in_handle(), array('tab' => 'privileges'), qa_opt('site_url')), $text);
                $this->notify .= '<div class="priv-notify notify">' . $text . '<div class="notify-close" onclick="jQuery(this).parent().sildeUp(\'fast\')">x</div></div>';
                $this->notify .= '</div>';
                // remove notification flag
                qa_db_query_sub('UPDATE ^usermeta SET meta_value=$ WHERE meta_key=$ AND user_id=#', ($all[0] ? $all[0] . ',' : '') . $all[1] . '^', 'priv_notify', $userid);
                /*					
                					$this->output("
                					<script>
                						jQuery('document').ready(function() { jQuery('.notify-container').delay(10000).fadeOut(); });
                					</script>");
                */
                $this->output('
					<style>', qa_opt('priv_css'), '</style>');
            }
        }
    }
開發者ID:NoahY,項目名稱:q2a-privileges,代碼行數:31,代碼來源:qa-priv-layer.php

示例8: qa_share_buttons

 function qa_share_buttons($q_view)
 {
     if (qa_opt('expert_question_enable')) {
         $qid = $q_view['raw']['postid'];
         $expert = qa_db_read_one_value(qa_db_query_sub("SELECT meta_value FROM ^postmeta WHERE meta_key='is_expert_question' AND post_id=#", $qid), true);
         if ($expert) {
             return;
         }
     }
     $url = qa_path_html(qa_q_request($q_view['raw']['postid'], $q_view['raw']['title']), null, qa_opt('site_url'));
     $code = array('facebook' => '<iframe src="//www.facebook.com/plugins/like.php?href=' . qa_path_html(qa_q_request($this->content['q_view']['raw']['postid'], $this->content['q_view']['raw']['title']), null, qa_opt('site_url')) . '&amp;send=false&amp;layout=standard&amp;width=53&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20&amp;appId=170382616390886" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:53px; height:20px;" allowTransparency="true"></iframe>', 'twitter' => '<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>', 'google' => '<g:plusone size="medium" count="false"></g:plusone>', 'linkedin' => '<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share"></script>', 'email' => '<a title="Share this question via email" id="share-button-email" href="mailto:?subject=' . rawurlencode('[' . qa_opt('site_title') . '] ' . $q_view['raw']['title']) . '&body=' . rawurlencode($url) . '"><img height="24" src="' . QA_HTML_THEME_LAYER_URLTOROOT . 'qa-share-mail.png' . '"/></a>');
     // sort by weight
     $weight = array('facebook' => qa_opt('share_plugin_facebook_weight'), 'twitter' => qa_opt('share_plugin_twitter_weight'), 'google' => qa_opt('share_plugin_google_weight'), 'linkedin' => qa_opt('share_plugin_linkedin_weight'), 'email' => qa_opt('share_plugin_email_weight'));
     asort($weight);
     // output
     foreach ($weight as $key => $val) {
         if (qa_opt('share_plugin_' . $key)) {
             $shares[] = $code[$key];
         }
     }
     if (empty($shares)) {
         return null;
     }
     $output = implode('&nbsp;', $shares);
     return $output;
 }
開發者ID:mostafiz93,項目名稱:PrintfScanf,代碼行數:26,代碼來源:qa-share-layer.php

示例9: output_widget

 public function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
 {
     require_once QA_INCLUDE_DIR . 'db/selects.php';
     $populartags = qa_db_single_select(qa_db_popular_tags_selectspec(0, (int) qa_opt('tag_cloud_count_tags')));
     $maxcount = reset($populartags);
     // $themeobject->output(sprintf('<h2 style="margin-top: 0; padding-top: 0;">%s</h2>', qa_lang_html('main/popular_tags')));
     // $themeobject->output('<div style="font-size: 10px;">');
     $themeobject->output(sprintf('<div class="panel panel-primary" style="padding: 0;"><div class="panel-heading"><h3 class="panel-title">%s</h3></div>', qa_lang_html('main/popular_tags')));
     $themeobject->output('<div class="panel-body">');
     $maxsize = qa_opt('tag_cloud_font_size');
     $minsize = qa_opt('tag_cloud_minimal_font_size');
     $scale = qa_opt('tag_cloud_size_popular');
     $blockwordspreg = qa_get_block_words_preg();
     foreach ($populartags as $tag => $count) {
         $matches = qa_block_words_match_all($tag, $blockwordspreg);
         if (empty($matches)) {
             if ($scale) {
                 $size = number_format($maxsize * $count / $maxcount, 1);
                 if ($size < $minsize) {
                     $size = $minsize;
                 }
             } else {
                 $size = $maxsize;
             }
             $themeobject->output(sprintf('<a href="%s" style="font-size: %dpx; vertical-align: baseline;">%s</a>', qa_path_html('tag/' . $tag), $size, qa_html($tag)));
         }
     }
     // $themeobject->output('</div>');
     $themeobject->output('</div></div>');
 }
開發者ID:architbakliwal,項目名稱:Q2A,代碼行數:30,代碼來源:qa-tag-cloud.php

示例10: qa_category_nav_to_browse

function qa_category_nav_to_browse(&$navigation, $categories, $categoryid, $favoritemap)
{
    foreach ($navigation as $key => $navlink) {
        $category = $categories[$navlink['categoryid']];
        if (!$category['childcount']) {
            unset($navigation[$key]['url']);
        } elseif ($navlink['selected']) {
            $navigation[$key]['state'] = 'open';
            $navigation[$key]['url'] = qa_path_html('categories/' . qa_category_path_request($categories, $category['parentid']));
        } else {
            $navigation[$key]['state'] = 'closed';
        }
        if (@$favoritemap[$navlink['categoryid']]) {
            $navigation[$key]['favorited'] = true;
        }
        $navigation[$key]['note'] = '';
        $navigation[$key]['note'] .= ' - <a href="' . qa_path_html('questions/' . implode('/', array_reverse(explode('/', $category['backpath'])))) . '">' . ($category['qcount'] == 1 ? qa_lang_html_sub('main/1_question', '1', '1') : qa_lang_html_sub('main/x_questions', qa_format_number($category['qcount'], 0, true))) . '</a>';
        if (strlen($category['content'])) {
            $navigation[$key]['note'] .= qa_html(' - ' . $category['content']);
        }
        if (isset($navlink['subnav'])) {
            qa_category_nav_to_browse($navigation[$key]['subnav'], $categories, $categoryid, $favoritemap);
        }
    }
}
開發者ID:nikhilkumar80,項目名稱:question2answer,代碼行數:25,代碼來源:categories.php

示例11: cs_events

 function cs_events($limit = 10, $events_type = false)
 {
     if (!$events_type) {
         $events_type = array('q_post', 'a_post', 'c_post', 'a_select', 'badge_awarded');
     }
     // query last 3 events
     $posts = qa_db_read_all_assoc(qa_db_query_sub('SELECT datetime,ipaddress,handle,event,params FROM ^eventlog WHERE event IN ("q_post", "a_post", "c_post") ORDER BY datetime DESC LIMIT #', $limit));
     if (empty($posts)) {
         return;
     }
     $postids = '';
     $i = 1;
     foreach ($posts as $post) {
         $params = preg_replace('/\\s+/', '&', $post['params']);
         parse_str($params, $data);
         $postids .= ($i != 1 ? ', ' : '') . $data['postid'];
         $i++;
     }
     $posts = qa_db_read_all_assoc(qa_db_query_sub('SELECT ^posts.* , ^users.handle FROM ^posts, ^users WHERE (^posts.userid=^users.userid AND ^posts.postid IN (' . $postids . ')) AND ^posts.type IN ("Q", "A", "C") ORDER BY ^posts.created DESC'));
     $o = '<ul class="ra-activity">';
     foreach ($posts as $p) {
         $event_name = '';
         $event_icon = '';
         if ($p['type'] == 'Q') {
             $event_name = qa_lang('cleanstrap/asked');
             $event_icon = 'icon-question';
         } else {
             if ($p['type'] == 'A') {
                 $event_name = qa_lang('cleanstrap/answered');
                 $event_icon = 'icon-answer';
             } else {
                 $event_name = qa_lang('cleanstrap/commented');
                 $event_icon = 'icon-chat';
             }
         }
         $username = is_null($p['handle']) ? qa_lang('cleanstrap/anonymous') : htmlspecialchars($p['handle']);
         $usernameLink = is_null($p['handle']) ? qa_lang('cleanstrap/anonymous') : '<a href="' . qa_path_html('user/' . $p['handle']) . '">' . $p['handle'] . '</a>';
         $timeCode = qa_when_to_html(strtotime($p['created']), 7);
         $time = @$timeCode['prefix'] . @$timeCode['data'] . @$timeCode['suffix'];
         $o .= '<li class="event-item">';
         $o .= '<div class="event-inner">';
         $o .= '<div class="event-icon pull-left ' . $event_icon . '"></div>';
         $o .= '<div class="event-content">';
         $o .= '<p class="title"><strong class="avatar" data-handle="' . $p['handle'] . '" data-id="' . $p['userid'] . '">' . @$usernameLink . '</strong> <span class="what">' . $event_name . '</span></p>';
         if ($p['type'] == 'Q') {
             $o .= '<a class="event-title" href="' . qa_q_path_html($p['postid'], $p['title']) . '" title="' . $p['title'] . '">' . cs_truncate($p['title'], 100) . '</a>';
         } elseif ($p['type'] == 'A') {
             $o .= '<a class="event-title" href="' . cs_post_link($p['parentid']) . '#a' . $p['postid'] . '">' . cs_truncate(strip_tags($p['content']), 100) . '</a>';
         } else {
             $o .= '<a class="event-title" href="' . cs_post_link($p['parentid']) . '#c' . $p['postid'] . '">' . cs_truncate(strip_tags($p['content']), 100) . '</a>';
         }
         $o .= '<span class="time">' . $time . '</span>';
         $o .= '</div>';
         $o .= '</div>';
         $o .= '</li>';
     }
     $o .= '</ul>';
     return $o;
 }
開發者ID:microbye,項目名稱:CleanStrap,代碼行數:59,代碼來源:widget_activity.php

示例12: faq_notify

 function faq_notify()
 {
     $notice = '<div class="notify-container">';
     $text = str_replace('^faq', '<a href="' . qa_path_html(qa_opt('faq_page_url')) . '">' . qa_opt('faq_page_slug') . '</a>', qa_opt('faq_notify_text'));
     $notice .= '<div class="notify">' . $text . '<div class="notify-close" onclick="jQuery(this).parent().hide(\'slow\')">x</div></div>';
     $notice .= '</div>';
     $this->output($notice);
 }
開發者ID:ruuttt,項目名稱:question2answer_sandbox,代碼行數:8,代碼來源:qa-faq-layer.php

示例13: output_widget

 function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
 {
     /*
     $requestparts=qa_request_parts();
     $requestlower=strtolower(qa_request());
     $firstlower=strtolower($requestparts[0]);
     $routing=qa_page_routing();
     // unanswered & questions pages may contain categories.
     unset($routing['activity/']);
     unset($routing['unanswered/']);
     unset($routing['questions/']);
     if ( (isset($routing[$requestlower])) or (isset($routing[$firstlower.'/'])) or (is_numeric($requestparts[0])) )
     	return;
     	
     $explicitqa=(strtolower($requestparts[0])=='qa' or strtolower($requestparts[0])=='unanswered' or strtolower($requestparts[0])=='questions' or strtolower($requestparts[0])=='activity');
     
     if ($explicitqa)
     	$slugs=array_slice($requestparts, 1);
     elseif (strlen($requestparts[0]))
     	$slugs=$requestparts;
     else
     	$slugs=array();
     */
     $slugs = useo_get_current_category_slug();
     $countslugs = count($slugs);
     list($categories, $categoryid) = qa_db_select_with_pending(qa_db_category_nav_selectspec($slugs, false, false, true), $countslugs ? qa_db_slugs_to_category_id_selectspec($slugs) : null);
     if ($countslugs && isset($categoryid)) {
         /*
         $categoryid is current categories ID
         $backpath = implode('/', array_reverse($slugs));
         echo "countslugs: <pre>"; var_dump($countslugs); echo "</pre>";
         $fullcategory=qa_db_select_with_pending(qa_db_full_category_selectspec($categoryid, true));
         echo "fullcategory: <pre>"; var_dump($fullcategory); echo "</pre>";
         
         echo "categoryid: <pre>"; var_dump($categoryid); echo "</pre>";
         echo "slugs: <pre>"; var_dump($slugs); echo "</pre>";
         echo "template: <pre>"; var_dump($template); echo "</pre>";
         echo "request: <pre>"; var_dump($request); echo "</pre>";
         */
         require_once QA_INCLUDE_DIR . 'qa-db-metas.php';
         $description = qa_db_categorymeta_get($categoryid, 'useo_cat_description');
         if (!qa_opt('useo_cat_desc_format')) {
             $description = qa_html($description);
         }
         $editurlhtml = qa_path_html('category-edit/' . $categoryid);
         $allowediting = !qa_user_permit_error('useo_cat_desc_permit_edit');
         if (strlen($description)) {
             echo '<SPAN CLASS="entry-content qa-category-description">';
             echo $description;
             echo '</SPAN>';
             if ($allowediting) {
                 echo ' - <A HREF="' . $editurlhtml . '">edit</A>';
             }
         } elseif ($allowediting) {
             echo '<A HREF="' . $editurlhtml . '">' . qa_lang_html('useo/create_desc_link') . '</A>';
         }
     }
 }
開發者ID:Kailashaghera,項目名稱:Q2A-Ultimate-SEO,代碼行數:58,代碼來源:category-widget.php

示例14: bs_navbar

 function bs_navbar()
 {
     $nav_html = '<nav class="navbar navbar-default" role="navigation">' . '<div class="container">' . '<div class="navbar-header">' . '<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#q2a-bs-collapse">' . '<span class="sr-only">Toggle</span>' . '<span class="icon-bar"></span>' . '<span class="icon-bar"></span>' . '<span class="icon-bar"></span>' . '</button>' . '<a class="navbar-brand" href="' . qa_path_html() . '">' . qa_opt('site_title') . '</a>' . '</div>' . '<div class="collapse navbar-collapse" id="q2a-bs-collapse">' . '<ul class="nav navbar-nav navbar-right">';
     foreach ($this->content['navigation']['user'] as $unav) {
         $nav_html .= '<li><a href="' . $unav['url'] . '">' . $unav['label'] . '</a></li>';
     }
     $nav_html .= '</ul>' . '</div>' . '</div>' . '</nav>';
     $this->output($nav_html);
 }
開發者ID:swuit,項目名稱:swuit-q2a,代碼行數:9,代碼來源:qa-theme.php

示例15: doctype

    function doctype()
    {
        $this->widgets = get_all_widgets();
        // Setup Navigation
        global $qa_request;
        //var_dump($qa_request);
        $this->content['navigation']['user']['widgets'] = array('label' => 'Theme Widgets', 'url' => qa_path_html('widgets'), 'icon' => 'icon-puzzle');
        if ($qa_request == 'widgets') {
            $this->content['navigation']['user']['widgets']['selected'] = true;
            $this->content['navigation']['user']['selected'] = true;
            $this->template = "widgets";
            $this->content['site_title'] = "Theme Widgets";
            $this->content['error'] = "";
            $this->content['suggest_next'] = "";
            $this->content['title'] = "Theme Widgets";
            //$this->content['custom']='';
            $saved = false;
            if (qa_clicked('cs_remove_all_button')) {
                qa_db_query_sub('TRUNCATE TABLE ^cs_widgets');
                $saved = true;
            }
            if (qa_clicked('cs_reset_widgets_button')) {
                $handle = fopen(Q_THEME_DIR . '/demo_content/widget_builder.sql', 'r');
                $sql = '';
                if ($handle) {
                    while (($line = fgets($handle, 4096)) !== false) {
                        $sql .= trim(' ' . trim($line));
                        if (substr($sql, -strlen(';')) == ';') {
                            qa_db_query_sub($sql);
                            $sql = '';
                        }
                    }
                    fclose($handle);
                }
                $saved = true;
            }
            $cs_page = '
				<div id="ra-widgets">
					<div class="widget-list col-sm-5">
						' . $this->cs_get_widgets() . '
					</div>
					<div class="widget-postions col-sm-7">
						' . $this->cs_get_widgets_positions() . '
					</div>
				</div>
				<div class="form-widget-button-holder">
					<form class="form-horizontal" method="post">
						<input class="qa-form-tall-button btn-primary" type="submit" name="cs_remove_all_button" value="Remove All Widgets" title="">
						<input class="qa-form-tall-button btn-primary" type="submit" name="cs_reset_widgets_button" value="Reset All Widgets To Theme Default" title="">
					</form>
				</div>
			';
            $this->content['custom'] = $cs_page;
        }
        qa_html_theme_base::doctype();
    }
開發者ID:microbye,項目名稱:CleanStrap,代碼行數:56,代碼來源:widgets.php


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