Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 14,676 through 14,700 (of 32,519 total)
  • Author
    Search Results
  • #126317
    aberglas
    Participant

    I’m not saying there is anything wrong with the members plugin, I just have not needed it. Like you I prefer code as I need to support multiple sites. And looking in the actual DB tends to provide a more reliable view of what is really going on.

    The original post of this topic could do with some clarification though, and then put up as proper bbPress doc.

    Anthony

    #126316
    moonoi
    Participant

    @aberglas Thanks for clearing up about WP not storing caps directly on users. I must have misread that somewhere.

    Anyway, you say that you haven’t used the Members plugin. Personally I try to avoid using the UI for any configuration (prefer to modify things with code). But the Members plugin is invaluable, and it really should be part of core. – Along with that fix to allow saving multiple roles. 🙂

    Patrick

    It’s a bit more complicated than a filter toggle I believe.

    Check out https://codex.wordpress.org/Roles_and_Capabilities

    By default only Author roles and above have the ability to upload files, and that’s for security reasons so that’s probably a good thing.

    You can tweak your roles to change the ability to upload files, but at the moment it’s a little messy. Another issue is if you want to let all your users upload files.

    If you are just looking for images there is a bbPress attachment plugin in the .org repo that can handle that without having to mess with all the user stuff.

    #126302
    xmasons
    Participant

    So here’s my solution.

    1.) Create a page template.

    2.) Using the power of current_user_can(), we may utilize the bbPress’s user roles.

    3.) Insert the Topic Index shortcode with the do_shortcode() function inside the user role wrapper.

    #126296

    In reply to: Only Visual editor?

    Debra
    Participant

    I’m no expert, so take this for what it’s worth and research further …
    Here’s the code I found that seems to work. Have not fully tested. Would appreciate any feedback from someone with more experience.

    In form-reply.php
    Find bbp_the_content( array( ‘context’ => ‘reply’ … and change line to
    ` ‘reply’, ‘quicktags’ => false ) ); ?>`

    In form-topic.php
    Find bbp_the_content( array( ‘context’ => ‘topic’ … and change line to
    ` ‘topic’, ‘quicktags’ => false ) ); ?>`

    moonoi
    Participant

    I have a few questions that I was hoping one of the bbPress developers would be able to give me a quick hint about offhand.

    I’m getting results that leave me completely puzzled, as I try to hook into or directly modify the `bbp_get_caps_for_role()` function in `/core/capabilities.php`.

    The `bbp_get_caps_for_role` filter
    My purpose is to try and return an array with true on all caps for any role, because I need to find out why only the keymaster gets to upload images.

    My first attempt is just to use the `’bbp_get_caps_for_role’` filter provided by the function. This is where the mysterious stuff starts…

    I can add the filter, and when I check the `$wp_filters` global afterwards, I can verify that the filter has been added correctly. However it doesn’t fire. When I check the `$wp_filters` array inside the `bbp_get_caps_for_role()` function, just before the hook is applied, my filter has vanished. So somewhere there must be a function removing my filter. But where, and why!?

    Testing by returning the `$caps` array with all caps set to `true`
    So giving up on the filter for now, I simply try to hardcode the all-true `$caps` array directly into the `bbp_get_caps_for_role()` function and returns this, regardless of role. What then happens is even weirder. – Now my user can not even post a reply in the forum.

    How can setting all caps to true end up giving my user less rights in the forum?!

    Thanks in advance guys!

    For reference, here is the bottom part of my hacked `bbp_get_caps_for_role()` function:
    `

    ‘assign_topic_tags’ => true,
    );

    break;
    }

    $caps = array(

    // Keymasters only
    //’keep_gate’ => true,

    // Primary caps
    ‘spectate’ => true,
    ‘participate’ => true,
    ‘moderate’ => true,
    ‘throttle’ => true,
    ‘view_trash’ => true,

    // Forum caps
    ‘publish_forums’ => true,
    ‘edit_forums’ => true,
    ‘edit_others_forums’ => true,
    ‘delete_forums’ => true,
    ‘delete_others_forums’ => true,
    ‘read_private_forums’ => true,
    ‘read_hidden_forums’ => true,

    // Topic caps
    ‘publish_topics’ => true,
    ‘edit_topics’ => true,
    ‘edit_others_topics’ => true,
    ‘delete_topics’ => true,
    ‘delete_others_topics’ => true,
    ‘read_private_topics’ => true,

    // Reply caps
    ‘publish_replies’ => true,
    ‘edit_replies’ => true,
    ‘edit_others_replies’ => true,
    ‘delete_replies’ => true,
    ‘delete_others_replies’ => true,
    ‘read_private_replies’ => true,

    // Topic tag caps
    ‘manage_topic_tags’ => true,
    ‘edit_topic_tags’ => true,
    ‘delete_topic_tags’ => true,
    ‘assign_topic_tags’ => true
    );

    return $caps;
    //return apply_filters( ‘bbp_get_caps_for_role’, $caps, $role );
    }
    `

    #126283
    undyingearth
    Participant

    Ugh… the formatting went a bit crazy and deleted some of my response.

    Ignore the above. Basically, I wanted to say that I could achieve the effect I wanted by deleting some code from the core plugin, but I had problems when trying to do the same thing in my child theme functions.php.

    Here is the code I added to my functions.php

    http://pastebin.com/PNty9aPq

    It almost works – but it returns a freshness value that is wrong by several years (!)

    Any ideas?

    J.S.

    florianbottermann
    Participant

    I added a code line to functions.php. Now, the name of the commentator is linked. But the is only a forwarding to the blog entry, not to the bbPress profile page of the commentator…
    commentator name

    florianbottermann
    Participant

    Here comes the functions.php code:
    functions.php

    And here comes the bbPress code:
    bbPress

    florianbottermann
    Participant

    I’m working at a WordPress site in which I want to use the bbPress plugin. Now, I want to create a link between the normal WordPress comment function and bbPress. I just want to do one thing. Under my standard WordPress blog entries, the users of my site can post comments. The comments are listed under the respective blog article. Next to each comments there the picture of the user that creates the comment. Now I want to create a link between the picture of the commentator and his bbPress profile page. When someone presses the picture of the commentator, there should be a forwarding to the bbPress profile page of the commentator. Observer of my blog can get a few informations about the commentator by that. Unfortunately I’m not able to create the link.

    This is the code of my functions.php, that describes the comments setup of my normal WordPress commenting system:

    And this is the bbPress php code which creates the user avatar link to the profile page:

    Can somebody tell me the way how I have to modify the WordPress functions.php?

    Even now, many thanks for your Help!

    #126273
    kraigg
    Participant

    You could install the BuddyPress plugin, which has forums listed under groups. If you decide to go with this option, make sure to do a backup of your database first, just in case.

    Or you could customise your forum list page using bbPress shortcodes (https://codex.bbpress.org/shortcodes/). You would just need to get the IDs of the forums. Such as:

    Forums page
    ———–

    Main forums
    [bbp-single-forum id=32]
    [bbp-single-forum id=1]
    [bbp-single-forum id=5]

    Other forums
    [bbp-single-forum id=23]
    [bbp-single-forum id=12]
    [bbp-single-forum id=54]
    [bbp-single-forum id=3]
    [bbp-single-forum id=7]
    [bbp-single-forum id=8]

    #126268
    xmasons
    Participant

    I’m trying to create a page that includes only recent topics which would only be available to a forum role of Participant and a visibility of Private.

    Creating a new page and using the short code [bbp-topic-index] doesn’t work, as the Private page visibility is based on WordPress user roles and not bbPress.

    Is there a way to create an additional forum template that lists recent topics? This would not replace the main forum list view, but would be an additional page.

    moonoi
    Participant

    After upgrading to 2.2.4, only the “keymaster” role gets the normal fancy post editor with a choice between WYSIWYG view and source code view.

    Normal “participant” users only get the source code view (exactly like in this support forum). There’s the row of helper buttons to insert code, but you can’t switch to the WYSIWYG view.

    I checked that there are no JS errors. (This is usually what prevents the tabs for switching to show up).

    I figure it must have something to do with the capabilities of the forum roles, but I don’t know how I would be able to view or change these. I use the Members plugin to edit roles and caps for the rest of WP.

    #126265
    moonoi
    Participant

    Thanks Justin and John for all your amazing contributions to the community. I have a few questions/thoughts…

    Dynamic roles – how to edit their caps?
    The switch to “dynamic” roles in the most recent BBPress has left me completely puzzled. I’m still not sure what “dynamic” is supposed to mean?!

    I can’t seem to find anywhere to view and/or edit the caps of these new forum roles. I’d like to, for some reason only “keymaster” users get the wysiwyg post edit form, whereas “participant” can only see the source code pane (no, there are no js errors?!).

    Roles and capabilities in WP
    I have been using Justin’s Members plugin, which made roles and caps in WordPress work like I feel it should. In the same way as in Drupal core. Any number of roles can be assigned to a user. Caps are assigned to roles – never to one single user of course. One specific user will have the combined capabilities of the roles he/she has.

    Am I right that the only thing keeping us from just having a happy life together with Members plugin – assigning many roles to one user – is WP core’s User Edit screen that cuts everything else but one role away when you click save? If so, this should be easy to fix by just modifying this User Edit form. Right!?

    Thanks! 🙂

    #126251
    johni33
    Participant

    I use [ bbp-topic-index] embedded on the front page of http://www.cpsarc.com and it’s been reported that clicking on the navigation links (for page 2 etc) doesn’t direct to forum pages, they display news posts.

    However the same shortcode on the forum page, works as expected
    I can see the address generated for the link on the front page is cpsarc.com/?paged=2
    however on the forum page it’s cpsarc.com/?pageid=1555&paged=2 and pageid 1555 is the forum page.

    John

    #126244
    #126238

    In reply to: Shortcodes don't work

    whatisajess
    Participant

    I’ve tried that numerous times, nothing ever seems to work.

    #126236
    sontru
    Participant

    Thanks for confirming the first bug. (I’ve also found that this bug can be fixed by simply saving the settings as is.)

    I’ve been doing some more investigation on the second issue. It looks like it is not the add_user_to_blog function but the wp_create_user function (probably used in conjuction with add_user_to_blog) that is causing the problem. I’ve written a simple admin page (menu item appears under the Users menu) that will manifest the issue on my multisite setup.
    `
    [code with angle brackets removed to be posted]
    `
    Unfortunately, I have not been able to replicate this using a new install of WordPress MS v3.4.2, bbPress and a few sub sites and users. I will have to carry on looking to why my live MS site is causing this issue to manifest.

    #126229
    mtrulete.cb
    Participant

    Hello. Good day! I have installed BuddyPress Plugin on some of my sites. But earlier, I have tried running the exploit scanner plugin on those sites and it has found ‘base64_decode’ and ‘eval()’ lines of code. (Kindly see attached image). I don’t know if I would have to remove the plugin because i found out on some forums and articles that those codes are threats and can cause hijacking and injecting malicious stuffs and the likes. Looking forward on your reply regarding this matter. Thanks!

    #126224
    Stephen Edgar
    Keymaster
    #126219
    raminkhan
    Participant

    okay guys my website is called: schoolruled.com it’s a fairly new website and I would like to set it up like the support section here before it’ too late. I want to have a colum like with forums list and topics count in each forum and the a main column with latest topics but smaller width so what shortcodes should I use for this?

    #126215

    In reply to: BASIC QUESTION

    Lynq
    Participant

    You can find a list of shortcodes and other helpful stuff in the documentation link above.

    #126214

    In reply to: Shortcodes don't work

    Lynq
    Participant
    #126213

    Topic: BASIC QUESTION

    in forum Installation
    isay81
    Participant

    I am starting a new Web-site and the client wants a forum. I downloaded the wpbbpress Plug in. I added the widget for the login to my sidebar and I Created the First Forum and a topic for that forum. NOW WHAT?

    Where is a list of the shortcodes?

    HELP????

    #126212
    whatisajess
    Participant

    I tried displaying the reply form in my WordPress theme’s single.php file by putting [bbp-reply-form] but it just outputs [bbp-reply-form] as text on the site.
    I am using the “bbPress Topics for Posts” plugin to automatically create a new topic with every new post and I want to display the latest replies as well as the reply form under the article but it only displays the replies, not the form. So I thought by adding the shortcode, I would get the form but that didn’t work.
    What am I doing wrong?
    Thanks so much in advance!

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