Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,576 through 12,600 (of 32,521 total)
  • Author
    Search Results
  • #142899
    Robin W
    Moderator

    ok, then as before I’d suggest you go to yoothemes for support.

    It may be as simple as changing the page template that bbpress is using

    https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ section 8

    #142898
    Robin W
    Moderator

    It actually is not displaying any of your replies correctly, they are not aligned as the topic is.

    I think the culprit is two lines of code in your style sheet
    From style line 1659

    From style line 1658
    .reply {
    float: right;
    }

    .reply a {
    float: right;
    font-size: 13px;
    line-height: 22px;
    }

    Altering reply to float left and reply a to float none seems to fix it.

    But it could be that these are being used elsewhere, so just have a look around you site afterwards to check that this hasn’t altered something else.

    #142896
    Robin W
    Moderator

    John, really pleased that you tracked it down, and yes I’ll add it to the styling crib when I get a moment ! Often I spend hours searching for the wrong thing, the solutions here are often easy and obvious but only after you have worked them out !

    The code

    #bbpress-forums ul.bbp-threaded-replies{margin-left:25px;}
    

    is exactly the same as

    #bbpress-forums ul.bbp-threaded-replies {
     margin-left: 25px;
     }
    

    The computer simply ignores gaps, and coders only write it that latter way to make it easier to read.

    You ought to start using a child theme if you haven’t already got one. (just google child theme video, and you’ll get lots of help). it’s very quick and simple and does not affect you main theme, just allows you to add without losing on updates. Then you would create a directory in that called
    css viz wp-content/themes/yourchildthemename/css and copy your amended bbpress.css file into that. bbPress will then use that, and you won’t lose changes.

    Great that you’re fixed !

    #142892
    crzyhrse
    Participant

    Got it..!

    I’t’s like going on an easter egg hunt and actually finding a real egg… πŸ™‚

    I measured the offset with a little pixel yardstick that plugs into Chrome, got 50px and searched the bbpress directory for that, and found this in the bbpress.css you pointed me to above:

    #bbpress-forums ul.bbp-threaded-replies {
    	margin-left: 50px;
    }

    changed that to:

    #bbpress-forums ul.bbp-threaded-replies {
    	margin-left: 25px;
    }

    Put it into the theme’s child with the other bbpress css changes I have there, and it worked… Perfectly… Hoping it might be helpful for others, or in your crib, Robin..?

    Curiously, in searching also found:

    in both of these-
    bbpress-rtl.css
    bbpress-rtl.min.css
    this
    #bbpress-forums ul.bbp-threaded-replies{margin-right:50px}

    and in this-
    bbpress.min.css
    this
    #bbpress-forums ul.bbp-threaded-replies{margin-left:50px}

    All of which looks like no css I’ve seen, in each file one very, very, very long continuous line of code … Am wondering if there is effect from the above for other sorts of screens or browsers, or something..? If I changed these to 25px I’d likely do it directly in the files in the bbpress directory, and keep a record for bbpress updates…

    Leaving it alone for now, but in case someone looks in here and has any thoughts..?

    John.

    #142891
    crzyhrse
    Participant

    Thanks Robin and hi again… πŸ™‚

    That doesn’t find anything that seems to pertain, plenty of padding in the normal sense for various aspects of replies… And pertaining to replies is what I’m looking for because that is where the nesting (offsetting? indenting?) or threading occurs, per the Reply threading setting in the forum settings section of the Admin settings section…

    I’ve searched through directories everywhere that made sense, php and css, for terms like nest, thread, indent, offset… found nothing… It would need to be some sort of code that recognized whether it was a first, second or third reply, etc, and also somehow say how much to indent… It would also seem to need to some way be affected by the setting for it, as mentioned above…

    I was kinda hoping to maybe attract John James Jacoby’s attention on this, noticing how much he seems to know in the various support areas I’ve looked over time..?

    This would seem to be something that would be helpful to others as well..? The default indent distance I believe is much more than is needed to show nesting, and the less it indents the less the following indents will be crowded to the right, don’t know but maybe even get cut off…?

    Thanks… It is nice when someone replies, doesn’t always happen… πŸ™‚

    John.

    #142888
    rmilne
    Participant

    I’m going bananas trying to get bbpress to put comments on the forum with the newest first instead of last and making everyone scroll to the bottom of the page. The only thing I can find is an article more than 3 years ago that has files that don’t look like what i see. Help! this surely can’t be the first time someone has brought this up. Or maybe there is some blatantly obvious setting i’m missing.

    This is the article I speak of that says just change some code from ASC to DECS but i don’t see that anywhere in the current file structure.

    Making the newest posts show up first

    #142881

    In reply to: How to users LOGOUT?

    Robin W
    Moderator

    In fact just done it

    Layout and functionality – Examples you can use

    item 12

    have a look

    #142878
    Robin W
    Moderator

    couldn’t where ‘dashcamtest.de’ was in your example.

    The code is in loop-single-reply, which should show the title using line 22

    #142873
    Kris35
    Participant

    Thanks for the code dzpoa. Has anyone else tried it? I haven’t had any problems since but thats because (I think) I’ve taken out my members ability to correct their posts. I daren’t go in and edit any myself but luckily I haven’t had to yet.

    #142868
    Robin W
    Moderator

    Try

    Step by step guide to setting up a bbPress forum – part 4

    The actions are used in the templates held in

    wp-content/plugins/bbpress/templates/default/bbpress/

    #142867

    In reply to: How to users LOGOUT?

    Robin W
    Moderator

    There’s some code in the documentation to add a Login/Logout to the menu

    see

    Layout and functionality – Examples you can use

    item 11.

    I am documenting a ‘modal’ (popup) login to add in a few days.

    #142863
    aravindbachu
    Participant

    and robin, it is taking rather long time to open the edit page after clicking the edit button. Is that a problem from my webhost or the code?

    #142860
    Lynqoid
    Participant

    This is what you will need to use to actually add a class to the body class. You could look at getting the post by the get_queried_object(); function in WordPress and then getting the title of that object. After that you could then use the sanitize_title_with_dashes($forum_title); to get a safe class name.

    Please note I haven’t fully tested the code below and i’m not sure the $forum_object->post_title; will work but it get’s you moving in the right direction πŸ™‚

    
    <?php
    $forum_object = get_queried_object();
    $forum_title = $forum_object->post_title;
    $forum_class = sanitize_title_with_dashes($forum_title);
    ?>
    <body <?php body_class($forum_class); ?>>
    

    Good luck!

    #142856
    Rackmire
    Participant

    Hi,

    I’m trying to build a theme for my BBpress site and I would like to add a class to my body tag that changes depending on where the user is within the forum but only for within a forum area.

    For instance… On my BBpress installation, if I have these forums:

    • Green
    • Red
    • Blue
    • Yellow

    If the user view topics within the ‘Green’ forum/sub-forum it add the classname ‘green’ to the body tag i.e “<body class=”green”>” I would like it to use the Forum’s title that is set. Can somebody help?

    Preferably the code to be in functions.php or header.php / bbpress theme files. I don’t want to hack the bbpress core files.

    I want to do this so I can change the way it looks i.e background colour etc.

    And the Homepage stays the same: <body> (with no classname unelss set within the header.php of the theme file.

    Thanks

    #142853

    In reply to: How to users LOGOUT?

    Lynqoid
    Participant

    You can use the wp_logout_url.
    https://codex.wordpress.org/Function_Reference/wp_logout_url

    <a href="<?php echo wp_logout_url(); ?>">Logout</a>

    Good luck!

    #142838
    FLIXALMedia
    Participant

    Hi there
    Im just getting to grips with bbpress and Buddypress but I cannot see anywhere my users are able to logout? Is there a shortcode I can put in a separate page?
    Very confused
    Thank you
    Lucy

    #142835
    nicmare
    Participant

    sure. just add the following code to your theme’s functions.php:

    function add_extra_contactmethod( $contactmethods ) {
        // Add new ones
        $contactmethods['twitter'] = 'Twitter';
        $contactmethods['facebook'] = 'Facebook';
        $contactmethods['googleplus'] = 'Google Plus';
        $contactmethods['youtube'] = 'Youtube Kanal';
    
        // remove unwanted
        unset($contactmethods['aim']);
        unset($contactmethods['jabber']);
        unset($contactmethods['yim']);
    
        return $contactmethods;
    }
    add_filter('user_contactmethods', 'add_extra_contactmethod');

    this removes “aim, jabber and yim” but adds twitter, facebook, yt and googleplus

    #142828
    Robin W
    Moderator

    Think you probably need to crack open the plugin, and see where GD bbPress Attachments is adding a filter, and exactly what code it is using. You might then be able to mod this in your loop to re-strip it out.

    #142826
    Robin W
    Moderator

    No problem. Just a quick thought, as I might be able to solve it a different way.

    Are you using a page called forums and the shortcode [bbp-forum-index]

    or did it just come sup in your menu when you installed it?

    It’s Ok, neither is wrong, I just need to know which !

    ie which in section 3 of the attached did you do

    Step by step guide to setting up a bbPress forum – Part 1

    #142825
    crzyhrse
    Participant

    It occurs to me to add that I’m nearly illiterate when it comes to code so including the code I’m looking for and what I would want to change would be helpful… Thanks…

    #142817
    e11eca
    Participant

    Hello!

    I’m having an issue with bbPress 2.5.3, Slider Revolution 4.0.5, and Woocommerce 2.1.2. I contacted Slider Revolution, and they said they couldn’t figure out the issue and that I should contact my theme creator since their plugin came bundled with my theme, but the theme creator says it isn’t a theme issue, so I’m reaching out to bbPress since the Woocommerce help desk is down for the weekend in hopes I can at least get a leg up – even though it’s a pretty weird triple-plugin conflict.

    1. When all plugins are activated, layer styles in Revolution Slider’s slide editor show a tiny white font in all the previews, but only generate default dark text.

    2. When all plugins are activated, I cannot add a slider to a page where bbPress forums are active – it just doesn’t appear, even when I have disabled the theme’s default header, or tried to insert it via shortcodes or php. (Any other page and the slider loads fine)

    3. When I deactivate bbPress and its associated plugins, the slider loads correctly because there is no forum on the page.

    4. When bbPress and Woocommerce are both deactivated, everything works as it is supposed to in the editor as well.

    Existing sliders on the website still load correctly – it’s just an issue of making new ones with a forum on the same page, and getting the editor to work. bbPress prevents a slider created in the Slider Revolution plugin from being published on a page with a forum, and Woocommerce messes up the editor.

    Any help or ideas are appreciated. I’ve tried the troubleshooting options in the plugins and nothing seems to fix the issue. Thanks!

    #142813
    Josh
    Participant

    What is the best way to get the content of a reply? Right now I’m using bbp_get_reply_content() and it was working fine until I added the GD bbPress Attachments plugin. Somehow that plugin is adding text to the end of the reply content, which doesn’t show up in the forums itself but does show up in a custom forum loop I have on my homepage. E.g replies look like this: “Lorem ipsum etc. Attachments: [delete | detach] [delete | detach] [delete | detach].” FYI, I’m using wp_trim_words to only get the first 30 or so words of the reply, so this garbage text from the plugin only appears on very short replies.

    Is there a different way to get the reply text? Anybody else have this issue with the attachment plugin?

    Thanks.

    #142800
    Robin W
    Moderator

    @netweb Stephen, Thanks for this, and having now looked at the trac ticket and bbp_parse_args function I see how this works.


    @nicmare

    Wherever you see bbp_parse_args, there’s a filter for the function to do this.

    bbp_parse_args has the format

    function bbp_parse_args( $args, $defaults = array(), $filter_key = '' )
    

    The resultant filter name is made up of bbp_before_’ . $filter_key . ‘_parse_args’

    (there is an bbp_after one as well!)

    The filter key is the third argument in the bbp_parse_args

    $r = bbp_parse_args( $args, array(
    		'before'            => '<ul class="bbp-forums-list">',
    		'after'             => '</ul>',
    		'link_before'       => '',
    		'link_after'        => '',
    		'count_before'      => '<span>',
    		'count_after'       => '</span>',
    		'count_sep'         => '</span><span>',
    		'separator'         => '',
    		'forum_id'          => '',
    		'show_topic_count'  => true,
    		'show_reply_count'  => true,
    	), 'list_forums' );

    so ‘list_fourms’ in the last line is the third argument.

    This should help you for the other two functions, as filters will then be obvious !

    #142798
    Stephen Edgar
    Keymaster

    @nicmare To remove the separator:

    add_filter('bbp_before_list_forums_parse_args', 'nicmare_bbpress_list_forums' );
    function nicmare_bbpress_list_forums() {
    	$args['separator']        = '';
    	return $args;
    }
    

    A good explanation for bbp_get_topic_admin_links and bbp_get_reply_admin_links is here:

    Could a plugin developer protect his functions?

    #142797

    In reply to: How to filter an array

    Stephen Edgar
    Keymaster

    This is what you want for the above:

    function hide_forum_counts() {
            $args['show_topic_count'] = false;
            $args['show_reply_count'] = false;
            $args['separator']        = ' '; 
            return $args;
    }
    add_filter('bbp_before_list_forums_parse_args', 'hide_forum_counts' );
    

    A full example of all the bbp_list_forums arguments to use either in a custom function or a plugin https://gist.github.com/ntwb/3797945

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