Search Results for 'code'
-
Search Results
-
Topic: Forum Images ?
Hey again..
I mucked around with BBpress a while back and managed to use the WP “featured Image” to insert a icon for each different forum.. Now since about one month ago ive actually forgotten how i managed that.. Could anyone assist me with this again.
Thanks in advance.
If it helps i am trying to build a custom forum page (forum home page).. still unsure how i am going to achieve this, whether i use shortcodes or create a custom page im still not sure what the best method would be.. but i would like to be able to add forum title headers with custom images for each forum category.
Hi!
I’m running WordPress 3.5.1 with BBPress 2.2.4.
I’ve got a problem:
as a moderator or even a keymaster in bbpress, and Subscriber in WordPress(which I’d like not to change), I don’t have access to the WordPress admin panel to Add forum or Delete forum. In the admin panel I only have “New – Topic” Or “Reply”. The only way I can add a forum is creating a specific page with the add forum shortcode, and there is no way to delete a forum. Would you have an idea for me? Thank you!I have a client who would like to keep participants from creating new topics. I have checked out the file bbp-core-caps.php, but when it comes to giving Participants capabilities, the code is
// bbPress Participant Role
case bbp_get_participant_role()
instead of defining the capabilities list like it does for Adminstrator, Moderator and default.I could use a clue where to go to shut off the topic creation capability for participants.
Thank you!
Hi,
I’m having problems getting my forum members to see my forum and the latest posts. I had set the forum to private, but that turned out to force members to log in to see the forum (most of my members don’t have one).So I set the forum to public. The forum is now visible when I’m not logged in. But now I discovered NEW posts won’t show up unless I’m logged in! The same happened to a forum member who does have a WP login.
The posts in question are set to public. The site can be found at here.
Please, I’m looking for any solution that’s not time consuming (I’ve spent too much time trying to get this forum to work already) and I know next to nothing about code, so that wouldn’t be a viable option for me. I hope someone can come up with a solution that finally gets this forum going.
Thank you.
After having battled with this problem for a long time, I finally found out, why only keymaster users could upload images to their replies with the new media manager.
The problem is not bbPress’ fault, but rather due to a shortcoming in the WP_Editor.
When a front end editor is inserted on a page using the
wp_editor()function, and media buttons are enabled, the media buttons will be automatically set up to attach the images being uploaded to the current global post object.This is a problem, because the current global post on a forum topic page is the topic. So if the user replying to the topic (and trying to upload images) is not the topic starter, a permissions problem will arise.
The user will then in fact be attempting to attach media to the topic, which is owned by someone else. This will result in an error, unless the user has the “edit_others_topics” permission set to true.
So, what to do? Here’s my temporary solution, until this hopefully gets addressed in the future:
Because the core function that takes the post id from the current global post can’t be hooked directly into, I decided to hook in before and after it, to first change the global post id to null, and then change it back afterwards, so any logic that follows the WP_editor will not get disturbed.
This will, however, cause the uploaded image to not be attached to any post. But it doesn’t have to be. The image will be inserted into the forum reply html, regardless of which post it is attached to in the DB.
add_action('media_buttons', 'ml_pre_media_buttons', 1); add_action('media_buttons', 'ml_post_media_buttons', 20); function ml_pre_media_buttons($editor_id) { if (!$editor_id == 'bbp_reply_content') return; $GLOBALS['post_temp'] = $GLOBALS['post']; $GLOBALS['post'] = null; } function ml_post_media_buttons($editor_id) { if (!$editor_id == 'bbp_reply_content') return; $GLOBALS['post'] = $GLOBALS['post_temp']; }I created this issue on the WP support forums:
http://wordpress.org/support/topic/front-end-editor-media-upload-would-like-ability-to-pass-post-id?replies=1#post-3895962