本文整理汇总了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);
}