Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,626 through 14,650 (of 32,503 total)
  • Author
    Search Results
  • Garindan
    Participant

    Sorry for the ambiguous title. I have bbpress on a site, using the compatibility theme. The rest of the forums have always worked correctly and apart from a few css tweaks, have always looked good and matched the theme.

    I recently noticed however, that the User Profile pages; profile, topics created, favourites etc, seem to ignore all the css and consequently have no layout/structure.

    Here is a normal forum page on the site… Forums
    The layout is correct, the sidebar is positioned correctly and has a PNG background creating the ‘shadow’. A title bar with page title is displayed below the header and navigation.

    Here is an example of a User Profile page… Topics Started
    There’s no css structure, the sidebar is at the bottom, there’s no PNG background behind the sidebar, theres no title bar and page title. It’s as if the CSS is being ignored.

    As another example, on this page I have added the code below to user-profile.php and the sidebar is correct, but it still has no background PNG, title bar etc… User Profile

    Any idea whats going on?

    `
    #sidebar { float: left; width: 230px !important; }
    #main { float: left; width: 730px !important; }
    `

    #126604
    AllenPayne
    Participant

    I have buddypress with bbpress installed on my site and i want to hide posts from certain forums from non-logged in users. I’ve tried using this code but it’s not working:

    http://pastebin.com/007KCExe

    I would really appreciate any help.

    Thank you.

    #126600
    m1000
    Participant

    Where it’s disabled? How to enable shortcodes again without using any extensions?

    #126596
    Stephen Edgar
    Keymaster

    Its your permalinks settings…. Check out how to set ‘pretty permalinks’ here: https://codex.wordpress.org/Using_Permalinks

    pdhuisman
    Participant

    Hi,

    I use this code for that:

    `.singular .entry-header, .singular .entry-content, .singular footer.entry-meta, .singular #comments-title {
    width: 100%;
    }`

    Looking at your site, that should work. I use the inspect element button in Chrome to find the item i want to change. Just fiddle a bit by turning things on and off until you find what you want to change and add code in your child theme. Almost anything can be done like colours, font size e.d.

    Great work on your site btw!.

    #126567

    In reply to: Where to edit textarea

    moonoi
    Participant

    It is in the template files `form_reply.php` and `form_topic.php`

    The line that calls the WP_Editor class to create the textarea using the relatively new WordPress core front end editor is this one:

    `bbp_the_content( array(‘context’ => ‘reply’)`

    You can look into the `bbp_the_content` function to see how BBP does it and how you can circumvent default behaviour.

    Notice that this line only applies if the fancy editor is enabled for the current user*. Otherwise the template file falls back to display the classical textarea (which is also the one used in this forum).

    *) It seems there’s a bug in BBP 2.2.4 making the fancy editor available only to the keymaster. This can be overridden in the code of course.

    #126556

    In reply to: Caching

    Stephen Edgar
    Keymaster

    I don’t see any problems there with the topic & reply I just created
    http://www.big-data-forum.org/?topic=via-netweb-bbpress-org

    A couple of things though… You may want to change your ‘permlink’ structure to use ‘pretty permalinks’ https://codex.wordpress.org/Using_Permalinks

    When you are trying to find a problem with your site try disabling all your plugins except bbPress and see if the problem still occurs, if it is fixed reenable each plugin one by one and check for the problem again to isolate if it is a plugin causing the problem.

    You should also test using the ‘Twenty Ten’ or ‘Twenty Twelve’ themes included with WordPress to make sure it is not an issue with the theme you are using.

    #126554
    Stephen Edgar
    Keymaster

    Start of with the docs here https://codex.bbpress.org/theme-compatibility/ and you should start looking at the files that contain ‘search’ in the filename.

    #126553
    Stephen Edgar
    Keymaster

    Here are some step by step instructions to add an item to your menu.
    And add http://example.com/forums as the link where you replace example.com with your domain name.

    https://codex.wordpress.org/Appearance_Menus_Screen#Custom_Links

    Big_Birtha
    Participant

    Great!

    It didn’t work initially, but when I changed .singular to .forum it worked (lucky hunch) as I knew I’d selected forum.php in BBPressWPTweaks to be the ‘forum wrapper’?

    The title (which I stupidly called a header in the last post) is still indented to the right, though, and the body (is that the right word?) of the forum stuff is still too far left. Any idea why they aren’t lining up with the first menu option, like they do on the other pages?

    http://bigbirthas.co.uk/forums/forum/forum/

    (don’t ask me why it’s forums/forum/forum… I haven’t a clue, and since it works, don’t care either!)

    I can live with it as it is (because I’ve tried writing adding some code to your last bit which made zero difference, and it’s already a vast improvement on what I had before!), but ideally I’d like both the title and the body to be in the same place as it is on the other pages (which have sidebar.php as their templates, if that helps).

    Thank you in advance if you can help – you’ve helped loads already!

    #126548
    Stephen Edgar
    Keymaster

    Here are some step by step instructions for what I mentioned above that hopefully will be a little clearer and the link you add would be http://example.com/forums where you replace example.com with your domain name.

    https://codex.wordpress.org/Appearance_Menus_Screen#Custom_Links

    pdhuisman
    Participant

    Hi,

    Glad to hear it worked. Add the code below, that should work.

    `.singular .hentry {
    border-bottom: medium none;
    padding: 0;
    position: relative;
    }`

    Big_Birtha
    Participant

    Hi,

    Thank you pdhuisman, that fixed that problem easily! I’d been messing around with all sorts of complicated code other people had suggested, which weren’t as succesful. Your code works a treat!

    I’d really like to know how to remove some space at the top, though.

    I’d like the formatting of the forum page to match that of the other pages. Currently the header (I think that’s what it’s called) is for some reason indented a bit and too low under the menu bar.

    I’m working with a child theme, but other than that I really don’t know a lot about what I’m doing.

    bigbirthas.co.uk

    dasped
    Participant

    Hi all,

    New install: WordPress 3.5.1 MU joint Network with x7 Mapped domains

    New install: Buddypress 1.6.4 Running all sites on Dynamix WP/BP theme

    New install: BBPress 2.2.4 With Network & Group forums configured.

    Buddypress has been installed ‘without’ the discussion forums tab enabled.

    <code>define( ‘BP_ENABLE_MULTIBLOG’, true );</code> Is located in wp-config.

    Other plugins installed all network enabled:  WP SEO (Yoast), WPMU Domain Mapping, Ultimate coming soon page & Join my multisite.

    Followed all Buddypress and BBPress latest instructions to the letter!

    I can create new forums, and group forums with no problems. All forums and groups are traceable throughout all MU sites with no problems and I have used bp-custom-php with;

    <code><?php

    /* This fixes the MULTIBLOG avatar problem */

    function nfm_bp_avtar_upload_path_correct($path){

    if ( bp_core_is_multisite() ){

    //   $path = ABSPATH . get_blog_option( BP_ROOT_BLOG, ‘upload_path’ );

    $path = ABSPATH . ‘wp-content/uploads/’;

    }

    return $path;

    }

    add_filter(‘bp_core_avatar_upload_path’, ‘nfm_bp_avtar_upload_path_correct’, 1);

     

    function nfm_bp_avatar_upload_url_correct($url){

    if ( bp_core_is_multisite() ){

    $url = get_blog_option( BP_ROOT_BLOG, ‘siteurl’ ) . “/wp-content/uploads”;

    }

    return $url;

    }

    add_filter(‘bp_core_avatar_url’, ‘nfm_bp_avatar_upload_url_correct’, 1);

    ?></code>

    To carry user and group avatars throughout all networks.

    Problem being, once a forum post is created I’ as keymaster cannot Edit, Close, Stick, Merge Trash or Spam “Any” forum posts. The page just refreshes without any actions taking place.

    I have read two other posts relating to this similar/same issue, one from over a year ago, and one from as little as two weeks ago, both without solution, one without any replies.

    Further to the above, I have noted that BBPress is not sending emails out on replies to forum posts with the Notify me of follow-up replies via email tab checked.

    I sincerely hope someone may be able to help shed some light on this issue as it is really going to render my project useless if I can’t manage to resolve it.

    I’m happy to offer a bbpress admin, administrative access to my site if they feel they may be able to assist in some way.

    Here’s hoping .. !

    Regards,

    Sped

     

    #126503
    Mitesh Patel
    Participant

    @pjtna and @sambora5150 : Lucky, you guys found me, (or viceversa :))

    I was looking to do exactly that. So here it is.

    The code should go in bbpress template file loop-single-reply.php, below the PHP code line that contains. The file is located in plugins > bbpress > templates > default > bbpress folder.

    `do_action( ‘bbp_theme_before_reply_author_admin_details’ )`
    Th actual code should be,
    `
    $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo “@”.$user_nicename;
    }
    `

    But you should never edit that file, as the changes will be lost when you upgrade bbpress plugin.

    So, copy the file and put it in your theme within a folder ‘bbpress’ (you will have to create that folder).

    You will also need to add the following line to your theme’s function.php

    add_theme_support(‘bbpress’);

    OR untested but simple method, add all of the following to the function.php of your theme.

    `function append_mention(){
    $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo “@”.$user_nicename;
    }
    }

    add_action(bbp_theme_before_reply_author_admin_details, append_mention);`

    #126488
    Sambora5150
    Participant

    Hi, i think this is the code  i have it from this other topic:

    How to display @username in bbPress?

     

    i don´t know where tu place it… can anyone help me?

    user = get_userdata( $user_id );
    if ( !empty( $user->user_nicename ) ) {
        $user_nicename = $user->user_nicename;
    }
    #126487
    jonte_linkan
    Participant

    I’ve spent lots and lots of time trying to make this work in Swedish. Finally I took @dykarna files and used them and then it worked. So my conlcusion is that there was something wrong with my .po & .mo files…

    Those files i downloaded from https://translate.wordpress.org/projects/bbpress/2.2.x but for some reason could not make it work.

    The solution proposals for this problem are scattered in different parts of this forum and I think not properly adressed by bbpress for the new versions as far as I see it.

    https://codex.bbpress.org/bbpress-in-your-language/ is of course explaining the way to do it but does not adress the possible .mo and .po problems, I think. I agree to what @dykarna have said:

    After having read this thread and I sit with the same problem. Then it would probably be appropriate to maybe get to a function so you can thru the admin panel choose which language you wish. Yes, and that all language files included with the package when installing bbPress.

    Or one might even in the admin panel to add a “upload” of language files so they end up where they should and is automatically activated .. yes I’ve seen it in Joomla but there is something quite different but the principle

    However, i’m very pleased that it works for me now. I just need to find the non-translated parts now…

    #126482
    Stephen Edgar
    Keymaster

    Most of what is mentioned above can now be found in the docs

    Codex

    #126481
    jimabshire
    Participant

    Ironically, the use I plan to make for bbPress is to create a model for “Living Documentation” as described in the book “Specification by Example” for various types of software projects.

    I am new to the Open Software model after having spent 30 odd years working within the “private” model. I see clear sustainability problems if users behave like typical users: demanding more and more from people who are being paid a fraction they are in the private model. Something has got to give. The proliferation of modules reflects current design methods of keeping each one fairly small/simple. The problem with that approach is that it indeed requires key overview docs including use of things like stepwise refinement and UML docs in order to obtain a cohesive grasp of the whole. As in baseball, “you can’t tell the players without a program!”

    wordpress at least has several “apparently good” books to explain the development paradigm. bbPress users are not so lucky.

    It is a very big job to create this very useful software and we should be more appreciative to those who have accepted this challenge – consider how long it would take any of us to write the volume of php code or even do the design work!

    I think Mr. Jacoby is correct – if everyone who ran down a problem bothered to leave a little “map” or narrative of his journey we might get a better picture of how this thing works. The only problem I see with that is too many requirements: 1) user has to be able to ferret out the problem; 2) user has to be correct; 3) user has to be able to write carefully. There may be others requirements as well.

    Ideally, we need better docs that reduce the abstractions presented to us in the form of raw code. It seems to me that the community needs to decide that bug fixes and new features should wait until the overall design can be made clear to nearly all of us.

    #126479

    In reply to: Forum Categories

    Stephen Edgar
    Keymaster

    For the first part of your question this is what bbPress does for ‘forum’ parents and should work fine, maybe some more tips from here will help.

    The second part regarding ‘section titles’ this is planned for a future release but for now you can use @lynq’s solution here.

    Lastly you would have to customize the \templates\default\bbpress\form-user-register.php template: https://codex.bbpress.org/theme-compatibility/

    #126474
    Stephen Edgar
    Keymaster

    Its all good, you will be able to update to 2.3 fine.

    Here’s some docs on how to get up and running with modified templates:
    https://codex.bbpress.org/theme-compatibility/

    And of course you could just start using the 2.3 beta now

    bbPress 2.3 Beta 2

    #126461
    golfer300
    Participant

    A few quick questions

    How can I create a forum that would be the main forum and have other forums be like sub-forums. I have tried using the parent forum feature but it does not do quite what I am looking for. For example, I would want it to look like this.

    Google
    -Android
    -Google Plus
    -Chrome

    Also, is it possible to create a title for a list of forums. For example,

    Main Forums
    Forum Title 1
    Forum Title 2
    Forum Title 3

    Other Forums
    Forum Title 4
    Forum Title 5

    Lastly, is it possible to change the required fields that are necessary for forum registration. (I am using the short code for registration)

    Any help is much appreciated.

    #126436
    Tanya
    Participant

    I am trying to add the username underneath a person’s avatar, like in these forums (circled in the pic above). I know where to add the code in loop-single-reply.php and I have tried looking in the beta release of bbPress 2.3 in case it was included there, but I am not having any luck.

    Would anyone know what code I would need to insert to bring up the username?

    #126433
    Sambora5150
    Participant

    Hello Foks


    @goodintoday
    or somebody else can tell me exactly the code and where to apply it to show the  @username with the creator of the post

    #126415
    nirzol
    Participant

    Thx Garindan 😀 ! I do it like that for the moment. But is not good to modify core :/

    Hope a nice solution will be find to that….

    or a solution for shortcode work with the default page forums ?

    thx

Viewing 25 results - 14,626 through 14,650 (of 32,503 total)
Skip to toolbar