Anointed (@anointed)

Forum Replies Created

Viewing 25 replies - 226 through 250 (of 417 total)

  • Anointed
    Participant

    @anointed

    thanks dave, nice addition to bbPress.

    For anyone interested, here is a decent tutorial on how to create your own custom forums search results templates

    http://wpsnipp.com/index.php/template/create-multiple-search-templates-for-custom-post-types/


    Anointed
    Participant

    @anointed

    @eraleks

    Let’s assume that you created a new sidebar called ‘bbpress’ via your functions file. This means that when you go to the sidebar manager, that you can see one called bbpress.

    Next, take the sidebar.php file from your theme and make a copy. Name it bbpress-sidebar.php.

    Here is an example of my bbpress-sidebar.php code.

    <div id="sidebar" role="complementary">

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('bbpress') ) : ?>
    <?php endif; ?>

    </div>

    Finally there are a number of bbpress templates that call the sidebar. Replace those calls with:

    <?php get_sidebar( 'bbpress' ); ?>

    Wrapping up:

    1. You registered a new sidebar called ‘bbpress’

    2. You created a new template file called bbpress-sidebar.php

    3. You edited the bbpress-sidebar.php file to ask for the bbPress sidebar.

    4. You replaced all the calls to the sidebar with the new call to the bbpress sidebar.

    That’s about it. If it is still causing you problems then I suggest reading a few resources.

    https://codex.wordpress.org/Function_Reference/register_sidebar

    http://justintadlock.com/archives/2010/11/08/sidebars-in-wordpress

    *Author avatars.

    JJ already thought about this and added in a filter where you can choose to display just the username and not the avatar.

    <?php bbp_topic_author_link( array( 'type' => 'name' ) ); ?>

    You will see a lot of functions like the one above throughout the bbPress templates. Anywhere you find an avatar that you want to remove and just show the username, simply add the ‘type’ => ‘name’ and your good to go.

    **There may be a global way of doing this, but I did not look as I didn’t need it myself.


    Anointed
    Participant

    @anointed

    Are you running WordPress 3.2 or 3.3nightly?

    I’m running 3.3 and noticed this issue, but not sure when it first popped up.


    Anointed
    Participant

    @anointed

    @kai920

    I ended up going an entirely different route in order to get forum specific sidebars on the pages. JJ’s answer would have been the easiest to achieve by using widget context, but I wanted full control.

    Very long story short…

    I started by registering a custom sidebar just for the forums.

    I then took all of the bbpress templates and rewrite them from scratch to include my custom code and forum sidebar.

    *Keep in mind that bbPress templates are nothing more than WordPress templates, so all rules that you follow when building a custom theme also apply to bbPress. Trying to explain how to build custom templates is WAY outside the scope of what I can provide. There are numerous tutorials all over the internet to get you started.

    **If you are not comfortable writing template code, then widget context is definitely the way to go.


    Anointed
    Participant

    @anointed

    @intimez

    We can add vanilla forums to the list.

    As to url’s, no, the converter has nothing to do with url’s. It simply gets your data into the format that WordPress expects to see. Now because it is WordPress, you are able to write your own custom permalink redirects in order to match your old system. Of course a lot is going to depend upon what your old system was like. If the old forums had pretty permalinks, then it is much easier to match with custom rules.


    Anointed
    Participant

    @anointed

    I have not tried the 1x vs. of bbPress, so no experience there.

    For the plugin, I actually roll my own themes from scratch, so I would not need to include a plugin for users. I would simply add the functions to my bbPress functions just like all the other custom functions I write.

    I don’t count the number on each form submit, I was simply thinking about appending a +1 to the count already stored for the users topic/reply counts on form submit. (user-x topic_count = 200)

    As to db size, yeah that is already a ‘problem’ as my db’s are huge. I really don’t know which tradeoff is better, storing the number in the db usermeta table, or doing the calculation on the fly.

    Doing it this way would only store a single entry for each user, just like the username, first-name, etc. Printing it out on the screen then takes zero effort and only a single call with zero counts needed.

    Scenario: site gets 100 new posts a day and 1000 topic page views a day

    your way — Assuming 10 topics/replies per single topic page

    10x per page X 1000 page views a day = 10,000 count calculations

    my way — Assuming 10 topics/replies per single topic page

    100 new topics/replies per day = 100 count calculations as it’s done on submit form.

    I still end up showing the 10,000 user counts, but never have to calculate the count prior to display.

    100 counts vs. 10,000 counts

    mostly just brainstorming in case JJ finds the thread and jumps in. I would love to see more counts stored in bbPress in the future.


    Anointed
    Participant

    @anointed

    The query is going to be run on each and every topic/reply. So a topic page with 20 authors showing would run this query 20 times on that page.

    Multiply that by hundreds of concurrent users and you have a lot of queries to handle. That is why I brought up needing to cache the output.

    I’m not saying that it is a bad query, actually I think that is exactly how to get it, just worried about performance for such little benefit is all.

    I was actually contemplating a different approach:

    1. run an initial query to count all users topics/replies and store that value in the usermeta table.

    2. append the submit topic/reply form to add to the users topic count in the usermeta table.

    3. simply call the value stored for the user and output that.

    This means that bbpress never has to do the manual counts on page load, but just pulls the number just like any other data.

    *would also need to modify system so if a topic/reply is deleted that the users count is also modified to lower their count.

    good idea?


    Anointed
    Participant

    @anointed

    No idea why it would work on one theme and not twentyten. Might need to wait until JJ gets off the plane for help. I’d just be taking to many wild guesses :)

    I did go to your-site/forums/ and saw the forums just fine on the old theme.


    Anointed
    Participant

    @anointed

    You will probably need to look in the logs to get the true error.

    I do have an educated guess though, and that is system resources such as ram running out during the count. These type of functions can become very intensive and require much more ram than normal.

    *If that is the case, then ask your host to at least temporarily raise your limits so you can finish the counts.

    **You can always try clicking just one recount at a time to see if it will go through? … never tried that, but seems like a decent guess lol


    Anointed
    Participant

    @anointed

    I’m curious what the side effects to such a query would be on very large sites. Myself and friends have sites with millions of topics and hundreds of thousands of users. Without caching this could be a bit of a scary function to run no?

    *I am just getting my feet wet when it comes to caching and performance, so forgive any ignorance shown :)

    **thnx for the snippets though, love seeing new contributions

    In reply to: disabling breadcrumbs

    Anointed
    Participant

    @anointed

    Not that I am aware of.

    I built my own custom template and simply moved all the calls to the breadcrumbs to my own single file which I include in my theme. This means edit only one place and I am golden. Took a bit of work though.

    I’m guessing if there is some way of overriding the breadcrumbs programmaticly that JJ will chime in someday, I simply don’t know.


    Anointed
    Participant

    @anointed

    Are you using the bbconverter plugin?

    If so, what is the server error?

    *kinda need to know what the error is in order to troubleshoot


    Anointed
    Participant

    @anointed

    ED: Just talked to AWJunkies and he said this can happen when running multiple converters strung together.

    From your post it looks like you need a way to go from punbb?

    (guessing you are only going from punbb -> phpbb in order to get a roundabout way to bbpress)

    We are going to add punbb and phpbb3 to the list of importers.

    In reply to: disabling breadcrumbs

    Anointed
    Participant

    @anointed

    There is no ‘easy’ way to remove the breadcrumbs as they are included in a number of templates. You would need to go through each of the bbPress templates and remove the following:

    <?php bbp_breadcrumb(); ?>


    Anointed
    Participant

    @anointed

    wrap the initial topic function output in something like the following:

    if ( ! isset ( $GLOBALS['paged'] ) or ( $GLOBALS['paged'] < 2 ) )
    {
    // run your code
    }

    says if not paged, then run code…


    Anointed
    Participant

    @anointed

    ED: I’ve sent a message to AWJunkies about the mismatched topic/replies. I hope to have a solution for you quickly. Thank you for such a detailed report. It will go a long way to troubleshooting any possible issues.

    Varsitysmack: Any information you can provide will help a lot. If you can get the error that was kicked out then we can jump in and see what is happening.


    Anointed
    Participant

    @anointed

    gonna have to ask JJ about that one as I don’t use buddypress yet. I am positive that it is possible, just need a little direction from him on the db structure.

    *That is the totally cool part about this plugin in that it can extend to convert virtually any forum software.


    Anointed
    Participant

    @anointed

    I am not currently aware of a way of mass moving topics and replies.


    Anointed
    Participant

    @anointed

    I think now that BBPress is final and out in the wild, I expect to see a number of plugins starting to hit the market quite soon. The code is a dream to work with and so easy to extend. JJ really rocked this release.


    Anointed
    Participant

    @anointed

    @Brad

    I’m currently working with the developer on the plugin. There will probably be an updated version within hours for you. I’ll send a twitter link when it is available.


    Anointed
    Participant

    @anointed

    Plugins for the 1x forums do not work with the new 2x bbpress plugin.


    Anointed
    Participant

    @anointed

    @Brad

    sent you a twitter link with the download.

    Will be avail all day if you need me, my skype name is same as twitter if you need instructions at all.


    Anointed
    Participant

    @anointed

    @jaredatch

    ‘// Limit search to topics/replies

    add_filter(‘get_search_form’, ‘bbpress_search_limit’, 10, 3);

    function bbpress_search_limit($form, $search_text, $button_text) {

    $onfocus = ” onfocus=”if (this.value == ‘$search_text’) {this.value = ”;}””;

    $onblur = ” onblur=”if (this.value == ”) {this.value = ‘$search_text’;}””;

    $bbpress_form = ‘

    <form method=”get” action=”‘ . get_option(‘home’) . ‘/” >

    <input type=”text” value=”‘. $search_text .'” name=”s”‘. $onfocus . $onblur .’ />

    <input type=”hidden” name=”post_type” value=”topics” />

    <input type=”hidden” name=”post_type” value=”replies” />

    <input type=”submit” value=”‘. $button_text .'” />

    </form>

    ‘;

    if (is_post_type_archive( ‘forums’ , ‘topics’ , ‘replies’ ) || is_singular( ‘forums’ , ‘topics’ , ‘replies’ ))

    return $bbpress_form;

    else

    return $form;

    }’

    From the hip… not tested, but I think you get the idea.

    *I am just guessing on the conditionals for returning bbpress_form and probably would rework that portion entirely.


    Anointed
    Participant

    @anointed

    I am really curious to hear what the best approach to styling the different types of output is.

    Does anyone have any good examples of a search results page that returns multiple post-types, yet appears proper?

    I usually just use a function to output the post-type in the css class for each item returned and then rely upon the css for custom styling.

    *I’ve also gone the route of using custom templates for each post-type within the search results but that got really tedious very quick.


    Anointed
    Participant

    @anointed

    If posts are being effected as well then it is probably nothing to do with bbpress. I tried, but can’t replicate your problem on any of my own installs.

    I would start by deactivating plugins one at a time and checking to see if the problem goes away. If all plugins are deactivated, and it does not work, then try activating the twentyten theme and see if it still happens.

    Hope it helps, and hope you understand that all we can do is guess if we can’t replicate the problem on our own installs.

Viewing 25 replies - 226 through 250 (of 417 total)