Skip to:
Content
Pages
Categories
Search
Top
Bottom

Editing the look of closed topics…


  • ToxicAirEvent
    Member

    @toxicairevent

    I’m having a hell of a time finding out how to mess with the look of closed topics.

    Right now if a topic gets closed it just gets grayed out which is fine I guess. I have figured out how to modify the look of a grayed out topic in the CSS file.

    What I want to know if how do I check to see if a topic is closed and then echo text like [CLOSED] or [LOCKED] in front of it. I don’t want the topic to be grayed out because users should still be able to read it so I’d like to echo something like [CLOSED] in front of the topic.

    How does one check to see if a topic is closed and then echo text in front to the topic title saying it is closed.

Viewing 6 replies - 1 through 6 (of 6 total)

  • rorymorris
    Member

    @rorymorris

    I just had to work this out for myself too…

    I think you can use this wherever you need to in your topics loop or template / whatever..

    <? $curTopicStatus = bbp_get_topic_status( $topic_id );
    if($curTopicStatus == 'publish'){ ?>

    This topic is still open

    <? } else { ?>

    This topic is now closed

    <? } ?>

    If you learn to copy function names and do a search for them through your whole bbpress plugin folder, you can pretty much find out how anything works, this is how I worked this out. Think I had to go through a trail of 5 or 6 files until I worked it out :)


    Lynq
    Participant

    @lynq

    If you learn to copy function names and do a search for them through your whole bbpress plugin folder, you can pretty much find out how anything works, this is how I worked this out. Think I had to go through a trail of 5 or 6 files until I worked it out :)

    This is great advice for anyone wanting to customize their bbPress. I have found out many different bits and pieces by doing exactly this.

    +1 to this advice.

    Best way to learn is to poke around and dive in.


    leanderbraunschweig
    Participant

    @leanderbraunschweig

    Thanks roymorris,

    that pointed me in the right direction. Btw: The same procedure works for bbp_get_forum_status.
    Regards!


    Tecca
    Participant

    @tecca

    That’s a good way of doing things. I simply did it this way, however:

    #bbpress-forums .status-closed > li.bbp-topic-title > a.bbp-topic-permalink:before {
    	content: "[Locked]";
    	text-shadow: 1px 1px 0 #ffffff;
    	color: #ff0000;
    	margin-right: 5px;
    }

    Adds the [Locked] tag before the topic name, in red.


    colabsadmin
    Participant

    @colabsadmin

    @tecca beautifully simple. thank you!

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.