Skip to:
Content
Pages
Categories
Search
Top
Bottom

Admin posts with unique css in forums

Viewing 4 replies - 1 through 4 (of 4 total)
  • @nuprn1

    Participant

    for group admin and group mod?

    built into bp-core:
    function groups_is_user_admin( $user_id, $group_id )
    function groups_is_user_mod( $user_id, $group_id )

    BUT
    those statements will ping the database each time and is not wp_cached

    @lph2005

    Participant

    Oh – well – I don’t want to slow down the site. Hmm.. Is there a way to grab the userid from WP or BP?

    I was thinking of something like this in the functions.php – is that cached?

    function my_admin_post() {
    global $bp;

    if ( $bp->displayed_user->id == 1 )
    return true;

    return false;

    Update
    — Alas that didn’t work

    @nuprn1

    Participant

    just like before – if you are within the topic loop the template will have the scope

    $topic_template->post->poster_id

    @lph2005

    Participant

    Beautiful !!

    http://www.thechembook.com/groups/first-year-chemistry-learners/forum/topic/mr-heinys-chemistry-class-2009-2010/

    Now – that works when == 1 … is there an or statement possible?

    $topic_template->post->poster_id == 1 || 53

    Something like that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Admin posts with unique css in forums’ is closed to new replies.
Skip to toolbar