Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,551 through 12,575 (of 32,504 total)
  • Author
    Search Results
  • #142924
    traemccombs
    Participant

    Heh, stop being so awesome in your replies. 🙂

    Anyway, me, the non-coder, still doesn’t understand why it(bbpress plugin) can’t simply have an option to use styles from other themes. If nothing else, the CSS etc would be a nice “base” for things like link colors, font sizes, whatever.

    *sigh*

    I tried bbPress Tweaks. Meh.

    I’ll read the link you posted. Hopefully it doesn’t suck.

    bbPress has such a non-WP feel about it though in everything I’ve come to expect from WordPress. Part of it is my frustration with PHPBB, and part of it is my frustration with not being able to get a non-sucky looking forum with bbPress.

    And, I have yet to see a non-sucky bbPress based forum. Most are fairly crappy in how they present and deal with the content.

    Easy of me to throw stones in a glass house when I don’t code I guess. I just wish there were more sane defaults in bbPress that looked better out of the box.

    #142916
    Robin W
    Moderator

    bbPress by default tries to use your themes default templates as it’s base. So it is already using your theme’s page template, maybe not the particular one you’re after, but it will be for your theme, or one you have created.

    It will look for the following files in your theme in this order, and use that for it’s forums

    plugin-bbpress.php
    bbpress.php
    forums.php
    forum.php
    generic.php
    page.php
    single.php
    index.php

    See https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ for more detail and how to get it to use a particular template.

    Since some theme writers create a bbpress template, and some have variously named page templates, it would be kinder hard to get bbpress to work out which of your themes files are page templates, and which you want to use.

    Yes, getting the right template to display forums can involve you in renaming and moving some files, but that’s because you have decided to use a non-default theme (no criticism), and so your theme writer and the writers of bbpress would need to be telepathic to know how the other one is going to code. As I said some themes actively allow for bbpress, for others it is just one of thousand of plugins.

    The plugin bbPress Tweaks

    https://wordpress.org/plugins/bbpress-wp-tweaks/

    In dashboard>settings>bbpress tweaks allows you to select from available templates as a dropdown, so partly achieves what you are after.

    I fully appreciate that WordPress and plugins can cause a lot of frustration, and no you’re definitely not a troll (yet!), but less heaven and hell in your posts would be better!

    #142911
    Robin W
    Moderator

    Laurie,

    Would need some code to do this

    If you’re into coding, suggest you download

    https://wordpress.org/plugins/bbpress-notify/

    and crack open the code

    It should give you a good idea on how to create your own code.

    if not try putting it on wp-jobs

    http://jobs.wordpress.net/

    and see if someone will pick it up for you

    #142910

    In reply to: Freshness Date Format

    Robin W
    Moderator

    Stephen,

    Is there a quick and easy way to amend the headings other than amending the template?

    eg loop-topics.php has

    <ul class="forum-titles">
    ...
    ...
    <li class="bbp-topic-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></li>
    </ul>
    
    #142908

    In reply to: Freshness Date Format

    Robin W
    Moderator

    “Edit: That said, has anyone tried the code in the link you posted?”

    I’ve just loaded it and it seems to work fine

    function wpse_77441_change_time_format( $anchor, $forum_id )
    {
        $last_active = get_post_meta( $forum_id, '_bbp_last_active_time', true );
    
        if ( empty( $last_active ) ) {
            $reply_id = bbp_get_forum_last_reply_id( $forum_id );
    
            if ( !empty( $reply_id ) ) {
                $last_active = get_post_field( 'post_date', $reply_id );
            } else {
                $topic_id = bbp_get_forum_last_topic_id( $forum_id );
    
                if ( !empty( $topic_id ) ) {
                    $last_active = bbp_get_topic_last_active_time( $topic_id );
                }
            }
        }
    
          $date   = get_post_time( get_option( 'date_format' ), $gmt, $reply_id, true );
          $time   = get_post_time( get_option( 'time_format' ), $gmt, $reply_id, true );
          $dt = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );    
    
        $time_since = bbp_get_forum_last_active_time( $forum_id );
    
        return str_replace( "$time_since</a>", "$dt</a>", $anchor );
    }
    add_filter( 'bbp_get_forum_freshness_link', 'wpse_77441_change_time_format', 10, 2 );
    add_filter( 'bbp_get_topic_freshness_link', 'wpse_77441_change_time_format', 10, 2 );
    #142905
    Apokh
    Participant

    Hey there,
    can anyone tell me, what plugin (?) I need to show the infos displayed here within this forum beneath the Avatar? Lets say the @Name and perhaps the total postcount? Is it a plugin or will I need to customize the code files. If so, perhaps someone could tell me what files and perhaps how?!

    Best Regards

    #142904

    In reply to: Freshness Date Format

    Stephen Edgar
    Keymaster

    @synaptic It’s not always obvious but the links in your post that link to old discussions or sites (which I just edited) regarding the old ‘standalone’ bbPress and not the current bbPress v2.x plugin, circa anything over 2-3+ years of age won’t be relevant.

    As to meeting some kind of demand quota, bbPress v2.x Plugin is sitting at 1,125,146 downloads as I write this, so whatever the magical formula is it would appear it has not reached tipping point.

    Edit: That said, has anyone tried the code in the link you posted?
    http://wordpress.stackexchange.com/questions/77441/how-to-edit-bbp-forum-freshness-link-format

    #142901

    In reply to: Removing "Started by:"

    Robin W
    Moderator

    Ok, you need to do the following

    If you have a child theme, then do this in there

    If you don’t have a child theme, then seriously consider creating one, it’s very quick and easy, and will ensure that changes you make don’t get lost on theme or bbpress upgrades. Just google wordpress child theme videos and you’ll get lots of help.

    In your theme create a bbpress directory
    wp-content/themes/yourthemename/bbpress

    then copy

    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-topic.php to this directory so that you have
    wp-content/themes/yourthemename/bbpress/loop-single-topic.php

    Edit this file to delete line 60 which says

    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
    

    and save.

    bbPress will now use the file in your theme’s bbpress folder instead of the default, and you won’t lose your change on bbpress upgrades – but will it it is in your main theme, so if you don’t create a child theme, keep a note of what you changed, as if your theme updates, then you may/will lose the bbpress folder and file.

    #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

Viewing 25 results - 12,551 through 12,575 (of 32,504 total)
Skip to toolbar