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


PHP qa_html_theme_base::q_view_main方法代碼示例

本文整理匯總了PHP中qa_html_theme_base::q_view_main方法的典型用法代碼示例。如果您正苦於以下問題:PHP qa_html_theme_base::q_view_main方法的具體用法?PHP qa_html_theme_base::q_view_main怎麽用?PHP qa_html_theme_base::q_view_main使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qa_html_theme_base的用法示例。


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

示例1: q_view_main

 function q_view_main($q_view)
 {
     if (qa_opt('ajax_comment_enable') && !$this->qa_state && $this->can_comment) {
         $this->output('<img style="display:none" src="' . QA_HTML_THEME_LAYER_URLTOROOT . 'ajax-loader.gif" />');
         // this preloads the ajax loader gif
         $q_view['c_form'] = $this->qa_ajax_comment_form(null);
         if (isset($q_view['a_form'])) {
             $v = $q_view['a_form'];
             $q_view['a_form'] = $q_view['c_form'];
             $q_view['c_form'] = $v;
         }
     }
     qa_html_theme_base::q_view_main($q_view);
 }
開發者ID:microbye,項目名稱:q2a-comment-ajax,代碼行數:14,代碼來源:qa-comment-layer.php

示例2: q_view_main

 function q_view_main($q_main)
 {
     qa_html_theme_base::q_view_main($q_main);
     if (qa_opt('short_url_content_on')) {
         $login = qa_opt('short_url_bitly_username');
         $api_key = qa_opt('short_url_bitly_api_key');
         $url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
         $api_url = "http://api.bit.ly/v3/shorten?login=" . $login . "&apiKey=" . $api_key . "&uri=" . urlencode($url) . "&format=txt";
         if (qa_opt($url)) {
             $short_url = qa_opt($url);
         } else {
             $short_url = file_get_contents($api_url);
             qa_opt($url, $short_url);
         }
         $this->output('<input value="' . $short_url . '">');
     }
 }
開發者ID:roine,項目名稱:q2a-short-url-with-bitly,代碼行數:17,代碼來源:qa-short-url-layer.php

示例3: q_view_main

 function q_view_main($q_view)
 {
     qa_html_theme_base::q_view_main($q_view);
     // badge check on view update
     if (qa_opt('badge_active') && isset($this->content['inc_views_postid'])) {
         $uid = $q_view['raw']['userid'];
         if (!$uid) {
             return;
         }
         // anonymous
         $oid = $this->content['inc_views_postid'];
         // total views check
         $views = $q_view['raw']['views'];
         $views++;
         // because we haven't incremented the views yet
         $badges = array('notable_question', 'popular_question', 'famous_question');
         qa_badge_award_check($badges, $views, $uid, $oid, 2);
         // personal view count increase and badge check
         $uid = qa_get_logged_in_userid();
         qa_db_query_sub('UPDATE ^achievements SET questions_read=questions_read+1 WHERE user_id=# ', $uid);
         $views = qa_db_read_one_value(qa_db_query_sub('SELECT questions_read FROM ^achievements WHERE user_id=# ', $uid), true);
         $badges = array('reader', 'avid_reader', 'devoted_reader');
         qa_badge_award_check($badges, $views, $uid, null, 2);
     }
 }
開發者ID:architbakliwal,項目名稱:Q2A,代碼行數:25,代碼來源:qa-badge-layer.php

示例4: q_view_main

 function q_view_main($q_view)
 {
     if ($this->is_print_view) {
         $this->output('<DIV CLASS="qa-q-view-main">');
         $this->q_view_content($q_view);
         $this->q_view_follows($q_view);
         $this->post_tags($q_view, 'qa-q-view');
         $this->post_meta($q_view, 'qa-q-view');
         $this->c_list(@$q_view['c_list'], 'qa-q-view');
         $this->form(@$q_view['a_form']);
         $this->c_list(@$q_view['a_form']['c_list'], 'qa-a-item');
         $this->form(@$q_view['c_form']);
         $this->output('</DIV> <!-- END qa-q-view-main -->');
     } else {
         qa_html_theme_base::q_view_main($q_view);
     }
 }
開發者ID:NoahY,項目名稱:q2a-print,代碼行數:17,代碼來源:qa-print-layer.php


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