当前位置: 首页>>代码示例>>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;未经允许,请勿转载。