Search Results for 'code'
-
AuthorSearch Results
-
February 18, 2016 at 11:13 am #171914
In reply to: where to put bbpress.css in child-theme
awal16
ParticipantI added the custom capabilities to my functions.php in the child-theme. When I go to Users, in the back-end of WordPress, there are warning texts like, Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_new_roles’ not found or invalid function name in C:\xampp\htdocs\mnddb_nieuw\wp-includes\plugin.php on line 235.
What did I do wrong?
My code in the function.php looks like:
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; // BEGIN ENQUEUE PARENT ACTION // AUTO GENERATED - Do not modify or remove comment markers above or below: if ( !function_exists( 'chld_thm_cfg_parent_css' ) ): function chld_thm_cfg_parent_css() { wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css' ); } endif; add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' ); // END ENQUEUE PARENT ACTION // Nieuwe forumrolnaam toevoegen function add_custum_role($bbp_roles){ $bbp_roles['bbp_global_moderator'] = array( 'name' => 'Globale moderator', 'capabilities' => custom_capabilities( 'bbp_global_moderator' ) ); return $bbp_roles; } // Nieuwe forumregels toevoegen add_filter('bbp_get_dynamic_roles', 'add_new_roles', 1); function add_role_caps_filter($caps, $role) { // Only filter for roles we are interested in! if ($role == 'bbp_global_moderator') $caps = custom_capabilities($role); return $caps; } add_filter('bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2); function custom_capabilities($role) { switch($role) { // Capabilities for 'global_moderator' role case 'bbp_global_moderator'; return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderator' => false, 'throttle' => false, 'view_trash' => true, // Forum caps 'publish_forums' => false, 'edit_forums' => false, 'edit_others_forums' => false, 'delete_forums' => false, 'delete_others_forums' => false, 'read_private_forums' => true, 'read_hidden_forums' => false, // Topic caps 'publish_topics' => true, 'edit_topics' => true, 'edit_others_topics' => false, 'delete_topics' => true, 'delete_others_topics' => false, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => false, 'delete_replies' => true, 'delete_others_replies' => false, 'read_private_replies' => true, // Topic tag caps 'manage_topic_tags' => false, 'edit_topic_tags' => false, 'delete_topic_tags' => false, 'assign_topic_tags' => false, ); break; default : return $role; } }February 18, 2016 at 9:49 am #171910In reply to: Excluding Forums from Recent Topics Widget
cookavich
ParticipantI created a test page with this as the content:
[bbp-display-topic-index show=’5′] [display-newest-users show = ’10’]This was the result:
February 18, 2016 at 8:36 am #171903In reply to: where to put bbpress.css in child-theme
Pascal Casier
ModeratorThe link is: https://codex.bbpress.org/custom-capabilities/
Better to post a new topic for a new question with a specific title, so others can find it in the search …
Pascal.
February 18, 2016 at 5:18 am #171889In reply to: where to put bbpress.css in child-theme
Robin W
Moderatorok so for the roles, you should see and use
loop_single_forum in your child theme is the right way to go
If you need further help in doing this (or anything else!) – please feel free to ask, like all things it is a learning curve 🙂
February 18, 2016 at 5:13 am #171888In reply to: Replies Transparency/Opacity Issue
Robin W
Moderatoryour blogs.css line 1427
has
.single .commentmetadata, .single .reply { left: -15px; margin: 10px 0; opacity: 0.3; position: relative; }suggest you try adding
#bbpress-forums .reply { opacity: 1; }to your css.
come back if you need further help in doing this !
February 17, 2016 at 11:20 pm #171883In reply to: Anyway to auto-populate a forum structure?
Stephen Edgar
KeymasterYou can also use
bbp_create_initial_content()with somebbp_parse_args()to generate your content, bbPress uses this to crate some sample/initial content when installing on multisite installs.https://bbpress.trac.wordpress.org/browser/branches/2.5/includes/core/update.php#L174
February 17, 2016 at 7:05 pm #171876ying-sun
Participanthi. i want new topics and replies to show up in the activity stream, but right now they are not.
i added this to bp-custom.php:
add_post_type_support( 'topic', 'buddypress-activity' );which works, but with a generic “UserName wrote a new item.” it seems like there must be a better, easier way to tie the two together. looking at the bbpress files, i see this:
public function register_activity_actions() { // Sitewide activity stream items bp_activity_set_action( $this->component, $this->topic_create, esc_html__( 'New forum topic', 'bbpress' ) ); bp_activity_set_action( $this->component, $this->reply_create, esc_html__( 'New forum reply', 'bbpress' ) ); }i don’t know if they’re not getting called or they’re conflicting with something or what, but they aren’t doing what it seems like they should be doing. is there a setting i’m missing to activate this feature?
little help?
February 17, 2016 at 7:00 pm #171875In reply to: where to put bbpress.css in child-theme
Robin W
Moderatorno, core functions in bbpress cannot be put in other folders.
Generally it is not recommended that you change bbpress itself. Rather almost all bbpress functionality can be filtered, so that the plugin remains complete and changes are put in your theme’s functions file using wordpress filering capability.
What changes did you make? If small, let me know which lines in which file, and post the changes here, and I’ll try to help you with what you should put in your functions file.
You should also make those changes (and the template files you copied ) in a child theme, so that theme updates donlt overwrite these
https://codex.bbpress.org/functions-files-and-child-themes-explained/
February 17, 2016 at 5:53 pm #171873In reply to: Excluding Forums from Recent Topics Widget
Robin W
Moderatorcan you tell me what you are putting as the shortcode?
February 17, 2016 at 5:40 pm #171872In reply to: where to put bbpress.css in child-theme
Robin W
Moderatorhttps://codex.bbpress.org/themes/theme-compatibility/
should answer your questions, but do come back if you need further help !
February 17, 2016 at 5:06 pm #171867In reply to: Excluding Forums from Recent Topics Widget
cookavich
ParticipantThat sounds workable, however, after installing the plugin the display topic shortcode doesn’t seem to be functional. The display newest users shortcode is working, odd.
February 17, 2016 at 4:15 pm #171865In reply to: Excluding Forums from Recent Topics Widget
Pascal Casier
ModeratorHi,
Is this want you are looking for : http://www.rewweb.co.uk/bbpress-additional-shortcodes/ from @robin-w
It’s INcluding, not EXcluding …
Pascal.
February 17, 2016 at 3:42 pm #171861In reply to: Where to register?
Pascal Casier
ModeratorHi,
Can this help ? https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/#6-automatic-vs-manual-registration
Pascal.February 17, 2016 at 4:47 am #171835In reply to: Change Breadcrumb url link
Adri Oosterwijk
ParticipantHi all,
I think I got it worked out together with Otto and Tia over at WPML.
You can have a look at it at those two topics:https://wpml.org/forums/topic/multiple-site-languages-but-just-a-bbpress-forum-in-english/
https://wpml.org/forums/topic/bbpress-breadcrumbs-how-to-localize-and-point-to-the-right-page/BTW I hide the language switcher(s) on the topics pages by adding this piece of code in my header file
<?php if (!is_bbpress()) { do_action('icl_language_selector'); } ?>and this in my footer.php
<?php if (!is_bbpress()) {
do_action(‘wpml_footer_language_selector’);
} ?>I hope it helps you as well.
Regards,
Adri
February 17, 2016 at 4:10 am #171834In reply to: Change type root forums page
Pascal Casier
ModeratorHi,
I suppose you mean that you want to change the default page that you get when going on /forums ?
If so, just create a page in WordPress and change the slug to ‘forums’, then put anything you want in that page.The standard page shown when going on /forums is content-archive-forum.php.
You can customize all templates if you want, just read some pages of the bbPress Codex: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/
Pascal.
February 17, 2016 at 2:01 am #171825In reply to: add a "Featured Image" to a forum
pazzaglia
ParticipantHow can I vary this code to include a default image for topics? I post new forum topics to facebook and at the moment they’re showing a TERRIBLE giant picture – when there are no profile pics or attachments to display. I don’t even know where it’s being pulled from.
http://www.hippressurecooking.com/forum/
Thanks!
LFebruary 16, 2016 at 5:35 pm #171812In reply to: bbPress Sidebar – DIsappears on topic/post pages
Robin W
ModeratorThe problem is that wordpress was designed to work with templates that were different for each type eg template for page with sidebar, another template for page without sidebar.
The trouble is that theme authors are getting too clever ,and nowadays write a single big page template that bbpress cannot easily react with.
So your theme displays one template for the main page, but then bbpress can’t work with it for the other sub pages, as it doesn’t know how the theme is using the template.
Ok, so that’s the explanation, but probably doesn’t help you at all.
If you know some wp stuff then this might help
February 16, 2016 at 4:34 pm #171811Topic: bbPress Sidebar – DIsappears on topic/post pages
in forum Troubleshootingstewmills
ParticipantSorry if this is a duplicate…seemed to get an odd behavior when attempting to submit previously.
Facts:
– WordPress 4.2.2
– bbPress 2.5.8
– Theme – Karma 3.0.3I have created the following forum on my site (currently hidden from the top menu but accessible via links provided): http://www.cytoviva.com/forum/
In the above link I get the forum login and other options in the right sidebar as I prefer.
However, when you get one layer deeper into the forums, topics, posts, etc. the sidebar is not visible as seen here: http://www.cytoviva.com/forums/forum/registration-instructions-and-forum-guidelines/
I want the sidebar to be visible on all pages/posts/etc. so someone reading a post can login from that page or request new access from that page and as well logged in users will always have the sidebar details and option to logout from any page within the forum.
Initially the sidebar was not visible at all and I finally realized that my forum page (using the shortcode [bbp-forum-index] on my “forum” page to display the forum) was using the right template and when I changed it to ‘Right Sidebar’ and selected the option at the bottom to display my newly created sidebar (User Forum Login Sidebar) I started seeing what I wanted to see on the main forums page.
However, when I go to my individual forums in the WP control panel and make sure they are also set under the ‘Right Sidebar’ page template and as well have the option checked to display my sidebar, it seems to do nothing.
I have read a host of other posts here today and it seems that the answers to getting the sidebar to display as I want vary per person/situation hence my additional post. I don’t want to have to create a new .css file as currently I don’t have access to our host and FTP to create new files so I was hoping to find a solution that is simple as me not having a button checked somewhere or something trivial.
I am somewhat new to WP and bbPress so the more fundamental the advice the better. My goal is to try and solve this with a little troubleshooting versus new child .php pages, etc.
Thanks in advance!
February 16, 2016 at 3:45 pm #171808In reply to: Styling search bar & forum title
Pascal Casier
ModeratorTo remove the ‘Forums’ title, you could do some CSS:
.forum-archive h1 { display: none; }Pascal.
February 16, 2016 at 3:15 pm #171806In reply to: Confirmation of comments and topics
Pascal Casier
ModeratorHi,
Forum moderation is being reviewed and improved a lot for future versions of bbPress. For now there is standard moderation and blacklisting as described here: https://codex.bbpress.org/moderation-and-blacklisting/
The above mentioned plugin is the only one that I found when I looked at it in the last months. Please note that it has a small bug with saving topic subscriptions from user before their post is approved, so the user might have to re-subscribe from the checkbox during the reply.
Pascal.
February 16, 2016 at 9:40 am #171791In reply to: Cant see Forum Settings
Pascal Casier
ModeratorAs Robin indicated, this is somewhere a conflict with a plugin or a theme.
But I see your forums: http://www.finalfantasyrpg.com.br/forums/
So I suppose that you found/wp-admin/edit.php?post_type=forum?Pascal.
February 16, 2016 at 9:27 am #171790In reply to: Oh bother! feedback-no-replies
Pascal Casier
ModeratorOkay, maybe this then:
CSS:
.bbp-search-form { display:none !important; }Also check the option called ‘Search’ in your dashboard: ‘Settings > Forums > Forum Features’
Pascal.
February 16, 2016 at 8:16 am #171780In reply to: Oh bother! feedback-no-replies
Pascal Casier
ModeratorHi,
Never edit bbpress templates directly in the bbpress folder, otherwise you will loose your changes when bbPress updates.
There are several ways that I know of, but the most easy one would probably be by installing my ‘bbP Toolkit’ plugin.Or you play with CSS yourself:
.bbp-template-notice { display: none; } .bbp-template-notice.info, .bbp-template-notice.error, .bbp-template-notice.important, .bbp-template-notice.warning { display: block; }Not that also other similar messages will disappear with the above.
And if you want to modify bbPress files, please check the codex (https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/) and/or create a child theme
Pascal.February 16, 2016 at 4:19 am #171766Jeff McNeill
ParticipantHahaha tags “sleeping pill store” tag should be a signal that someone is asleep at the tiller. Really folks, this place is asleep, and all Robin W. does is state that it is free software and you should be durned grateful, and not try and wake anybody up.
Development is tediously slow, regardless of some $50k that was raised a few years ago. 2.6 should supposedly fix the issue with not being able to replace posts with forum discussions. Surely that is also why the plugin that actual does that hasn’t been updated in two years. And 2.6 was 4 months late in May 2014. So when will it ever be released?
This is simply too long! Obviously this project is coasting on the coattails of integration (and requirement of use) in BuddyPress and that it is an anointed project of WordPress.org. Anything less would have near zero users already.
So much functionality is needed to be reasonable. There appears to be a single active developer committing to the code: https://www.openhub.net/p/bbpress/commits/summary
But really, this was a complaint over a year and a half ago, and it ain’t changed. Very sad as the potential is quite big. How else do you explain 16,000+ downloads of that plugin that has been abandoned: https://wordpress.org/plugins/bbpress-post-topics/
February 15, 2016 at 10:12 pm #171760tech55541
ParticipantHello,
Would it be possible to take the code that adds this functionality in with BuddyPress, create a separate plugin, and then make it work for BBPress? I can’t believe a forum software does not have this built in.Thanks 🙂
-
AuthorSearch Results