moonoi (@moonoi)

Forum Replies Created

Viewing 17 replies - 1 through 17 (of 17 total)

  • moonoi
    Participant

    @moonoi

    So I found the solution for this. Created a new thread:

    [SOLVED] Only keymasters (admin) can upload images


    moonoi
    Participant

    @moonoi

    Found out that the setting causing the whole post form to disappear, following my hack to the `bbp_get_caps_for_role()` function, was `’moderate’ => true,`. Setting this to false makes the post form available.

    However, still no way to upload pictures for non-keymasters.

    Hope one of the bbp core coders have a tip for this one.


    moonoi
    Participant

    @moonoi

    Thanks for these great and very much needed plugins.

    The quote plugin doesn’t work if the WP Editor is enabled and the currently selected pane is the preview/view pane. Only if the source code pane is selected, will the quote be inserted.


    moonoi
    Participant

    @moonoi

    I’m no expert on bbpress theming, but I got it working on my site.

    The bbpress theme files are in the `bbpress/templates/default` folder.

    Whatever you copy from this core bbp theme folder into your own theme folder will override the core bbp theme files. (I think).

    Probably someone more knowing about bbpress theming should help you out further, but until then, I hope I might have gotten you going again.

    This is a nice guide to what the individual theme files actually do:
    http://perishablepress.com/bbpress-theme-template-files/

    In reply to: Where to edit textarea

    moonoi
    Participant

    @moonoi

    Oh, sorry. I didn’t see you were using BBPress below version 2.

    But the logic that creates the textarea is probably in the same theme files in your version. Of course they won’t be using the new WP front end editor though.

    In reply to: Where to edit textarea

    moonoi
    Participant

    @moonoi

    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.


    moonoi
    Participant

    @moonoi

    Just bumpin’


    moonoi
    Participant

    @moonoi

    @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


    moonoi
    Participant

    @moonoi

    For my own purpose I need to let all registered users upload images directly into posts in the forum. So the attachments plugin isn’t an attractive solution for me. Especially not after the new media manager made uploading such a breeze.

    The Author role is a WP role and not a bbPress role right? I manage WP roles with the Members plugin, but I assume the problem can’t be related to which WP role the user has, because only switching the bbPress role (“participant” -> “keymaster”) fixes the problem. Meaning that no changes in core WP capabilities or roles were needed.

    Anyway, I’ll try to tweak the bbPress roles to debug this problem and made this thread about that (Weird behaviour modifying bbp_get_caps_for_role() in core/capabilities.php).

    Thanks for helping out!


    moonoi
    Participant

    @moonoi

    Super. Thanks for your feedback!


    moonoi
    Participant

    @moonoi

    Ok so after digging and reading for many hours, getting a bit more into the situation, I’ve found answers to my questions above. So now I guess I’d just like to chime in to help find the best solution.

    Members plugin
    As I understand it, Justin’s Members plugin has pretty much fixed WP’s handling of capabilities by saving these roles in wp_usermeta as if they were capabilities, and allowing the assignment of capabilities to roles, instead of assigning them to individual user (which is just mad).

    Even though WP already supports multiple roles per user, its own user edit form sabotages this by removing all but one role if you click “save”.

    So it seems to me that if (hopefully when) the Members plugin become part of core, there shouldn’t be any need for bbPress to introduce a role handling interface – instead it would just add to the confusion, which I think is the case now, even though I realize that it is a valiant effort to fix a problem with WP core at this point in time.

    Solution?!
    So wouldn’t all this be solved right now by just modifying WP’s user edit form to allow for multiple role assignment?


    moonoi
    Participant

    @moonoi

    Ok, so I fixed half of this problem. Turns out that somewhere, someone has made the bbP function that checks if the wp_editor should be used return false, if the user is not “keymaster”.

    Since I have no idea where or why this happens, I’ve overridden it by inserting this in my theme (maybe someone else has the same problem):
    `
    add_filter(‘bbp_use_wp_editor’, ‘ml_allow_wp_editor’, 1000, 2);
    function ml_allow_wp_editor($value, $default) {
    return true;
    }
    `

    The “participant” users still get an error, when they try to upload a file. I hope someone who knows the inner workings of bbP can help.

    Thanks!


    moonoi
    Participant

    @moonoi

    I also just discovered that this is related to another problem I have:

    Only the keymaster can upload files in the new media manager screen. If a “participant” tries to upload, it just returns the standard “Error – try again later” message.


    moonoi
    Participant

    @moonoi

    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! 🙂


    moonoi
    Participant

    @moonoi

    How long have you had this installation?

    I just installed bbpress a few days ago from the latest trunk files. I’m running on WP 3.1.


    moonoi
    Participant

    @moonoi

    Adding to the question above:

    I found out that when I type in /blog/forum/test-forum I’m not redirected but just shown the 404 page. All other combinations ends in a redirect back to the front page.

    I can see in the posts table that WP saved the permalink as http://localhost.localdomain/?post_type=forum&p=8053. Requesting this URL just results in the redirect.

    I already tried saving permalinks settings a number of times. I also tried each of the custom structure combinations mentioned in here such as /%post-type%/%post-name%/etc., and I tried disabling “neat” permalinks all together. Nothing seems to work.


    moonoi
    Participant

    @moonoi

    I’ve looked through this whole thread and have seen several cases of people having trouble with the permalink structure, getting 404’s.

    No matter what I try, every time I try to access /forums/forum/test-forum I’m just redirected to the site root.

    I’ve spent loads of time looking through the core files of bbpress, but I can’t seem to find the place where this particular link structure is set. Rules are added for a lot of other pages, but not the single forum page.

    Does anyone know where WordPress is told to use this particular URI structure?

Viewing 17 replies - 1 through 17 (of 17 total)