本文整理匯總了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
}
示例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);
}