Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 15,701 through 15,725 (of 32,519 total)
  • Author
    Search Results
  • #116130
    #116127
    Adam
    Participant

    So I think it is a permalink issue but I am not sure. I am developing a theme framework and I want to integrate bbpress with it and thus i was testing bbpres default installation. How ever going to site/forums/forum/test gives me a 404 error. even site/forums gives me a 404 – the theme throws the 404 –

    Can any one give me any ideas as to how to fix this? My permal link structure is

    /%category%/%postname%/
    
    #116126

    HELP!

    I’m having issues with my BBpress WordPress installation as of late (since I did a plugin update to 2.1.1) on all pages I get the error:

    Warning: get_class() called without object from outside a class in /nfs/c05/h01/mnt/77944/domains/charterproject.ca/html/wp-content/themes/charterprojectbb/functions.php on line 529

    I tracked this in the functions file in my theme that controls the WP theme and the BBPress theme.
    the code is:
    if ( 'bbPress' == get_class( $bbp ) ) {
    $bbp->theme_compat->theme = new BBP_Twenty_Ten();
    }
    endif;

    I’m not a wiz at PHP so I’m not sure why this causing this error but it does result in the form being quite non-functioning, please help! you can view the site for reference at : http://charterproject.ca

    Pez

    #116104
    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?

    #116087
    DramaticBaby
    Participant

    Now I finally got it to work. You just copy the bbpress.css file to /my-child-theme/css/ and voilá, it works. When I found out that I looked in bbpress-functions.php and stumbled over this line:

    // Check child theme
    if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) )

    Which states the obvious, it looks for bbpress.css in the /css/ folder in your child theme. If found, it will replace it with the default css.

    If any admin reads this, can you please elaborate a bit more on the subject. It is very diffuse how all this works.

    • This reply was modified 13 years, 11 months ago by DramaticBaby.
    #116085
    DramaticBaby
    Participant

    Hi, I’m trying to create a custom theme for the bbPress forum. I already got a child theme based on Twenty Eleven, and I’m trying to style bbPress with my style.css in the child theme folder.

    The problem is that bbpress.css is imported in the html code after my style.css, overwriting the latter’s styling. How do I force bbPress to use style.css instead, even though bbpress.css is imported after?

    I have been struggling with this for hours and hours.

    • This topic was modified 13 years, 11 months ago by DramaticBaby.
    #116082

    Not sure I understand the problem. Spaces aren’t valid in URLs unless they are encoded.

    #116073
    mores
    Member

    Expanding my search to include all of WordPress resulted in this fine code I just plop in to my functions.php that’ll remove it:

    function the_title_trim($title) {
    // Might aswell make use of this function to escape attributes
    $title = attribute_escape($title);
    // What to find in the title
    $findthese = array(
        '#Protected:#', // # is just the delimeter
        '#Private:#',
        '#Privat:#'
    );
    // What to replace it with
    $replacewith = array(
        'a', // What to replace protected with
        'b' // What to replace private with
    );
    // Items replace by array key
    $title = preg_replace($findthese, $replacewith, $title);
    return $title;
    

    }
    add_filter(‘the_title’, ‘the_title_trim’);

    Credit: https://wordpress.org/support/topic/how-to-remove-private-from-private-pages?replies=24

    #116070
    craftcore
    Member

    I figured out how to hook into it. I created bp-custom.php in the plugin directory and modified the action like this:

    add_action( 'bbp_theme_after_reply_author_details', 'display_authorlevel' );
    function display_authorlevel() {

    // code goes here that you want to executed under the avatar. I wanted to display my WP roles instead of the bbPress roles, so I wrote a custom function to pull the WP roles and put it here.

    }

    Thanks so much for looking!

    #116069

    It’s a WordPress core issue, and one I’m not sure we can easily filter out. I’ll take another look at this for 2.2, but I think it’s hard-coded in.

    #116065
    craftcore
    Member

    Yay, I found the file! I downloaded my entire website, then used the program MultiFindPro to search for Hello World within my website files. It found it right away and I was able to remove the echo statement.

    Thanks so much for help, John. 🙂 I really felt like I was losing my mind there, haha.

    (Note to self: don’t code late at night while sleepy.)

    #116064
    Janus12
    Member

    problem 2 was solved by adding

    #bbpress-forums div.reply {
    height: auto;}
    

    however the other problem is still not solved and I believe the style.css is missing files.

    This is litteraly my whole css file


    /*
    

    Theme Name: Custom Community
    Theme URI: http://themekraft.com/custom-community/
    Description: Create your individual website within minutes. Custom Community is a WordPress and BuddyPress theme framework that enables you to build your site with all the features you love. Easy to use jQuery slideshow. List posts under your pages in magazine layouts. Use powerful theme settings to customize every part of the theme. 20 widget areas, 5 special widgets and 2 custom WP 3.0 header menus. 3 predefined colour schemes (white, grey, black) with clean and simple browsersafe css design to start from. Support forum at http://themekraft.com/forums.
    Version: 1.8.9.1
    Author: Themekraft
    Author URI: http://themekraft.com/
    Tags: buddypress, translation-ready, dark, light, white, left-sidebar, right-sidebar, two-columns, three-columns, fixed-width, flexible-width, custom-header, custom-menu, custom-colors, custom-background, theme-options
    License: GNU General Public License v2.0 / License URI: http://www.gnu.org/licenses/gpl-2.0.html
    */

    /* Reset browser defaults */

    @import
    url( _inc/css/reset.css );

    .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }

    .alignleft {
    float: left;
    margin-right: 15px;
    }

    .alignright {
    float: right;
    margin-left: 15px;
    }

    div.post .wp-caption {
    text-align: center;
    background-color: ##f3f3f3
    padding-top: 4px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    margin-bottom:12px;
    }

    div.post dd.wp-caption p.wp-caption-text, div.post .wp-caption p.wp-caption-text {
    font-size: 0.9em;
    line-height: 17px;
    padding: 0 4px 5px 0;
    margin: 0;
    }

    div.credits{display:none;}

    bbpress-forums div.reply {

    height: auto;
    

    }


    I am fairly new to web design but I have a feeling there must be more somewhere.

    Does anyone know what code I could input to this file in order to fix problem one?

    Also as a bonus could anyone give me a code that could work for changing the background of the forum colour?

    I apologize for my “rookieness”

    Thanks in advance!

    #116052
    Ronileco
    Participant

    Any new info about this one?
    I am suffering from a similar problem where my pretty URL: http://www.mysite/forum/users/User Name/ doesn’t work but http://www.mysite/forum/users/userId/ works great.

    How can i fix my permalink or should i change the code to use userID instead? maybe redirect through .htaccess file is the answer?

    #116038

    The reason there is no shortcode for this, is because it doesn’t usually make sense to display a river of replies out of the context of their parent topics and forums. Hence, there’s no template to support this, because the use-case is most likely custom to the application.

    In the future, we will need to address this so that searching topics and replies has a place to output exactly what makes sense to see, but it sounds like even that isn’t exactly what you’re trying to do.

    I’d recommend you look into writing your own WP_Query or using get_posts() to customize this output yourself. Getting the posts and their data out is easy, then it’s up to you to make it look and work like you need it to.

    #116035
    varsitysmack
    Participant

    @linq – I tried your solution again (thinking that I might have goofed something up the first time), but I don’t think I did because I still can’t get a list of replies to show up under the forum pages.

    @netweb – a short code like this would probably work… but there are none: [bbp-reply-index]

    #116031

    It’s true, but you can disregard the message. load_plugin_textdomain() unfortunately doesn’t do what we need it to, so we use load_textdomain() instead.

    #116025
    viktora
    Member

    Hi all. This evening I was just about to translate some pieces of BBpress into my native Czech lang. I am used to use Codestyling Localization plugin for translating plugins. This same I saw some strange warning. First time in my life.:-) Is here someone able to provide me with more details on following error message regarding bbpress?

    Loading Issue: Author is using load_textdomain instead of load_plugin_textdomain function. This may break behavior of WordPress, because some filters and actions won’t be executed anymore. Please contact the Author about that. (Codestyling Localization plug error message)

    #116023
    nick_w
    Member

    Found the fix on this site, deep in the Tracking discussion. Adding bbp_admin(); (courtesy of xiosen) did the trick, like this:

        // Setup admin (to include converter)
    require_once( bbpress()->plugin_dir . 'bbp-admin/bbp-admin.php' );
    
    bbp_admin();
    
    // Convert password
    require_once( bbpress()->admin->admin_dir . 'bbp-converter.php' );
    require_once( bbpress()->admin->admin_dir . 'converters/' . $row->meta_value . '.php' );
    

    Many thanks,

    nick

    #116022
    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.

    #115997
    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?

    #115991
    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 13 years, 11 months ago by aaclayton.
    • This reply was modified 13 years, 11 months ago by aaclayton.
    • This reply was modified 13 years, 11 months ago by aaclayton.
    • This reply was modified 13 years, 11 months ago by aaclayton.
    • This reply was modified 13 years, 11 months ago by aaclayton.
    #115989
    Siobhan
    Member

    Mason and I started to come up with a task list after talking to John at WCNYC. Here’s what we came up with:

    Setting up and running your forum
    bbPress settings (I have some content for this somewhere – will add it as a draft)
    Customizing how bbPress works
    Useful plugins that extend bbPress
    Moderating and managing your forum

    We also had:
    WordPress User Roles and bbPress
    Getting Started with bbPress

    They are complete though.

    Since you guys are on the ground supporting bbPress users, what things in the docs would you like to see prioritized?

    #115966
    atomnet
    Participant

    Thanks to all,
    with this shortcode i see only my forum/post index and not internal post (image and text).
    I try this [bbp-single-topic id=$topic_id=name post] but with /%postname%/ dont works.

    Thanks again.

Viewing 25 results - 15,701 through 15,725 (of 32,519 total)
Skip to toolbar