aaclayton (@aaclayton)

Forum Replies Created

Viewing 11 replies - 26 through 36 (of 36 total)
  • In reply to: Hide Freshness Column

    @aaclayton

    Participant

    Have you taken over control of bbpress templates using theme compatibility? If so you can modify yourtheme/bbpress/loop-forums.php and remove the list item:

    li class=”bbp-forum-freshness”

    Next from yourtheme/bbpress/loop-single-forum.php remove the same section and its contents:

    li class=”bbp-forum-freshness

    Finally you’ll have to adjust the CSS of your forums to compensate the width of the remaining forum columns for the missing freshness. Hope this helps.

    EDIT: sorry, I tried to post the exact code blocks to remove, but the forum here isn’t letting me embed the code 🙁

    @aaclayton

    Participant

    Adam,

    This is definitely be possible. There’s a fair bit of work involved, but I re-wrote most of the bbpress templates from the ground up for my new site using the bbpress functions included in the plugin as well as a few custom ones I wrote myself.

    Just install bbpress, set it to theme compatibility settings, then take over the css and template files in your theme directory.

    CSS goes in yourtheme/css

    Base bbpress page types go in yourtheme directory (archive-forum, archive-topic, single-forum, single-topic, single-topic-edit, single-reply-edit, and single-user are the most important ones)

    All the sub-templates (content, loops, forms, and pagination) goes in yourtheme/bbpress

    Using this as a general guide you can rebuild bbpress from the ground up to suit your needs. Check out my bbpress enabled theme at http://tamrielfoundry.com

    @aaclayton

    Participant

    Ok, this is definitely NOT the most elegant solution, but I contrived a crude fix to the problem. Since the false 404 flagging was happening only on user profile pages, I added the following to my single_user.php template just before the header.

    global $wp_query;
    $wp_query -> is_404 = false;
    get_header(); // Loads the header.php template. ?>
    

    Basically I’m just forcing the profile page to not be 404. I may try to work out a better solution, but for the time being, this appears to work.

    EDIT: looks like the code snippet is having trouble displaying a greater than sign, anywhere you see > above, it should be a greater than sign (>).

    • This reply was modified 12 years, 5 months ago by aaclayton.
    • This reply was modified 12 years, 5 months ago by aaclayton.

    @aaclayton

    Participant

    Same problem, did you ever discover a solution?

    @aaclayton

    Participant

    Thanks a bunch for sharing this snippet. It works perfectly when not conditioned. It’s not behaving nicely with the is_bbpress() conditional logic, so I’ll have to delve a bit deeper into the set of is_ functions you mentioned above, but I should be able to work something out. Thanks again for the help, and for the great forum software.

    @aaclayton

    Participant

    Sorry, I should have included this info in my initial post.

    I’m using the bbPress plugin version 2.1.1
    My theme is custom built using Justin Tadlock’s Hybrid Core version 1.4.0.

    I don’t believe there should be any pre-existing theme conflict with the /users/username permalink structure, but obviously there is something that I have overlooked. If I switch to TwentyEleven, I’m not getting a 404 on user pages, so it has to be something related to the Hybrid framework. Hopefully I can track it down.

    @aaclayton

    Participant

    Sorry, I guess I’m not being very clear. The is_bbpress() function already seems to deliver the conditional logic I need. That (I don’t think) isn’t my problem. My problem is getting the proper syntax for removing the actions that add styles and scripts to the head area.

    remove_action ( 'bbp_enqueue_scripts' , 'enqueue_styles' );
    remove_action ( 'bbp_enqueue_scripts' , 'enqueue_scripts' );
    

    This doesn’t work, nor do some variants that I have tried. Could you suggest the proper syntax for removing the relevant actions, regardless of the conditioning logic employed?

    @aaclayton

    Participant

    I am still having this issue, unfortunately. Although I worked out enough of the technical details of bbPress 2.1 to port the plugin/templates/css over to the live (development) site.

    If it would be helpful to see what I’m talking about you can access http://tamrielfoundry.com with username: test, password: test.

    The bbpress CSS + some other scripts are being loaded in the head site-wide, and I can’t figure out the correct conditional syntax to remove them unless is_bbpress() is true.

    @aaclayton

    Participant

    Hey JJJ, thanks for the advice. I am using /css/bbpress.css in my theme, the trouble I’m having is actually getting the proper syntax for unhooking these elements when they aren’t needed.

    Essentially, what I’m trying to do is something like this:

    add_action( 'get_header', 'remove_bbpress_scripts' );
    function remove_bbpress_scripts() {
        if ( !is_bbpress() ) {
            remove_action ( 'bbp_enqueue_scripts' , 'enqueue_styles' );
            remove_action ( 'bbp_enqueue_scripts' , 'enqueue_scripts' );
        }
    }
    

    Something isn’t working with this syntax though, I suspect I need to prefix ‘enqueue_styles’ with something, but I’m not sure what the proper prefix is.

    @aaclayton

    Participant

    Ok….so clearly I can’t effectively display what is actually getting put in my header section without the forum thinking I’m embedding live html or something. Just to clarify, bbpress is enqueing a stylesheet, bbp-child-bbpress-css from my theme’s /css directory regardless of the site page in question. Furthermore, it’s adding a script to the header defining a js variable:

    var ajaxurl = 'http://localhost/tamrielfoundry/wp-admin/admin-ajax.php';
    

    which I’m not sure is necessary?

    @aaclayton

    Participant

    Hey Jared, thanks for the reply. Unfortunately (perhaps due to misconfiguration on my part) these actions are firing on all site pages. Specifically I believe that bbPress is responsible for:

    link rel='stylesheet' id='bbp-child-bbpress-css'
    

    and

      /*  */
    

    I have bbPress configured to use theme compatibility base settings, upon which I am hand tuning templates within my theme directory. Any ideas why the child-css is getting called ubiquitously? The AJAX reference also showed up only after I installed bbPress, and I’m not convinced that it’s necessary…

    Any ideas would be great, thanks again. Andrew

    EDIT: Wow, I’m having a lot of trouble getting this code to display in blocks without getting stripped, so I had to throw in some unneccesary single quotes, but you get the idea…

    • This reply was modified 12 years, 5 months ago by aaclayton.
    • This reply was modified 12 years, 5 months ago by aaclayton.
    • This reply was modified 12 years, 5 months ago by aaclayton.
    • This reply was modified 12 years, 5 months ago by aaclayton.
    • This reply was modified 12 years, 5 months ago by aaclayton.
Viewing 11 replies - 26 through 36 (of 36 total)