当前位置: 首页>>代码示例>>PHP>>正文


PHP qa_html_theme_base::logged_in方法代码示例

本文整理汇总了PHP中qa_html_theme_base::logged_in方法的典型用法代码示例。如果您正苦于以下问题:PHP qa_html_theme_base::logged_in方法的具体用法?PHP qa_html_theme_base::logged_in怎么用?PHP qa_html_theme_base::logged_in使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qa_html_theme_base的用法示例。


在下文中一共展示了qa_html_theme_base::logged_in方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logged_in

 function logged_in()
 {
     qa_html_theme_base::logged_in();
     if (qa_is_logged_in()) {
         $userpoints = qa_get_logged_in_points();
         $pointshtml = $userpoints == 1 ? qa_lang_html_sub('main/1_point', '1', '1') : qa_lang_html_sub('main/x_points', qa_html(number_format($userpoints)));
         $this->output('<SPAN CLASS="qa-logged-in-points">', '(' . $pointshtml . ')', '</SPAN>');
     }
 }
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:9,代码来源:qa-theme.php

示例2: logged_in

 function logged_in()
 {
     if (isset($this->content['loggedin']['data']) && qa_opt('buddypress_integration_enable') && qa_opt('buddypress_display_names')) {
         $handle = qa_get_logged_in_handle();
         $name = bp_core_get_user_displayname($handle);
         $this->content['loggedin']['data'] = str_replace('>' . $handle . '<', ' title="@' . $handle . '">' . $name . '<', $this->content['loggedin']['data']);
     }
     qa_html_theme_base::logged_in();
 }
开发者ID:NoahY,项目名称:q2a-buddypress,代码行数:9,代码来源:qa-bp-layer.php

示例3: logged_in

 function logged_in()
 {
     qa_html_theme_base::logged_in();
     $qa_login_userid = qa_get_logged_in_userid();
     if (isset($qa_login_userid)) {
         $currentcourse = mp_get_categoryinfo(mp_get_categoryid());
         //$this->output('Course: '.$currentcourse['title'] );
         //$this->output('<A HREF="'.qa_path_html('mp-change-course-page').'" class="qa-user-link">Change Course</a>');
         $this->output('course: <A HREF="' . qa_path_html('mp-change-course-page') . '" class="qa-user-link">' . $currentcourse['title'] . '</a>');
     }
 }
开发者ID:TheProjecter,项目名称:microprobe,代码行数:11,代码来源:qa-theme.php

示例4: logged_in

 function logged_in()
 {
     if (qa_is_logged_in()) {
         // output user avatar to login bar
         $this->output('<div class="qa-logged-in-avatar">', QA_FINAL_EXTERNAL_USERS ? qa_get_external_avatar_html(qa_get_logged_in_userid(), 24, true) : qa_get_user_avatar_html(qa_get_logged_in_flags(), qa_get_logged_in_email(), qa_get_logged_in_handle(), qa_get_logged_in_user_field('avatarblobid'), qa_get_logged_in_user_field('avatarwidth'), qa_get_logged_in_user_field('avatarheight'), 24, true), '</div>');
     }
     qa_html_theme_base::logged_in();
     if (qa_is_logged_in()) {
         // adds points count after logged in username
         $userpoints = qa_get_logged_in_points();
         $pointshtml = $userpoints == 1 ? qa_lang_html_sub('main/1_point', '1', '1') : qa_lang_html_sub('main/x_points', qa_html(number_format($userpoints)));
         $this->output('<span class="qa-logged-in-points">', '(' . $pointshtml . ')', '</span>');
     }
 }
开发者ID:gogupe,项目名称:question2answer-releases,代码行数:14,代码来源:qa-theme.php

