Adam Harley (Kawauso) (@kawauso)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 285 total)
  • @kawauso

    Member

    BackPress is a subset of WordPress functionality and exists in WordPress, so yes, you’ll have access to it if you integrate.

    @kawauso

    Member

    I’m pretty sure bbPress is becoming a WordPress plugin rather than a BuddyPress one, with a converter being made once it’s stable. I also gather there’s a movement to branch the 0.9 code into a standalone forum which would also have a converter available for 1.0 installs.

    That said, I really do have to agree with the rest of the points you made. I work a lot with WordPress and the level of documentation available is just without parallel in BuddyPress, but you really do need to know bbP just to do the simplest things at times.

    Ideally there ought to be a set of core plugins, as was proposed for WordPress, so that essential functionality could be bundled but not necessarily included per se. I don’t support incorporating such functionality into the core itself though, since that would essentially be at odds with the WordPress/bbPress design philosophy.

    @kawauso

    Member

    I’m pretty sure bbPress is becoming a WordPress plugin rather than a BuddyPress one, with a converter being made once it’s stable. I also gather there’s a movement to branch the 0.9 code into a standalone forum which would also have a converter available for 1.0 installs.

    That said, I really do have to agree with the rest of the points you made. I work a lot with WordPress and the level of documentation available is just without parallel in BuddyPress, but you really do need to know bbP just to do the simplest things at times.

    Ideally there ought to be a set of core plugins, as was proposed for WordPress, so that essential functionality could be bundled but not necessarily included per se. I don’t support incorporating such functionality into the core itself though, since that would essentially be at odds with the WordPress/bbPress design philosophy.

    @kawauso

    Member

    Thanks :)

    Seems so actually, so it might well be unnecessary with the linked tutorial. Haven’t got time at the moment to confirm though unfortunately.

    @kawauso

    Member

    I had this issue (with single user however) and it turned out I was missing the WordPress plugin for bbPress integration.

    In reply to: Forum List Alterations

    @kawauso

    Member

    Replace

    <?php		else :
    if ( $prev_depth == 1 ) : ?>
    <br />
    <?php
    else :
    ?>, <?php
    endif;
    ?><a href="<?php forum_link(); ?>" title="<?php forum_description( array( 'before' => '', 'after' => '' ) ); ?>"><?php forum_name(); ?></a><?php
    endif;
    $prev_depth = $depth;
    endwhile; ?>

    with

    <?php		else :
    if ( $prev_depth < $depth ) : ?>
    <br />
    <?php
    else :
    ?>, <?php
    endif;
    ?><a href="<?php forum_link(); ?>" title="<?php forum_description( array( 'before' => '', 'after' => '' ) ); ?>"><?php forum_name(); ?></a><?php
    if ( $prev_depth < $depth ) : ?>
    <br />
    <?php endif;
    endif;
    $prev_depth = $depth;
    endwhile; ?>

    I think that should work

    In reply to: Forum List Alterations

    @kawauso

    Member
    <?php if ( bb_forums() ) : ?>
    <h2><?php _e('Categories'); ?></h2>
    <table id="forumlist" cellspacing="0">
    <tr>
    <th><?php _e('Title'); ?></th>
    <!--<th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>-->
    </tr>
    <?php
    while ( $depth = bb_forum() ) :
    if ($depth === 1 ) :
    if ($depth < $prev_depth) :
    ?>

    </td>
    </tr>
    <?php endif; ?>
    <tr<?php ( bb_get_forum_is_category() ? bb_forum_class('bb-category') : bb_forum_class() ) ?>>
    <td colspan="3">
    <big><a href="<?php forum_link(); ?>"><b><?php forum_name(); ?></b></a></big><?php forum_description( array( 'before' => '<br/><small>', 'after' => '</small>' ) ); ?>

    <?php else :
    if ( $prev_depth == 1 ) : ?>
    <br />
    <?php
    else :
    ?>, <?php
    endif;
    ?><a href="<?php forum_link(); ?>" title="<?php forum_description( array( 'before' => '', 'after' => '' ) ); ?>"><?php forum_name(); ?></a><?php
    endif;
    $prev_depth = $depth;
    endwhile; ?>

    </td>
    </tr>
    </table>
    <?php endif; // bb_forums() ?>

    In reply to: Forum List Alterations

    @kawauso

    Member

    @Michael888: In response to your question in the other topic, I can almost certainly show you how to do that, but it’s a bit hard to explain without having the code for your bb_forums() list loop

    @kawauso

    Member

    Sure.

    Some example output

    <ul>
    <li class="forum_subforum"><a href="http://www.foo.bar/forums/forum/ideas-comments" title="">Ideas & Comments</a>
    <ul>
    <li class="forum_cat"><a href="http://www.foo.bar/forums/forum/questions" title="">Questions</a>
    <ul>
    <li class="forum_subforum"><a href="http://www.foo.bar/forums/forum/metsoc" title="">Meetings / Socials</a></li>
    </ul>
    </li>
    </ul>
    </li>
    <li class="forum_subforum"><a href="http://www.foo.bar/forums/forum/tips-amp-tricks" title="">Tips & Tricks</a>
    <ul>
    <li class="forum_subforum"><a href="http://www.foo.bar/forums/forum/gigs" title="Music, bands, all that...">Gigs</a>
    <ul>
    <li class="forum_cat"><a href="http://www.foo.bar/forums/forum/everything-else" title="">Everything else</a></li>
    </ul>
    </li>
    <li class="forum_subforum"><a href="http://www.foo.bar/forums/forum/sports" title="">Sports</a></li>
    <li class="forum_subforum"><a href="http://www.foo.bar/forums/forum/minutes" title="">Minutes</a></li>
    </ul>
    </li>
    </ul>

    In a sidebar, styled with CSS: http://img27.imageshack.us/img27/385/capturecr.png

    @kawauso

    Member

    Put them in backtick characters (see below the post field here) or in <code> tags

    @kawauso

    Member

    What board software are you using currently?

    In reply to: Ticket system plugin

    @kawauso

    Member

    There’s one for WordPress: https://wordpress.org/extend/plugins/wats/

    @kawauso

    Member

    Sounds a bit like part of BuddyPress really…

    @kawauso

    Member

    Most spambots from experience will be one-off registrations that they attempt to post with. The bots aren’t likely to attempt again later with the same user, because it’s easier just to try somewhere else fresh instead.

    @kawauso

    Member

    Thank DKB. To disable that line, go to line 1017 in the WordPress-side plugin file wpbb-sync.php and comment out (put \ before each line):

    $comments[count($comments)-1]->comment_content .= '<br/><p class="wpbb_continue_discussion">'.
    __('Please continue discussion on the forum: ', 'wpbb-sync')."<a href='$link'> link</a></p>";

    You can also just change the text there too. Someone tell these guys about array_push() ?

    @kawauso

    Member

    Pretty much. The non get_ version is just an echo of the get_ one anyway :)

    https://trac.bbpress.org/browser/trunk/bb-includes/functions.bb-template.php

    @kawauso

    Member

    @kawauso

    Member

    Use get_topic_title() to retrieve the topic title as a string while in the loop.

    To get the actual index keys of the $topics array, you can use array_keys, or if you want to actual topic IDs, you’d need to use $topic->topic_id inside a foreach loop assigning $topic.

    @kawauso

    Member

    bbPress doesn’t touch WordPress by default, so you must be running some plugin that adds that

    @kawauso

    Member

    $out = preg_replace( '|/!]*?[^[*?]|si', '', $out );

    That should take bbCode out, put it after $out = strip_tags( $out ); . Not tested it, but it’s adapted from a function I found on Google :P

    @kawauso

    Member

    @merlin214365: As a golden rule, most functions will return a string by putting get_ in front of the function name, rather than echoing (which is just an alias for the get_ anyway). Most functions you’re likely to need are in functions.bb-template.php too, so have a read through that and I’d recommend getting an editor like Programmer’s Notepad to be able to search through bbPress’ code all at once to understand usage.

    strip_tags will take out all HTML and PHP tags, so no need for an extra str_replace :)

    @kawauso

    Member

    Cripes, no need for all that object-based markey, bbPress has functions to pass as a string rather than echo…

    <?php
    /*
    Plugin Name: Meta Headers
    */

    function meta_heads() {

    global $posts, $tags;

    if ( $posts ) {
    $out = $posts[0]->post_text;
    $out = strip_tags( $out );
    $out = str_replace( array( "n", "r" ), ' ', $out );
    $out = substr($out, 0, 200); // only display the first 200 characters of the first post
    }

    if( empty( $out ) )
    $out = 'Default description';

    echo "n".'<meta name="description" content="'.$out.'" />';

    if ( !empty( $tags ) ) {
    $keywords = '';
    foreach ($tags as $t) {
    $keywords.=$t->raw_tag.', ';
    }
    echo "n".'<meta name="keywords" content="'.substr($keywords,0,-2).'">'."n"; // displays any tags associated with a topic as keywords
    }

    }

    add_action( 'bb_head', 'meta_heads' );

    That will strip HTML, but not bbCode

    @kawauso

    Member

    WordPress themes can’t be used for bbPress without modification, but if it’s a bbPress theme, then yep, just put it in its own directory under my-templates

    In reply to: Get Profile Links

    @kawauso

    Member
    function bb_get_admin_link( $args = '' ) {
    if ( !bb_current_user_can( 'moderate' ) )
    return;
    if ( $args && is_string($args) && false === strpos($args, '=') )
    $args = array( 'text' => $args );

    $defaults = array('text' => __('Admin'), 'before' => '', 'after' => '');
    $args = wp_parse_args( $args, $defaults );
    extract($args, EXTR_SKIP);

    $uri = esc_attr( bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN) );

    return apply_filters( 'bb_get_admin_link', $before . '<a href="' . $uri . '">' . $text . '</a>' . $after, $args );
    }

    So if you don’t mind bypassing the moderation ability check, just use

    esc_attr( bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN) );

    or

    bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN);

    depending if you’ll be escaping the URL later.

    To keep the check, use if ( bb_current_user_can( 'moderate' ) )

    In reply to: Future of bbPress

    @kawauso

    Member

    I think having gotten into plugin development with bbPress, a big part of what it needs is more documentation. One of the great advantages of WordPress is the ease with which additional functionality can be implemented, and bbPress is quite similar in that respect, but actually knowing how to implement it using the native functions available is currently a learnt skill, rather than something you can pick up from reading the Codex. As this thread shows, bbPress has a wide variety of uses and situations, so it’s important for it to be easily adaptable in order to grow.

    Not too much to do with how bbPress develops as a codebase, but not too off-topic I hope :)

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