Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for ' . default . '

Viewing 25 results - 3,151 through 3,175 (of 6,789 total)
  • Author
    Search Results
  • Mike
    Participant

    Thanks, but I finished and moved on. I tried and failed with several different approaches like this, but copying and altering 2 functions took less than 2 minutes as the //comments were clear about how to disable the AJAX.

    I took me almost 2 weeks part-time to customise the bbpress forum. I spent a lot of time messing with IDs and classes to target CSS changes and trying to figure out the proper code to modify defaults.

    For example finding the code to return just an “edit” for replies was a matter of great googling and some luck.

    #145738
    Robin W
    Moderator

    add the following to your functions file, and the sub forum descriptions will display

    //This function adds descriptions to the sub forums
    function custom_list_forums( $args = '' ) {
    
    	// Define used variables
    	$output = $sub_forums = $topic_count = $reply_count = $counts = '';
    	$i = 0;
    	$count = array();
    
    	// Parse arguments against default values
    	$r = bbp_parse_args( $args, array(
    		'before'            => '<ul class="bbp-forums-list">',
    		'after'             => '</ul>',
    		'link_before'       => '<li class="bbp-forum">',
    		'link_after'        => '</li>',
    		'count_before'      => ' (',
    		'count_after'       => ')',
    		'count_sep'         => ', ',
    		'separator'         => ', ',
    		'forum_id'          => '',
    		'show_topic_count'  => true,
    		'show_reply_count'  => true,
    	), 'list_forums' );
    
    	// Loop through forums and create a list
    	$sub_forums = bbp_forum_get_subforums( $r['forum_id'] );
    	if ( !empty( $sub_forums ) ) {
    
    		// Total count (for separator)
    		$total_subs = count( $sub_forums );
    		foreach ( $sub_forums as $sub_forum ) {
    			$i++; // Separator count
    
    			// Get forum details
    			$count     = array();
    			$show_sep  = $total_subs > $i ? $r['separator'] : '';
    			$permalink = bbp_get_forum_permalink( $sub_forum->ID );
    			$title     = bbp_get_forum_title( $sub_forum->ID );
    			$content = bbp_get_forum_content($sub_forum->ID) ;
    
    			// Show topic count
    			if ( !empty( $r['show_topic_count'] ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
    				$count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID );
    			}
    
    			// Show reply count
    			if ( !empty( $r['show_reply_count'] ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
    				$count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID );
    			}
    
    			// Counts to show
    			if ( !empty( $count ) ) {
    				$counts = $r['count_before'] . implode( $r['count_sep'], $count ) . $r['count_after'];
    			}
    
    			// Build this sub forums link
    			$output .= $r['before'].$r['link_before'] . '<a href="' . esc_url( $permalink ) . '" class="bbp-forum-link">' . $title . $counts . '</a>' . $show_sep . $r['link_after'].'<div class="bbp-forum-content">'.$content.'</div>'.$r['after'];
    		}
    
    		// Output the list
    		return $output ;
    	}
    }
    
    add_filter('bbp_list_forums', 'custom_list_forums' );
    #145727
    Robin W
    Moderator

    ah..

    I would expect it to look like the second by default. If you take out the starter theme does it revert to that?

    #145710
    Robin W
    Moderator

    maybe theme or plugin related.

    Try

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    #145703
    dustinarmstrong
    Participant

    I just ran through and did a brand new install of WordPress with Twenty Fourteen as the theme, only plugins are bbPress and BuddyPress. It appears to have worked. I wiped the plugins, and tried again with no luck. Here’s a rundown of my process:

    Permalinks set to postname.

    bbPress installed first, forum root url set to ‘sound-off-forums’, saved. All other settings left default.

    Page created with slug ‘sound-off-forums’, page works, shows forums as expected.

    BuddyPress installed, default configuration left alone. ‘http://example.com/sound-off-forums&#8217; fails to load, showing a 404 page.

    I have no idea. It sounds like I’ll likely need to scrub the DB any trace of bbpress and buddypress from my environment and start over. Thanks for the help with everything. It must have just been an installation error.

    #145676

    In reply to: text buttons

    Robin W
    Moderator

    can you post a link?

    I’d try switching themes to test if it is a theme issue

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    #145662
    dustinarmstrong
    Participant

    Been looking into this for a few days, and I can’t find a solution.

    By default, bbpress offers two solutions for the index of a forum page:

    • Using the default settings, and a customizable ‘forum root’ available in the settings panel
    • Using a page with a shortcode to implement the section that you want

    However, when you use the shortcode solution, there are two ‘forum root’ urls. The one that is associated with the page you want to use, and the one generated with the ‘forum root’ url.

    For example, let’s say that I created the forum using the shortcode on site.com/discuss, and I need to use custom fields to customize the appearance of that page with a header, a hero graphic, and some descriptive text. I can style it, and it looks perfect. However, the site.com/forums url is still present in the forum topic urls (site.com/forums/post, not site.com/disucss/post), and as it’s own page without the custom styling.

    While I could customize the page template for bbpress on site.com/forums, there are no methods for displaying fields defined by the client/user in the dashboard on that template, completely eliminating the purpose of using the custom page & shortcode option.

    Are there any solutions for this or am I stuck? I’ve yet to find any solutions on this.

    #145619
    Stephen Edgar
    Keymaster

    Make sure you have the settings correct, check the e107_config.php file for the correct seetings:

    eg.

    
    $mySQLserver         = 'localhost';
    $mySQLuser           = 'my_database_user_name';
    $mySQLpassword       = 'my_database_password';
    $mySQLdefaultdb      = 'my_database_name';
    $mySQLprefix         = 'e107v1_';
    
    #145573

    In reply to: bbcode

    Stephen Edgar
    Keymaster

    Add this code to your `themes functions.php file:

    
    add_filter( 'bbp_after_get_the_content_parse_args', 'ntwb_bbp_enable_visual_editor' );
    function ntwb_bbp_enable_visual_editor( $args = array() ) {
    	$args['quicktags']         = array( 'buttons' => 'strong,em,block,del,ins,ul,ol,li,code,close' );
    
       return $args;
    }
    

    I have removed the default link and img items from the list so they do not show.

    #145551
    Stephen Edgar
    Keymaster

    Participants can create topics by default:

    See the default capabilities here https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    #145500
    tharsheblows
    Participant

    Ah ha – and hmm, would it still pick up the rest of the defaults, eg img and blockquote and those? The correct answer to this question is “You have a test install, play with it and figure it out yourself.” so I will. Later.

    I know what you mean about the amount that can be learned in 12 months. 12 months I was trying and trying to convince a client that they didn’t want a forum! Of course, that was for reasons other than development but it has turned out very well – cheap and easy (ok maybe not cheap and maybe not super simple when you count in moderation and user issues and all that) but an excellent way to get constantly updated content.

    #145471
    Robin W
    Moderator

    could be plugin or theme related

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    #145470

    In reply to: Theme Recommendation

    Robin W
    Moderator

    bbpress largely picks up on your wordpress theme, use any of thevdefault ones and you’ll get a great look.

    I use twentyten very successfully.

    and look at the set up guides

    Codex

    #145469
    Robin W
    Moderator

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    #145467
    Robin W
    Moderator

    May well be a plugin or theme issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    #145456

    Topic: bbcode

    in forum Installation
    ww_hoax
    Participant

    Is there any simple solution to delete default bbcodes. In which file the default bbcodes defined. Many thnaks for any hint.

    #145443

    In reply to: change forum sidebar

    Robin W
    Moderator

    Just spotted you post on the wordpress forum :

    ‘My theme (MH Magazine) has no bbPress template by default, so I copied my full-page-width template and renamed it plugin-bbpress.php. I’ve got the forums page set to this template’

    If this is how you have it currently, then it is a sidebar template from your theme that you need, not a full width page one. With a siderbar theme, then wp-tweaks will pick this up and add the forum one to the page.

    #145437
    WARTORIOUS
    Participant

    Theme: modified portfolio press:

    /*
    Theme Name: Portfolio Press
    Description: Portfolio Press is a responsive theme for showcasing your photography, art, web sites, or other projects. It also works nicely as a regular blog site. An options panel is included for uploading logos and and changing the layout. There’s also support for the image, gallery and quote post formats. Visit the demo site or watch the video screencast for set up instructions.
    Author: Devin Price
    Author URI: http://wptheming.com/
    Theme URI: http://wptheming.com/portfolio-theme/
    Version: 1.7
    License: GNU General Public License
    License URI: license.txt
    Tags: white, black, gray, two-columns, left-sidebar, right-sidebar, flexible-width, custom-menu, full-width-template, microformats, post-formats, rtl-language-support, theme-options, translation-ready

    Credits:

    Portfolio was built on the solid foundation of Toolbox:
    https://wordpress.org/extend/themes/toolbox

    Reset default browser CSS.
    Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/

    MODERATOR EDIT: I removed the ~1200 lines of code here, use pastebin or a gist on GitHub for big code dumps.

    #145410
    Stephen Edgar
    Keymaster

    would I *only* be allowed to add a tags with a class (no, I don’t know why either but just pretend…) and not able to add the default img, blockquote, etc tags?

    Correct, with the example you posted you would only be able to add an a anchor HTML element with a class CSS class eg. <a class="my-css-class">description</a> note as you removed href from the allowed tags you wouldn’t be able to use <a href="http://example.com">description</a>

    I had a similar question last year but never really figured it out – gave up when I decided it didn’t matter: https://bbpress.org/forums/topic/using-wp_filter_kses-filter-for-bbpress-posts/

    I fully appreciate this highlights how little I know these things! And thank you. 🙂 This has been a really interesting discussion.

    This highlights how little I knew 12 months ago, if I don’t know I don’t answer a question unless I can provide something that IS helpful, we are all constantly learning 🙂

    #145393
    Robin W
    Moderator

    ok,

    so create a file called bbpress-functons.php as above and in to this put

    <?php
    //code to add tutor role 
    
    function add_tutor_role( $bbp_roles )
    {
    	/* Add a role called tutor */
    	$bbp_roles['bbp_tutor'] = array(
    		'name' => 'Tutor',
    		'capabilities' => custom_capabilities( 'bbp_tutor' )
    		);
    	return $bbp_roles;
    }
     
    add_filter( 'bbp_get_dynamic_roles', 'add_tutor_role', 1 );
    
    function tutor_role_caps_filter( $caps, $role )
    {
    	/* Only filter for roles we are interested in! */
    	if( $role == 'bbp_tutor' )
    		$caps = custom_capabilities( $role );
     
    	return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'tutor_role_caps_filter', 10, 2 );
    
    function custom_capabilities( $role )
    {
    	switch ( $role )
    	{
    		 
    		/* Capabilities for 'tutor' role */
    		case 'bbp_tutor':
    			return array(
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    				'moderate'              => false,
    				'throttle'              => false,
    				'view_trash'            => false,
     
    				// 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'         => false,
    				'delete_others_topics'  => false,
    				'read_private_topics'   => true,
     
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				'edit_others_replies'   => false,
    				'delete_replies'        => false,
    				'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'     => true,
    			);
    			break;
     
    		default :
    			return $role;
    	}
    }
    
    

    This sets up a role called ‘tutor’ – just change this name everywhere to the one you want, and then edit the capabilities.

    the default capabilities for each role are :

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    you’ll probably want to make delete topics and delete replies true

    #145390
    tharsheblows
    Participant

    bbpress-functions.php should go in the main theme directory eg /twentythirteen/bbpress-functions.php. It doesn’t go in the /twentythirteen/bbpress/ directory. This is also true for the default bbpress template, bbpress.php.

    So for bbpress custom templates, you’ll have eg :

    /mytheme/bbpress-functions.php <– custom functions file, overwrites plugin file
    /mytheme/bbpress.php <– custom main bbpress index file, overwrites plugin file
    /mytheme/bbpress/*.php (eg /mytheme/bbpress/loop-forums.php) <– all the template files you want to overwrite from the plugin folder /bbpress/templates/default/bbpress/

    #145386
    tharsheblows
    Participant

    @netweb – with filters, do they only add or modify the function? I mean, can you only add or modify parameters in them, not delete? Eg if I had this:

    add_filter( 'bbp_kses_allowed_tags', 'ntwb_bbpress_custom_kses_allowed_tags' );
     
    function ntwb_bbpress_custom_kses_allowed_tags() {
    	return array(
     
    		// Links
    		'a'          => array(
    			'class'    => true,
    		)
    }

    would I *only* be allowed to add a tags with a class (no, I don’t know why either but just pretend…) and not able to add the default img, blockquote, etc tags? I guess I’m asking is it like a child functions.php file (which overwrites) or a child css file (which adds to / modifies)? I am hoping I’ve got my analogies right, hmm.

    I had a similar question last year but never really figured it out – gave up when I decided it didn’t matter: https://bbpress.org/forums/topic/using-wp_filter_kses-filter-for-bbpress-posts/

    I fully appreciate this highlights how little I know these things! And thank you. 🙂 This has been a really interesting discussion.

    #145366

    It sounds like this theme added bbPress specific templates to both the parent theme, and the child theme, both of which are overriding bbPress’s default template compatibility (because bbPress will yield to those overrides, which is how you can customize bbPress without needing to hack bbPress.)

    Can be a bit confusing at first, especially since there’s no real indication of what is being loaded from where.

    You could try installing the WordPress Debug Bar plugin, and then install the bbPress Debug Bar extension: https://wordpress.org/plugins/debug-bar-bbpress/

    This will give you some information about what bbPress template is loading from where, but it’s still only providing a small window into a somewhat hidden experience.

    #145357
    DietPipsi
    Participant

    Hello. Thankyou for the reply. The problem with using the Custom Default Avatar plugin is that users cannot choose which avatar from that list that they want to use. They only have two options, one default or upload their own.

    I want them to be able to choose from a list of avatars with a drop-down or radio button. Is there a plugin for this or a snippet of code I can put into my child theme to enable this?

    Thanks

    #145352
    Robin W
    Moderator

    maybe a theme or plugin conflict

    try

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

Viewing 25 results - 3,151 through 3,175 (of 6,789 total)
Skip to toolbar