示例5: logged_in

    function logged_in()
    {
        if (qa_get_logged_in_userid()) {
            if ($this->template == "question") {
                $qnum = qa_request_part("0");
                qa_db_query_sub("UPDATE ^userevents SET lastview = NOW() WHERE questionid = {$qnum} AND userid = " . qa_get_logged_in_userid());
            }
            $questions = qa_db_read_all_assoc(qa_db_query_sub("SELECT DISTINCT(questionid), lastpostid FROM ^userevents WHERE lastview < updated OR lastview IS NULL"));
            $count = count($questions);
            $notifyclass = "qa-notification-none";
            if ($count > 0) {
                $notifyclass = "qa-notification-new";
            }
            $this->output('
				<span class="qa-notification-counter ' . $notifyclass . '">' . $count . '</span>
				');
            $this->output('<div class="qa-notification-dialog">');
            foreach ($questions as $question) {
                $q = qa_post_get_full($question["questionid"]);
                $post = qa_post_get_full($question["lastpostid"]);
                $type = "";
                if ($post["type"] == "A") {
                    $type = "answer";
                } else {
                    if ($post["type"] == "C") {
                        $type = "comment";
                    }
                }
                if ($post["userid"] == NULL) {
                    $user = "anonymous";
                } else {
                    $user = qa_userids_to_handles(array($post["userid"]));
                    $user = $user[$post["userid"]];
                }
                $this->output('<div class="qa-notification-dialog-entry">', '<a href="' . qa_q_path($question["questionid"], $q["title"]) . '">' . $q["title"] . '</a>', '<div>New ' . $type . ' by ' . $user . ': "' . substr($post["content"], 0, 100) . '"</div>', '</div>');
            }
            $this->output('</div>');
        }
        qa_html_theme_base::logged_in();
    }
开发者ID:ramblinjan,项目名称:Q2A-Notification,代码行数:40,代码来源:notification-layer.php

示例6: logged_in

 function logged_in()
 {
     if (qa_opt('badge_active') && (bool) qa_opt('badge_admin_loggedin_widget') && @$this->content['loggedin']['data'] != null) {
         $handle = preg_replace('|.+qa-user-link" title="@([^"]+)".+|', '$1', $this->content['loggedin']['data']);
         $this->content['loggedin']['data'] = $this->content['loggedin']['data'] . '&nbsp;' . qa_badge_plugin_user_widget($handle);
     }
     qa_html_theme_base::logged_in();
 }
开发者ID:architbakliwal,项目名称:Q2A,代码行数:8,代码来源:qa-badge-layer.php

示例7: logged_in

 /**
  * Adding point count for logged in user
  *
  * @since Snow 1.4
  */
 public function logged_in()
 {
     parent::logged_in();
     if (qa_is_logged_in()) {
         $userpoints = qa_get_logged_in_points();
         $pointshtml = $userpoints == 1 ? qa_lang_html_sub('main/1_point', '1', '1') : qa_html(number_format($userpoints));
         $this->output('<div class="qam-logged-in-points">' . $pointshtml . '</div>');
     }
 }
开发者ID:ronkeizer,项目名称:question2answer,代码行数:14,代码来源:qa-theme.php

示例8: logged_in

 /**
  * Adding point count for logged in user
  *
  * @since Snow 1.4
  * @global array $qam_snow
  */
 public function logged_in()
 {
     global $qam_snow;
     qa_html_theme_base::logged_in();
     $this->output($qam_snow->headers['user_points']);
 }
开发者ID:ateszki,项目名称:mdediago,代码行数:12,代码来源:qa-theme.php

示例9: logged_in

 function logged_in()
 {
     qa_html_theme_base::logged_in();
     if (qa_is_logged_in()) {
         $userpoints = qa_get_logged_in_points();
         $username = qa_html(qa_get_logged_in_handle());
         $userid = qa_get_logged_in_userid();
         $user = qa_db_select_with_pending(qa_db_user_rank_selectspec($userid));
         $userrank = '';
         if (is_array($user)) {
             if (array_key_exists('rank', $user)) {
                 $userrank = '(#' . number_format((int) $user['rank']) . ')';
             }
         }
         $pointshtml = $userpoints == 1 ? qa_lang_html_sub('main/1_point', '1', '1') : qa_lang_html_sub('main/x_points', qa_html(number_format($userpoints)));
         $this->output('<SPAN><a CLASS="qa-logged-in-points" href="index.php?qa=user&qa_1=' . $username . '#activity">' . $pointshtml . $userrank . '</a></SPAN>');
     }
 }
开发者ID:ruuttt,项目名称:question2answer,代码行数:18,代码来源:qa-theme.php


注:本文中的qa_html_theme_base::logged_in方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。