Search Results for 'code'
-
Search Results
-
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-3895962Hey again, Sorry 2 questions in one day 🙁
OK here is what i am thinking… Rather than using /forums/ for my main forum page i would like to create my own custom Forums page.. Now would this need to be done via a BBpress template or simply by creating a WordPress page and then using shortcodes to display specific forums..
Doing the above assuming it was possible.. i would call the WP page “Forums” but this would conflict with the BBpress Forums base which by default is “forums” so yeah i am at a little bit of a loss here.
Again as always THANKS in advance to anyone who takes the time to reply / assist me with this.
Regards, Darren
Hi guys,
I’d like to alter the ouput in the Freshness column, as you can see in the code below, bbpress knows the latest forum post in any one forum and links to it if you click the Freshness link, in this case ‘4days 2 hours ago’. Instead of it outputting 4 days 2 hours I’d like it to show the title of the post.
I think I need to edit the bbp-header but I don’t know where to find this.
Can anybody help me do this please?
Thank you!
`
`
Topic: Got a question here.
Hi there.
I’m using the latest plugin version of bbPress, WP 3.5.1, and BuddyPress 1.6.4 and I have a question for you:
Does the code I found here still work, as that was posted almost one and a half years ago?
Plus if it does work, how do I modify it to show only certain forums (cause I’m using the Membership plugin from WPMU DEV to control access to a few which are for premium members only)?
Thanks in advance for the help,
Nathan P.Hello everyone,
I would like to require tags for topics and replies. I managed to find some help.
Here is the code which you can have in your functions.php file./* @ Require tags for posting topics, replies */ add_action( 'bbp_new_topic_pre_extras', 'check_front_end_tags_wpse_82956' ); add_action( 'bbp_new_reply_pre_extras', 'check_front_end_tags_wpse_82956' ); function check_front_end_tags_wpse_82956(){ if( empty( $_POST['bbp_topic_tags'] ) ) { // WORKAROUND FOR LINKS WITH HASH TAG, e.g., topic/lorem-ipsum#post-91 // Necessary when posting multiple replies that generate hashed links // OTHERWISE A SIMPLE href="javascript:history.go(-1) WOULD WORK ?> function goBack() { if (window.history && history.pushState) { history.replaceState("", "", "?no-tags=true); history.go(-1); } } <?php wp_die( '<a href="history.go(-1)" rel="nofollow">' . __( '« « Please type at least one tag' ) . '</a>' ); } }But I would like to use AJAX and a modal dialog for displaying the requirements when someone creates a topic or replies and forgets to type in a tag.
How can I do this, can someone give me guidance here?regards
I am using buddypress 1.6.4, WordPress 3.5.1 and bbpress 2.2.4. My website is on the localhost xamp server. I am using bp-columns theme as my Buddypress Child Theme. Please I would like to know how to create a bbpress child theme. I followed the step by step guide on how to create a bbpress child theme and it have so useful to me. The problem I have with it is this line that says: go to bbPress’ theme folder. That is, go to wp-content > plugins > bbpress > bbp-themes > bbp-twentyten. Download all the files from this folder except style.css. These are the files that will style your bbPress theme.
I can’t find the bbp-themes and bbp-twentyten folders in my bbpress installation.
Any help on this will be deeply appreciated!