Skip to:
Content
Pages
Categories
Search
Top
Bottom

Editing the look of closed topics…

  • @toxicairevent

    Member

    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 7 replies - 1 through 7 (of 7 total)
  • @rorymorris

    Member

    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

    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.

    @jaredatch

    Member

    +1 to this advice.

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

    @leanderbraunschweig

    Participant

    Thanks roymorris,

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

    @tecca

    Participant

    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

    @tecca beautifully simple. thank you!

    @uksentinel

    Participant

    Is there any update on this thread, looking to achieve exactly the same by adding a Locked / Closed tag (icon) when a topic is closed ?

    I have already used the code to ensure text does not turn Grey, so just looking to add some form of symbol so forum users can see topic thread has been closed

    Thanks

    BTW – for reference for others, code to stop Closed Topics text changing to Grey is …

    #bbpress-forums .status-closed,
    #bbpress-forums .status-closed a {
    color: #000 !important;
    }

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar