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


PHP qa_html_theme_base::q_list_item方法代碼示例

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


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

示例1: q_list_item

 function q_list_item($q_item)
 {
     $userid = qa_get_logged_in_userid();
     if (qa_opt('obvious_content_on') && $userid) {
         require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
         $fav_tags = qa_db_single_select(qa_db_user_favorite_tags_selectspec($userid));
         foreach ($fav_tags as $k => $v) {
             $tag[$k] = $v['word'];
         }
         $post_tags = explode(",", $q_item['raw']['tags']);
         $result = array_diff($tag, $post_tags);
         if (sizeof($result) != sizeof($tag) && $tag) {
             @($q_item['classes'] .= " is_favorite");
         }
     }
     if (qa_opt('obvious_content_category_on') && $userid) {
         require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
         $fav_cats = qa_db_single_select(qa_db_user_favorite_categories_selectspec($userid));
         foreach ($fav_cats as $k => $v) {
             $cat[$k] = $v['word'];
         }
         $post_cat = explode(",", $q_item['raw']['category']);
         $result = array_diff($cat, $post_cat);
         if (sizeof($result) != sizeof($cat) && $cat) {
             @($q_item['classes'] .= " is_favorite_cat");
         }
     }
     qa_html_theme_base::q_list_item($q_item);
     // call back through to the default function
 }
開發者ID:roine,項目名稱:roine-q2a-obvious-favorite,代碼行數:30,代碼來源:qa-obvious-layer.php

示例2: q_list_item

 function q_list_item($post)
 {
     if (qa_opt('buddypress_integration_enable') && qa_opt('buddypress_integration_avatars_qi')) {
         $post['avatar'] = $this->get_bp_avatar($post['raw']['userid'], qa_opt('buddypress_integration_avatars_qi_size'));
     }
     qa_html_theme_base::q_list_item($post);
 }
開發者ID:NoahY,項目名稱:q2a-buddypress,代碼行數:7,代碼來源:qa-bp-layer.php


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