Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 15,776 through 15,800 (of 32,519 total)
  • Author
    Search Results
  • Fuchsy
    Member

    After spending some hours with the same strange behaviour i finally found a solution:

    This error happens when you’r running WP in a multisite-environment, only on the mainsite AND if you added define('NOBLOGREDIRECT', 'http://example.com'); to your wp-config.php

    Adding remove_action( 'template_redirect', 'maybe_redirect_404' ); to your themes functions.php will stop that annoying bug.

    I guess this error happens because maybe_redirect_404() is fired before the profile-pages are build. the network administrator (or sub-sites) will be never redirected by NOBLOGREDIRECT, thats why the bug never happends when a network-admin clicks on a profile-link or when you’r running bbpress on a sub-site in your WP-network.

    More about the NOBLOGREDIRECT-fix (it also helps showing 404-errors): http://frumph.net/2010/06/05/wordpress-3-0-multisite-subdomain-installation-noblogredirect-behavior-fix/

    • This reply was modified 13 years, 11 months ago by Fuchsy.
    #115491
    Aron Prins
    Participant

    shineonscotland,

    Please describe the errors you’re encountering and the community would be able to help you 😉
    Answer these questions:
    What WP Version?
    What BB Version?
    Did you do anything before the errors started?
    Have you tried ”going” back and forth in your code/theme to see if changes might be the issue?

    Cheers,
    Aron

    Stephen Edgar
    Keymaster
    #bbpress-forums .status-closed,
    #bbpress-forums .status-closed a {
        color: #ccc;
    }
    

    Pretty easy to get this info from your browser developer tools, press F12 or right click the element and select ‘Inspect Element’

    #115459

    In reply to: CSS Style Issues

    kdude63
    Member

    Thanks!

    #bbpress-forums ul li { background: none; padding-left: 0px; margin-bottom: 0px; }

    I put that below the other line, and it works like a charm.

    #115454

    In reply to: CSS Style Issues

    Lynq
    Participant

    Tried something like this?

    .bbpress .post-entry ul li { background: none; padding-left: 0px; margin-bottom: 0px; }
    
    #115449
    kdude63
    Member

    .post-entry ul li{ background:url(images/ul-dot.png) no-repeat; padding-left:28px; margin-bottom:10px; }

    This one little line of code is making my bbPress forums look like crap.

    It’s difficult to explain, but you can look at my forums here and see how bullets are messing everything up. :/

    The Theme I’m using is leetpress.

    The Entire style.css is here.

    • This topic was modified 13 years, 11 months ago by kdude63.
    • This topic was modified 13 years, 11 months ago by kdude63.
    #115432
    jeffvand
    Participant

    Hey John, thanks for this. I was looking at those, particularly masonjames’ page here: https://codex.bbpress.org/theme-compatibility/

    Do I need to do something to activate it to look for these things? I tried another test by moving the page-front-topics.php from the extras folder to the root of my theme, but no edits I do to that file seem to change the /topics/ page layout (which I’m assuming is that page… but perhaps I am wrong there).

    Is there a list anywhere of what files control what layout’s? That might be helpful to make sure I am at least editing the right pages… 🙂

    Thanks for your help!

    #115428

    Some helpful docs to get you started.

    https://codex.bbpress.org/component/theme/

    iamzippy
    Member

    Congrats on the 2.1 update, it rocks. But I do have one minor needle request to make concerning the exposure of user bio information. Even when there is none.

    The Symptom:

    enter image description here

    “Hey Admin dude, I may be incognito and unremarkable, but why draw attention to me like this?”

    Cause:

    Not checking if the description field in the user profile is empty (user-details.php).

    Twentyten’s native bio box code is wrapped in a conditional that calls a hookable function, get_the_author_meta( ‘description’ ). Twentyten defaults to skipping the bio box completely if the user profile ‘description’ field is empty (on both single posts and author archives).
    And thanks to the hook, the author of a child theme can also prevent display of this stuff based on any criteria they choose — like, author bio info is shared with logged-in users only.

    The bbPress function bbp_get_displayed_user_field() isn’t currently hookable :(, but this whole thing is fixable with 3 or 4 lines of code in a couple of files. It’s not so much a bug as a lapse in coding consistency. Whatever, it’s busting my chops right now. If I didn’t know better, I’d ask for my money back 😉

    Could this be put right in the next update? Makes for better consistency with WordPress, imho 🙂

    Meanwhile, in other bbPress core-hacking news…

    ‘I also have a needle about the way author URL construction is similarly unhookable, but that’s for another thread’

    #115415
    vmodha
    Member

    I dont know why but the first line is missing in the above code?

    $querystr = "
    
    #115414
    vmodha
    Member

    Solved!

    SELECT * FROM $wpdb->posts
    LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
    LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
    WHERE $wpdb->posts.post_type = 'forum'
    AND $wpdb->posts.post_status = 'publish'
    AND $wpdb->postmeta.meta_key = '_bbp_topic_count'
    ORDER BY $wpdb->postmeta.meta_value DESC
    LIMIT 100
    ";
    
    $forum_posts = $wpdb->get_results($querystr, OBJECT);
    
    
    if ($forum_posts)
    {
        global $post;
    
        foreach ($forum_posts as $post)
        {
            setup_postdata($post);
            bbp_forum_title();
            the_content();
        }
    
    #115403

    Ideally, theme authors should update their themes for the latest version of bbPress. In bbPress 2.1, the $bbp global was replaced with a function call to bbpress(). The snippet of code above is recreating the global that 2.1 eliminated the need for.

    #115402
    jmm7574
    Participant

    Hello …

    I’m using a theme called cheerapp that I purchased from Theme Forest. It has bbpress integrated. When I upgraded to bbpress 2.1, I received a fatal error: “Call to undefined function royal_login() in /wp-content/themes/cheerapp/header.php on line 69”

    I found a comment on the theme’s support page from another user saying that he tweaked the functions.php to look like this:

    if ( function_exists( 'bbpress' ) ) {
       $bbp = bbpress();
    

    He mentioned that it had to do with the change from $bbp to bbpress().

    This change got rid of my fatal error, but since then, whenever I try to click on a forum, it gives me a 404 error. The forums are there in my WordPress admin and it’s pointing to the correct URL, but I’m still getting these page not found errors.

    I’m not sure if this is an issue with my theme or an issue with bbPress. I’ve tried to contact the theme creator but he is apparently on some extended vacation or something and isn’t responding to questions, and I’d really like to get my forums up and running again.

    Any suggestions? Is there anything inherently bad with the tweak to the code I posted above? Any idea what could be causing those 404 errors?

    Thanks in advance for any help you may have … Matt

    #115391
    matt_sich
    Member

    Hey! I got it to work! I just made a custom plugin with the BBP_Default class that you had in those public functions and just changed

    $r = bbp_parse_args( $args, $defaults, 'list_forums' );
    

    to

    $r = wp_parse_args( $args, $defaults, 'list_forums' );
    

    to make it work with the wordpress plugin version of bbp.

    You should definitely submit this as a plugin!

    #115387
    Lynq
    Participant

    No you will never need to touch the core code.

    You put these functions inside bbpress-functions.php then you can call these functions inside your template files. like: BBP_Default::custom_bbp_list_forums();

    Inside loop-forum-single.php you change where it is calling the function to the new custom function.

    If you need any more help let me know, good luck!

    #115384
    billa3
    Member

    I’m using bbpress 1.1. I want to get the author profile link in the front page inside the latest topics loop. I’m using topic_author(); but it returns only the author name, not the profile link.
    Following returns the profile link in the single post, but it does not display in the frontpage. post_author_title_link();
    Please help.

    #115355
    csk
    Participant

    http://codex.bbpress.org/step-by-step-guide-to-creating-a-custom-bbpress-theme/

    I followed the steps exactly from the link above but any changes I make to my my bbPress child theme don’t seem to work.

    I have a copy of the files from the twenty-ten theme placed in a new folder inside my template’s child theme. Is there anything else I need to do besides what was mentioned in the link above?

    • This topic was modified 13 years, 11 months ago by csk.
    Jeff
    Member

    I am using:
    Wordpress Version 3.4.1
    bbPress Version 2.1
    BuddyPress Version 1.5.6
    Tersus Theme Version 1.3 (http://themeforest.net/item/tersus-responsive-wordpress-theme/2343187)

    I created a new Group, and then posted a new topic in that group. This is where the error is being thrown.

    Here is a screenshot of what’s happening http://screencast.com/t/ZU0ohu061o4Q

    Error says:

    Fatal error: Call to undefined method stdClass::have_posts() in /home/…/…/wp-content/plugins/bbpress/bbp-includes/bbp-reply-template.php on line 168
    

    Notice also, that the page title being displayed is from one of the WordPress posts that came with auto-importing dummy data for the theme.

    I know a link to the site would help, but I am working with a client who’s not comfortable getting the link out before site-live time. So, sorry about that.

    I asked for help from WordPress Forum support, and was told that this was most probably a theme compatibility issue. So I went to the theme’s support forum.

    Last night, the theme’s author/s were helpful enough to guide me through what I assume are the usual stuff in troubleshooting this kind of stuff.

    Here are the things I’ve done so far:
    1. Disabled all plugins apart from bbPress – this resulted to the forum giving me a 404
    2. Enabled BuddyPress – this brought back the forums, but with the same issue
    3. Emptied all sidebar widgets that have to do with the theme.
    4. Used the other theme package (bbPress Twenty Ten).
    5. Deleted the function referenced in the error. Led to some new error. This was a desperate, illogical attempt on my part so i undid that.
    6. Deleted the wordpress post being shown in the page title. It just displayed the title of the next wordpress post in line.
    Note: every time i check to see if that fixed it, i do a clear-cache-reload, just so i’m sure nothing in cache was giving me this headache.

    I really hope someone could help out.. Has anyone seen this kind of error ever been documented elsewhere?

    #115336
    Lynq
    Participant

    I am still thinking your bbpress.css file seems a little short, where did that initially come from?

    #115323
    Prometheus Fire
    Participant

    If this has been answered somewhere, please point me to it, but is there a video solution for BBPress.

    Since topics and replies are just custom post types, I thought oembed would work in them, but it doesn’t seem to. I’ve followed both rules for posting a video in a blog post (url on a line by itself, or surrounded by the embed shortcode) and it does nothing.

    Is there a plugin solution for this? Or is it already builtin and I’m just suffering from a plugin conflict?

    #115316
    Bookkus
    Member

    I tried deactivating plug-ins to no effect. Any other ideas?

    #115311
    AAShepAA
    Participant

    I am using a child theme and have added a few things to that theme’s CSS. I was thrying to add a backbround to the widgets in the sidebar. This code works, but there has to be a better way than having to do this for every widget:

    div#content
    {
    background: url(images/background.gif) left top repeat;
    }
    div#theme-my-login-5
    {
    background: url(images/background.gif) left top repeat;
    }
    div#loginwithajaxwidget-4
    {
    background: url(images/background.gif) left top repeat;
    }
    div#pm4wp-widget-5
    {
    background: url(images/background.gif) left top repeat;
    }
    div#useronline-6
    {
    background: url(images/background.gif) left top repeat;
    }
    div#eshopw_cart-3
    {
    background: url(images/background.gif) left top repeat;
    }
    div#bbp_topics_widget-2
    {
    background: url(images/background.gif) left top repeat;
    }
    div#slideshow-7
    {
    background: url(images/background.gif) left top repeat;
    }

    #115306
    Martin
    Participant

    Thanks Lynq.
    Hmm, tried creating new topic twice in last 12 hours and they’ve failed to appear so no idea what’s going on on these forums.

    Anyway, slightly different question. Any idea what file and location I need to insert code into so that something appears after the Topic and before the reply? I want to start inserting Ads in that location using Simple Ad Manager and have a code snippet I need to insert.

    Paul Bearne
    Member

    Hi Guys

    I am the author who looks after http://wordpress.org/extend/plugins/author-avatars and I have been asked to add the option to link to bbpress profile verse the wordpress profile

    Got my bit working

    untill I got to here

    if (function_exists('bb_get_profile_link')) {
        $link = bb_get_profile_link('id='.strval($user->user_id));
    }
    

    and found that I am get “undefined function bb_get_profile_link()” as this is a post/page and not a bbpress page so my guess that bbpress code is not loaded.

    So what is the best way to get the profile URL / load this function?

    Many thanks

    Paul

    • This topic was modified 13 years, 12 months ago by Paul Bearne. Reason: typo
    • This topic was modified 13 years, 12 months ago by Paul Bearne.
    #115289
    Lynq
    Participant

    Hey guys, I have been debugging a few issues with these functions so I am going to link to each of the functions below in pastebin, should be pretty good to go for copying across I believe.

    Custom bbp_list_forums function. http://pastebin.com/GLhCHYze

    Custom last poster block for forums. http://pastebin.com/8K0pkKs5

    Custom last poster block for topics. http://pastebin.com/FGptZmiQ

    Hope this helps, it is a little clearer on pastebin currently, the code block on bbpress.org likes to change my code for me! :p If you find any issues let me know and I will try and update this topic, also I will get the updates onto my own site.

    Good luck!

    • This reply was modified 13 years, 12 months ago by Lynq.
    • This reply was modified 13 years, 12 months ago by Lynq.
Viewing 25 results - 15,776 through 15,800 (of 32,519 total)
Skip to toolbar