Skip to:
Content
Pages
Categories
Search
Top
Bottom

Highlight specific forum in the flow of other forums…


  • Pomy
    Participant

    @softinfo

    I want to highlight background and font properties for a specific forum in front page, with the flow of other forums by css control.

    If you are user of freelacer site. you can easily understand this question.

    See the example – Screenshot

    It would be also great if possible to highlight specific post or topic.

    in my case what I need – See the other Screenshot

    Thanks

Viewing 25 replies - 1 through 25 (of 36 total)

  • Pomy
    Participant

    @softinfo

    Day Passed..Sorry for bumping

    Nobody have answer?

    Zaerl, you must have :), if you are listening to me.


    Pomy
    Participant

    @softinfo

    Day Passed..Sorry for bumping

    Nobody have answer?

    Zaerl, you must have :), if you are listening to me.


    Markus Pezold
    Participant

    @markus-pezold

    Hi Softinfo,

    i think it is possible to write a small php script to use the forum-id or the forum-name as css class.

    From the standard theme:

    <tr class="bb-category bb-parent bb-follows-niece bb-root alt "></tr>

    Here you can add the new class. Then you can use the CSS class analogous to the standard class “alt”.

    Greets Markus

    black-forever

    http://black-forever.de

    http://twitter.com/blackforever_de


    Markus Pezold
    Participant

    @markus-pezold

    Hi Softinfo,

    i think it is possible to write a small php script to use the forum-id or the forum-name as css class.

    From the standard theme:

    <tr class="bb-category bb-parent bb-follows-niece bb-root alt "></tr>

    Here you can add the new class. Then you can use the CSS class analogous to the standard class “alt”.

    Greets Markus

    black-forever

    http://black-forever.de

    http://twitter.com/blackforever_de

    sorry..i’m new here!

    http://rhodesmarket.blogspot.com/

    sorry..i’m new here!

    http://rhodesmarket.blogspot.com/


    Pomy
    Participant

    @softinfo

    Markus Pezold thanks brother for your interest…

    I’m looking forward to that small php script, which you’ve mentioned.

    Can you write that code?


    Pomy
    Participant

    @softinfo

    Markus Pezold thanks brother for your interest…

    I’m looking forward to that small php script, which you’ve mentioned.

    Can you write that code?


    Markus Pezold
    Participant

    @markus-pezold

    Hi softinfo,

    give me a few hours – i’ll post an example.

    Which template do you use?


    Markus Pezold
    Participant

    @markus-pezold

    Hi softinfo,

    give me a few hours – i’ll post an example.

    Which template do you use?


    Pomy
    Participant

    @softinfo

    Markus Pezold take your time brother..

    It will be my pleasure to wait your next post.

    Well, I’m using a custom theme. Its not available on internet.

    But If you want from me to show off my template code, then please tell me.


    Pomy
    Participant

    @softinfo

    Markus Pezold take your time brother..

    It will be my pleasure to wait your next post.

    Well, I’m using a custom theme. Its not available on internet.

    But If you want from me to show off my template code, then please tell me.


    Markus Pezold
    Participant

    @markus-pezold

    Ok – here is a small “solution” :)

    For a specific forum you can use this code.

    Put this in the front-page-php:

    id="forum_<?php echo get_forum_id()?>"

    _________________________________

    Here is the example with the standard theme kakumei

    <?php if ( bb_forums() ) : ?>

    <h2><?php _e('Forums'); ?></h2>

    <table id="forumlist">

    <tr>

    <th><?php _e(‘Main Theme’); ?></th>

    <th><?php _e(‘Topics’); ?></th>

    <th><?php _e(‘Posts’); ?></th>

    </tr>

    <?php while ( bb_forum() ) : ?>

    <?php if (bb_get_forum_is_category()) : ?>

    <tr<?php bb_forum_class(‘bb-category’); ?> id=”forum_<?php echo get_forum_id()?>”>

    <td colspan=”3″><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><?php forum_description( array( ‘before’ => ‘<small> – ‘, ‘after’ => ‘</small>’ ) ); ?><?php bb_forum_pad( ‘</div>’ ); ?></td>

    </tr>

    <?php continue; endif; ?>

    <tr<?php bb_forum_class(); ?> id=”forum_<?php echo get_forum_id()?>>

    <td><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><?php forum_description( array( ‘before’ => ‘<small> – ‘, ‘after’ => ‘</small>’ ) ); ?><?php bb_forum_pad( ‘</div>’ ); ?></td>

    <td class=”num”><?php forum_topics(); ?></td>

    <td class=”num”><?php forum_posts(); ?></td>

    </tr>

    <?php endwhile; ?>

    </table>

    <?php endif; // bb_forums() ?>

    So you can style with CSS the background and the font-color.

    eg. #forum_1 {background-color: #ddd; color: #333}


    Markus Pezold
    Participant

    @markus-pezold

    Ok – here is a small “solution” :)

    For a specific forum you can use this code.

    Put this in the front-page-php:

    id="forum_<?php echo get_forum_id()?>"

    _________________________________

    Here is the example with the standard theme kakumei

    <?php if ( bb_forums() ) : ?>

    <h2><?php _e('Forums'); ?></h2>

    <table id="forumlist">

    <tr>

    <th><?php _e(‘Main Theme’); ?></th>

    <th><?php _e(‘Topics’); ?></th>

    <th><?php _e(‘Posts’); ?></th>

    </tr>

    <?php while ( bb_forum() ) : ?>

    <?php if (bb_get_forum_is_category()) : ?>

    <tr<?php bb_forum_class(‘bb-category’); ?> id=”forum_<?php echo get_forum_id()?>”>

    <td colspan=”3″><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><?php forum_description( array( ‘before’ => ‘<small> – ‘, ‘after’ => ‘</small>’ ) ); ?><?php bb_forum_pad( ‘</div>’ ); ?></td>

    </tr>

    <?php continue; endif; ?>

    <tr<?php bb_forum_class(); ?> id=”forum_<?php echo get_forum_id()?>>

    <td><?php bb_forum_pad( ‘<div class=”nest”>’ ); ?>“><?php forum_name(); ?><?php forum_description( array( ‘before’ => ‘<small> – ‘, ‘after’ => ‘</small>’ ) ); ?><?php bb_forum_pad( ‘</div>’ ); ?></td>

    <td class=”num”><?php forum_topics(); ?></td>

    <td class=”num”><?php forum_posts(); ?></td>

    </tr>

    <?php endwhile; ?>

    </table>

    <?php endif; // bb_forums() ?>

    So you can style with CSS the background and the font-color.

    eg. #forum_1 {background-color: #ddd; color: #333}


    zaerl
    Participant

    @zaerl

    Zaerl, you must have :), if you are listening to me.

    http://dl.dropbox.com/u/15741404/za-highlight.php

    Change the 4 global vars:

    $za_highlight_topics = array();

    $za_highlight_topic_class = ”;

    $za_highlight_forums = array();

    $za_highlight_forum_class = ”;

    according to your needs. I do not provide support for this plugin.


    zaerl
    Participant

    @zaerl

    Zaerl, you must have :), if you are listening to me.

    http://dl.dropbox.com/u/15741404/za-highlight.php

    Change the 4 global vars:

    $za_highlight_topics = array();

    $za_highlight_topic_class = ”;

    $za_highlight_forums = array();

    $za_highlight_forum_class = ”;

    according to your needs. I do not provide support for this plugin.


    Markus Pezold
    Participant

    @markus-pezold

    For specific topics and post you can use:

    get_topic_id();

    post_id();

    Here you’ll find the incomplete documentation:

    https://bbpress.org/documentation/template-tags

    But I think for posts and topics there must be another, better solution. No one wants to write their own CSS definition for each ID. :)

    Maybe it is better to use a term from the tagging to create the unique look of some Posts.


    Markus Pezold
    Participant

    @markus-pezold

    For specific topics and post you can use:

    get_topic_id();

    post_id();

    Here you’ll find the incomplete documentation:

    https://bbpress.org/documentation/template-tags

    But I think for posts and topics there must be another, better solution. No one wants to write their own CSS definition for each ID. :)

    Maybe it is better to use a term from the tagging to create the unique look of some Posts.


    Markus Pezold
    Participant

    @markus-pezold

    Hi Zaerl,

    I see – your plugin is a better and bigger way to highlight many topics and forums. :)

    You hang your code to the filter topic_class. The perfect solution.

    @softinfo: You must use <?php bb_forum_class(); ?> in your custom theme.


    Markus Pezold
    Participant

    @markus-pezold

    Hi Zaerl,

    I see – your plugin is a better and bigger way to highlight many topics and forums. :)

    You hang your code to the filter topic_class. The perfect solution.

    @softinfo: You must use <?php bb_forum_class(); ?> in your custom theme.


    Pomy
    Participant

    @softinfo

    Hi Zaerl, You are a great person, your method is working like charm.. thanks brother..

    @Markus your method is also working, thanks for your time.

    – One more question, Like in WordPress you can highlight the author comments in his/her post. I’m searching the almost same way with diffident edge

    In my case – usually/mostly Keymasters (Like Matt on bbPress) don’t write in their forums, they are busy guys. When they will came back that would be excited to highlight them?

    — So, Is it possible to highlight a specific author/keymaster/admin’s every post?

    I want to highlight all Keymaster’s posts in my forums.

    Thanks again.

    S.


    Pomy
    Participant

    @softinfo

    Hi Zaerl, You are a great person, your method is working like charm.. thanks brother..

    @Markus your method is also working, thanks for your time.

    – One more question, Like in WordPress you can highlight the author comments in his/her post. I’m searching the almost same way with diffident edge

    In my case – usually/mostly Keymasters (Like Matt on bbPress) don’t write in their forums, they are busy guys. When they will came back that would be excited to highlight them?

    — So, Is it possible to highlight a specific author/keymaster/admin’s every post?

    I want to highlight all Keymaster’s posts in my forums.

    Thanks again.

    S.


    Markus Pezold
    Participant

    @markus-pezold

    Here is one solution described for all keymasters and admins:

    https://bbpress.org/forums/topic/different-style-for-key-master-and-administrator-replies-1

    For admins you can also do something like this:

    <?php if( is_bb_admin() ) { ?> class="highlight"<?php } ?>


    Markus Pezold
    Participant

    @markus-pezold

    Here is one solution described for all keymasters and admins:

    https://bbpress.org/forums/topic/different-style-for-key-master-and-administrator-replies-1

    For admins you can also do something like this:

    <?php if( is_bb_admin() ) { ?> class="highlight"<?php } ?>


    Markus Pezold
    Participant

    @markus-pezold

    For individual classes for author post you can use

    class="highlight_<?php post_author_id();?>"

    Anonther good starting point to search:

    http://phpxref.ftwr.co.uk/bbpress/nav.html?_functions/index.html

    There are always different ways to achieve an objective. It is only a question of whether the target should be achieved easily, quickly or safely.

    :)

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