Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,676 through 12,700 (of 32,521 total)
  • Author
    Search Results
  • #142490

    In reply to: css problem..

    Robin W
    Moderator

    take out the word div !

    .bbp-search-form {
    display:none !important;
    }
    
    #142488
    Robin W
    Moderator

    Great, glad to hear you’re fixed, and have just added the code to one of my forums. One of those moments when you see something and think “that looks better”!.

    #142480
    Robin W
    Moderator

    so the answer is

    function short_freshness_time( $output) {
    $output = preg_replace( '/, .*[^ago]/', ' ', $output );
    return $output;
    }
    add_filter( 'bbp_get_time_since', 'short_freshness_time' );
    add_filter('bp_core_time_since', 'short_freshness_time');

    Drop this into your functions file

    #142479
    Robin W
    Moderator

    Think it’s as simple as

    is_bbpress()

    so try

    <div class="breadcrumbs">
        if(function_exists('bcn_display') && is_bbpress())
    {
    bcn_display();
    }</div>
    
    

    Haven’t checked the syntax, I’ll let you do that

    #142473
    hitkid
    Participant

    thanks @robin-w !

    I’ve tried to use all the avatar functions found in the documentation in the wp_query(), but none are working. I’ve tried it locally with newer updates of buddypress/bbpress and live with a fresh install and nothing.

    This is the actual tag I want to use:
    <?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?>

    They work perfectly in the mychild/bbpress/loop-single-topic.php , but I just can not get it to work in the query! Is there anything I am missing, or doing wrong?

    Thanks for the help!

    #142469
    boriskamp1991
    Participant

    Ok,thanks for that!

    I need to add this code somewhere:

    <div class="breadcrumbs">
        <?php if(function_exists('bcn_display'))
        {
            bcn_display();
        }?>
    </div>

    It is for displaying the breadcrumbs.
    When I add it to header.php in my theme, the breadcrumbs appear on allll my pages. I dont want that, I want them ONLY on forum related pages, how can I achieve this?

    #142468
    Peter J. Herrel
    Participant

    Bumped into this while developing locally, a solution is to filter the requested url in bbp_verify_nonce_request:

    
    add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 );
    function my_bbp_verify_nonce_request_url( $requested_url )
    {
        return 'http://localhost:8888' . $_SERVER['REQUEST_URI'];
    }
    
    #142464
    virusek89
    Participant

    bbp_get_time_since

    I found it in these files

    bbpress\includes\topics\template-tags.php
    bbpress\includes\replies\template-tags.php
    bbpress\includes\forums\template-tags.php
    bbpress\includes\common\widgets.php
    bbpress\includes\common\functions.php

    Now what I need to edit to remove the rest of the decimal?

    I want to ask because I am a beginner in php

    #142460

    You’ll want to filter the output of bbp_get_time_since; it’s the function responsible for humanizing timestamps. You’ll probably want to perform a string replacement starting at the comma, and append your own ‘ago’ at the end.

    #142459

    Topic: css problem..

    in forum Troubleshooting
    David2013
    Participant

    Hi i just dont know whats wrong…

    when i work with firebug on css for forum page is ok but when i add to do css wont work…

    #bbp-search-form div {
        display: none !important;
    }

    is format type wrong?

    Thanks, David

    KostRev
    Participant

    Thanks. I sort of figured that out after removing my custom templates. Not sure where I got the code for form-topic.php because it was very different from the default and that made the difference.

    Thanks for the tip on the shortcode. That alone would have helped some of my troubleshooting.

    #142443

    In reply to: Translate to Swedish

    Stephen Edgar
    Keymaster

    You want to use the /dev branch of both projects:

    https://translate.wordpress.org/projects/bbpress/dev/sv/default
    https://translate.wordpress.org/projects/buddypress/dev/sv/default

    On each of the above pages select ‘.mo’ from the dropdown at the bottom of the page and click export.

    Rename each file to buddypress-sv.mo & bbpress-sv.mo

    The extra instructions on the BuddyPress site might also help, I’ll try to get the bbPress updated soon also.

    https://codex.buddypress.org/developer/translations/

    Robin W
    Moderator

    I thought that’s what it did in default mode.

    If you are using shortcodes, then you have options

    [bbp-topic-form] – Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.
    [bbp-topic-form forum_id=$forum_id] – Display the ‘New Topic Form’ for a specific forum ID.

    Otherwise come back with a url where this isn’t happening

    #142439

    In reply to: LABELS

    Robin W
    Moderator

    yes,

    Dashboard>settings>forums>forum root slug to change the urls and breadcrumbs – just change forums to what you want it to say

    Tp change the forum heading on the forums list, make a copy of

    wp-content/plugins/bbpress/templates/default/bbpress/loop-forums.php

    and place this in a folder

    /wp-content/themes/%your-theme%/bbpress/

    see https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-3/ for a tutorial on this subject

    Then edit line line 19 which says

    <li class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></li>
    

    to

    <li class="bbp-forum-info"><?php _e( 'Elephant', 'bbpress' ); ?></li>
    

    and it will say elephant instead of forum.

    #142438
    Robin W
    Moderator

    you can use the following shortcodes in a page or post

    [bbp-topic-form]
    Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.

    [bbp-topic-form forum_id=$forum_id]
    Display the ‘New Topic Form’ for a specific forum ID.

    #142437

    In reply to: Forum Index Scrunched

    Robin W
    Moderator

    ‘Thats the odd part, they are both using the default…and switching between the various different templates doesn’t seem to modify it. The theme has an internal setting that allows you to dictate how many ‘columns’ are shown. I can get it to show full page if I switch that around, but then my article page is also shown full (one column) I’m looking at the code further to try and figure out how to isolate one from the other’

    Think that’s the route to go.

    bbPress looks at the root of your theme for “bbpress.php” as a page template. if it doesn’t find it, it’ll use your themes “page.php”.

    It sounds like your “page.php” page (whatever it’s called), has a parameter to set the columns, so within this they’ll be an “if” statement which is setting this.

    What I think you need to do is as suggested in my first post. Copt the page file and call it “bbpress.php”. You should be able to find in that file where it is using the setting to create the columns and take this out. Alternately look in the twentyfourteen theme for the full page template and compare this to your file. You should be able to cobble the two together to get it to work.

    If none of that works, (or alternately!) contact the theme developer to see if they have a solution.

    #142436

    In reply to: Form To Forum Post

    Robin W
    Moderator

    Suspect that there are values in a “forum” post that you need to populate.

    I suspect (but don’t know) that the forum will be a category, and the topics will be posts. Therefore you need to link your topic to it’s forum so need to link the post to it’s category.

    Try searching round phrases such as “wordpress post category in database” which got me a bunch of articles eg

    http://stackoverflow.com/questions/2848505/how-does-wordpress-link-posts-to-categories-in-its-database.

    ‘I guess the developers don’t visit their own forum anymore?’ – sounds critical, the developers are busy developing – remember this is all free stuff, and no-one pays their, or indeed my time to do this. They do regularly visit, but I would not expect to get a load of development advice for free to do something that is not in significant demand. Even writing this took ten minutes !

    I hope you find a solution, and in the spirit of free open source, post the solution when you get it. I’ll add it to the codex, so that others can benefit.

    Regards

    Robin

    #142435
    Stephen Edgar
    Keymaster

    I haven’t seen any integration with Zendesk but checkout this awesome tutorial by @mordauk (@pippinsplugins)

    http://code.tutsplus.com/tutorials/using-bbpress-as-a-support-forum–wp-28877

    #142434
    Stephen Edgar
    Keymaster

    You would need to make some custom templates

    See https://codex.bbpress.org/theme-compatibility/

    And there are a few other docs here https://codex.bbpress.org/

    #142432

    In reply to: Translate to Swedish

    Stephen Edgar
    Keymaster

    See this https://codex.bbpress.org/bbpress-in-your-language/

    It’s the same process for both bbPress & BuddyPress

    #142430
    jslom
    Participant

    Hello,

    I am using the shortcode [bbp-topic-form forum_id=599] to display a form that will post to forum id 599.

    I noticed the shortcode is using the form-topic.php template file to output.

    What I want to do is have it use a modified version of the form-topic.php template file, but only for the shortcode.

    How can I achieve this?

    Thanks!

    #142429

    In reply to: Forum Index Scrunched

    thefruitnation
    Participant

    So I’ve found its specific to the url.. if its
    http://www.thefruitnation.com/forums/

    It scrunches it up

    Anything else like http://www.thefruitnation.com/forums1/ keeps it full width

    I’m sure this has to do with the

    Forum Root Slug

    as it is set to ‘forums’ I just cant figure out how its correlated

    I guess I can get around this by changing the page that I use the shortcode for index on to not share the same forums slug.. I thought this was needed, but perhaps thats my problem? Should it matter or any insight if this would effect url building/seo

    #142427

    In reply to: Forum Index Scrunched

    thefruitnation
    Participant

    Thats the odd part, they are both using the default…and switching between the various different templates doesn’t seem to modify it. The theme has an internal setting that allows you to dictate how many ‘columns’ are shown. I can get it to show full page if I switch that around, but then my article page is also shown full (one column) I’m looking at the code further to try and figure out how to isolate one from the other

    #142424

    In reply to: Form To Forum Post

    jslom
    Participant
    $sql="INSERT INTO wp_posts (post_type, post_parent, post_title, post_content, post_author)
    VALUES
    ('$_POST[forum]','$_POST[forumid]','$_POST[1]','$_POST[2]','$_POST[3]')";

    This is the code im using to get my form to post to the db, and it still does not create the topic even though it populates

    #142412
    barnabe
    Participant

    But with this code, when there is an error (like username already exists), the redirect is not effective.

    This excellent tutorial helped me to fix that : Redirect to custom page after login or register fails

Viewing 25 results - 12,676 through 12,700 (of 32,521 total)
Skip to toolbar