WordPress.org

Support

Support » Plugins and Hacks » bbPress Post Toolbar » [Plugin: bbPress Post Toolbar] Code not showing up in topics

[Plugin: bbPress Post Toolbar] Code not showing up in topics

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author master5o1

    @master5o1

    Erm? Are you asking whether the <code> tag/button will do something more than its definition in HTML? I haven’t really done much to handle specific code displaying.

    No,

    Just like on this forum i would like to add some code like this.

    <code> </code>

    <?php the_title(); ?>

    No matter what code, HTML -/PHP it should just end up indie my forum with a background color (based on CSS file)

    But i think i found my problem. bbPRess has user roles and i was logged-on with a ‘normal’ member and those members can not add i think.

    Because when i'm logged-on with my admin account everything works fine.

    ====
    Option:
    ====

    Maybe?, asking.. could you add some classes to the button -lists ?

    Now we have this setup:

    <ul id="buttons" style= blabla >
    <li class="button-right">
    <li>..</li>
    <li>..</li>
    <li>..</li>
    a few times more
    </ul>

    But like most plugins they do too much out of the box and i would only like a few options like video, urls, images and some text effects.
    I don't want somebody adding Comic Sans to my forum and make it a pink color.

    I did found the plugin Settings but they don't cover all buttons individually.
    For example, the formatting buttons option cover lots of important buttons,
    Like BOLD and Italic but also font-size and others.

    If we had this code.

    <ul id="buttons" style= blabla>
    <li class="button-one">..</li>
    <li class="button-two">..</li>
    <li class="button-three">..</li>
    a few times more..
    </ul>

    We could easily hide just one button from the toolbar by CSS.

    li.button-two { display: none; }

    It would make it a lot more customizable..

    At this point i made this: (adding class="button-tb-item-<?php print $i; ?> to your code)

    foreach ($items as $item) :
    					if ($item['action'] == 'api_item') :
    						?><li class="button-tb-item-<?php print $i; ?>"><a onclick="do_button(this, {action : '<?php echo $item['action']; ?>', panel : 'post-toolbar-item-<?php print $i; ?>'}, <?php echo $item['data']; ?>)"><?php echo $item['inside_anchor']; ?></a></li><?php
    					else:
    						?><li class="button-tb-item-<?php print $i; ?>"><a onclick="do_button(this, { action : '<?php echo $item['action']; ?>', panel : 'post-toolbar-item-<?php print $i; ?>' }, function(){ return '<?php if ($item['action'] == 'insert_data' || $item['action'] == 'insert_shortcode') { echo $item['data']; } elseif (isset($item['panel'])) {echo $item['panel'];} ?>';})"><?php echo $item['inside_anchor']; ?></a></li><?php
    					endif;
    					$i++;
    				endforeach;

    Now i can activate all toolbar options i want from the plugins settings but only hide a few options i don't want to be added.

    Almost forgot to say that i’m very thankful for making this plugin!

    You did a great job!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: bbPress Post Toolbar] Code not showing up in topics’ is closed to new replies.
Skip to toolbar