Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,601 through 6,625 (of 32,519 total)
  • Author
    Search Results
  • #173715
    Pascal Casier
    Moderator

    @tech55541
    Checking the code, the value you need is 3 :

    	public function register_defaults() {
    
    		Manager::register( 'not-support', array(
    			'label'     => __( 'Not a Question', 'bbResolutions' ),
    			'value'     => '1',
    		) );
    
    		Manager::register( 'not-resolved', array(
    			'label'     =>  __( 'Not Resolved', 'bbResolutions' ),
    			'value'     => '2',
    		) );
    
    		Manager::register( 'resolved', array(
    			'label'     =>  __( 'Resolved', 'bbResolutions' ),
    			'sticker'   => __( '[Resolved]', 'bbResolutions' ),
    			'value'     => '3',
    		) );
    
    	}
    #173706
    uschesch
    Participant

    I am unable to send a link to the site, as it is still company confidential. I tried several things today, including ensuring that this line of code (<?php bbp_forum_subscription_link(); ?> exists in the content-single-forum.php file. I am still unable to see the Subscribe link in the breadcrumbs.

    Any assistance would be very much appreciated.

    Thank you.

    #173704
    semperaye
    Participant

    I was given something like this:

    body.responsive.page-template-default #page-wrapper .full-container {
        max-width: 1080px !important;
    }
    #173700

    In reply to: How to add a sidebar

    ugarnono01
    Participant

    Thanks Pascal. Unfortunately I am not that great with code so not sure what needs changing as its not in plain English. I have a sidebar already called ‘Forum’ Just can’t get it to show on bbpress.

    #173699
    semperaye
    Participant

    Firstly, I have no idea what I’m doing as I am very new at this, and everything that I’ve done on this site has come at great trial and error. I think I might have a weird bbpress forum setup because I never had to create a new page and paste in the forum shortcode, the forums where just their at /forums from the start….I have no idea why but anyway here is my issue:

    If you look at the page: http://www.salamatphilippines.com/forums/

    I have a 1920×1080 monitor and when I “dock” the forum page to the right of my screen in windows 10, the page looks fine, the forums are expectedly small considering it’s half the screen. Now, when one tries to maximize the browser window to 1920 or w/e it is, the forums remain just as small as they were when the screen was docked. I think this means the page is not acting responsive? I don’t know…

    I have a feeling this might not be the fault of bbpress, and maybe it’s the fault of the sidebar’s formatting. It’s like the page is fixed width with a side bar. I do need the sidebars, because of the maps for each region under my regions forum. Is there a way to fix this? Suggestions?

    Thank you for your time!

    #173698

    In reply to: How to add a sidebar

    Pascal Casier
    Moderator
    #173673

    In reply to: Hide User Role

    tech55541
    Participant

    Hello,
    Please try this CSS code.

    #bbpress-forums div.bbp-forum-author .bbp-author-role, #bbpress-forums div.bbp-topic-author .bbp-author-role, #bbpress-forums div.bbp-reply-author .bbp-author-role {
    display: none;
    }

    Thanks.

    #173670
    spottydog
    Participant

    Oops.
    Never mind.
    I had the page with the Shortcode using the same slug as used by the Forum.
    All good now.

    tech55541
    Participant

    Hello,
    It was hard, but I and another member on a private dev forum were able to figure it out. What tripped us up was this.
    https://bbpress.trac.wordpress.org/ticket/2685
    Can’t believe this has not been fixed in core yet.

    Anyway, here is my full solution. All you have to do is add this code to functions.php.

    /*Customize the BBPress roles to allow Participants to trash topics*/
    add_filter( 'bbp_get_caps_for_role', 'ST_add_role_caps_filter', 999, 2 );
    
    function ST_add_role_caps_filter( $caps, $role ){
    if( $role == bbp_get_participant_role() || $role == "default" ) {
    
    	$new_caps = 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'   => false,
                    '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'   => false,
    
                    // Reply caps
                    'publish_replies'       => true,
                    'edit_replies'          => true,
                    'edit_others_replies'   => false,
                    'delete_replies'        => true,
                    'delete_others_replies' => false,
                    'read_private_replies'  => false,
    
                    // Topic tag caps
                    'manage_topic_tags'     => false,
                    'edit_topic_tags'       => false,
                    'delete_topic_tags'     => false,
                    'assign_topic_tags'     => true,
                );	
    
    	}
    
        return $new_caps;
    }
    /*Fixes an issue that only allows mods to trash topics.
    https://bbpress.trac.wordpress.org/changeset/5852
    https://bbpress.trac.wordpress.org/ticket/2685*/
    
    add_filter( 'bbp_map_reply_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 );
    add_filter( 'bbp_map_topic_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 );
    
    // tweak for replies
    function ST_tweak_trash_meta_caps( $caps, $cap, $user_id, $args ){
    
    	// apply only to delete_reply and delete_topic
    	if ( $cap == "delete_reply" || $cap == "delete_topic" ){
    		// Get the post
    		$_post = get_post( $args[0] );
    		if ( !empty( $_post ) ) {
    
    			// Get caps for post type object
    			$post_type = get_post_type_object( $_post->post_type );
    			$caps      = array();
    
    			// Add 'do_not_allow' cap if user is spam or deleted
    			if ( bbp_is_user_inactive( $user_id ) ) {
    				$caps[] = 'do_not_allow';
    
    			// Moderators can always edit forum content
    			} elseif ( user_can( $user_id, 'moderate' ) ) {
    				$caps[] = 'moderate';
    
    			// User is author so allow edit if not in admin
                } elseif ( ! is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) {
                    $caps[] = $post_type->cap->delete_posts;
    
    			// Unknown so map to delete_others_posts
    			} else {
    				$caps[] = $post_type->cap->delete_others_posts;
    			}
    		}
    
    	}
    	// return the capabilities
    	return $caps;
    }

    I suppose this was the correct way to do it @casiepa?

    Thanks.

    #173666
    fenixbazaar2
    Participant

    Hi there,

    I have currently installed a user-rank plugin that ranks users according to their total post and thread count. The problem is that the role still lingers around under the username, which clogs things up a bit, particularly with a new image representing the user’s rank.

    What I would like to do is remove the role tag from beneath the user’s avatar all together (not remove the role itself, just the little “participant” or “keymaster” tag on the forum post).

    I have tried the following in style.css:

    .threadauthor small a {
    
    display: none;
    
    }

    Unfortunately, that didn’t do the trick.

    Any ideas?

    #173665
    uschesch
    Participant

    Hi Pascal,

    Thanks for the quick reply. There is no Subscribe next to the breadcrumbs.

    I did customize the breadcrumbs though so that it displays my wordpress forum home page instead of the default forum home page. This is what I added to the template.php file in this folder: wp-content/plugins/bbpress/includes/common

    // Add the breadcrumb
    // $crumbs[] = ‘‘ . $r[‘root_text’] . ‘‘;
    $crumbs[] = ‘Dynaman Community Forum‘;

    instead of the standard code, which is:

    // Add the breadcrumb
    // $crumbs[] = ‘‘ . $r[‘root_text’] . ‘‘;

    #173660
    uschesch
    Participant

    Hi Pascal,

    Thanks for the quick reply. There is no Subscribe next to the breadcrumbs.

    I did customize the breadcrumbs though so that it displays my wordpress forum home page instead of the default forum home page. This is what I added to the template.php file in this folder: wp-content/plugins/bbpress/includes/common

    // Add the breadcrumb
    			// $crumbs[] = '<a href="' . esc_url( $root_url ) . '">' . $r['root_text'] . '</a>';
    			$crumbs[] = '<a href="/wordpress/dynaman-community-forum/">Dynaman Community Forum</a>';

    instead of the standard code, which is:

    // Add the breadcrumb
    // $crumbs[] = '<a href="' . esc_url( $root_url ) . '">' . $r['root_text'] . '</a>';
    #173659
    aaachiaki
    Participant

    I only had about 10 plugins running. I closed down everything but BBPress, your toolkit, and a simple “under construction” page. No white/blacklisting that I know of…

    Re-ran, gave the same issue:

    WordPress database error: [Specified key was too long; max key length is 1000 bytes]
    CREATE TABLE wp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default ‘0’, meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key, meta_value) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

    #173652
    Pascal Casier
    Moderator

    Multiple possibilities:
    1) Install my ‘bbP Toolkit’ plugin
    2) Check Robin’s ‘bbp style pack’ plugin
    3) See the codex : https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#1-change-how-the-forum-list-displays

    Pascal.

    #173640
    aaachiaki
    Participant

    Pascal, thank you for responding! Downloaded 2.6 and uploaded it without problem.

    Went to import, and got a new error–>

    WordPress database error: [Specified key was too long; max key length is 1000 bytes]
    CREATE TABLE wp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default ‘0’, meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key, meta_value) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

    dtmember
    Participant

    Hi, I just add the bbpress search code posted above by robkk, and it works too fine Some private topics are also show up. How could I use this search function but not include the private topic. Or maybe it could only shows the topic name but not content. Thanks

    Is there anyone might able to solve this?

    #173633

    Topic: Sidebar

    in forum Showcase
    johnzoro
    Participant

    Not sure if this is the right place.

    On my normal pages in wordpress I have the option of using full width or having a sidebar.

    Is there this option on bbpress or do you need to create a page, then post shortcode then modify that page to full width?

    #173632

    In reply to: Delete own posts

    tech55541
    Participant

    Hello,
    Where does this code go?

    Thanks.

    #173626
    Stephen Edgar
    Keymaster

    I’ve just added support to the XenForo importer to support deleted users.

    https://bbpress.trac.wordpress.org/ticket/2922

    If you update your 2.6-alpha via this zip file you’ll have that included for your import.

    What this does is if a user has been deleted from XenForo their topics and replies are not actually deleted (they are kept to maintain context) but during import because that user no longer exists they cannot be imported and the topic/reply would then be attributed to the anonymous user. Now the topic/reply is still attributed to the anonymous user but includes the original author name, basically the same way XenForo handled this.

    Edit: You can see the difference from when the Member Two user still existed and was imported per https://cloudup.com/c_epfx4Q4z8/f, I then deleted Member Two and the result looks like this https://cloudup.com/cNnYv-3eSyl https://cloudup.com/c5iQ-iIOoW4

    #173623
    Stephen Edgar
    Keymaster

    I’ve just got my copy of Xenforo up and running locally, I don’t have an issue with reply authors here, see this screenshot https://cloudup.com/c_epfx4Q4z8

    Can you open up phpMyAdmin and run this SQL query on your Xenfor database:

    
    SELECT 
    convert(post.post_id USING "utf8mb4") AS post_id,
    convert(thread.thread_id USING "utf8mb4") AS thread_id,
    convert(post.thread_id USING "utf8mb4") AS thread_id,
    convert(post.user_id USING "utf8mb4") AS user_id,
    convert(post.message USING "utf8mb4") AS message,
    convert(post.post_date USING "utf8mb4") AS post_date 
    
    FROM xf_post AS post 
    LEFT JOIN xf_thread AS thread 
    USING (thread_id) 
    WHERE thread.first_post_id != post.post_id 
    

    You might have to change the following two lines if your database does not use xf_ as the forum prefix:

    From:

    
    FROM xf_post AS post 
    LEFT JOIN xf_thread AS thread 
    

    To:

    
    FROM myprefix_post AS post 
    LEFT JOIN myprefix_thread AS thread 
    
    #173620

    In reply to: bbpress login position

    Pascal Casier
    Moderator

    Hi Sander,
    You seem to have the pro version of SKT healing touch theme, so I would propose to ask them what to put exactly, but you will have to load the sidebar first and then the content. An example (for genesis) is here: http://www.billerickson.net/code/move-sidebar-content/

    Pascal.
    PS: Kom gerust op slack, HowTo staat op casier.eu/wp/slack

    #173616

    In reply to: Delete own posts

    LeGuerg
    Participant

    Hi,

    This code allows the author of a topic/reply to trash his own posts. This way, there is no need to give a moderate capability to Participants.

    Regards.

    #173604
    Pascal Casier
    Moderator

    Hi Biorn,

    Create a standard WordPress page and put the slug ‘forums’. Creating this page will override the standard page that comes out.

    You can then add the [bbp-forum-index] shortcode on that page (see https://codex.bbpress.org/features/shortcodes/) and change the title of your page.

    Pascal.

    #173593

    In reply to: Delete own posts

    tech55541
    Participant

    Hello there,
    What exactly does this code do? Does it allow participants to delete or trash posts? That is my question.
    I enable the capability for participants to delete posts, but they cannot delete if they cannot trash the post first. The only way for trash to show up is to enable the moderate capability which opens up way to many options. Is there any way to modify this code to only allow participants to trash their posts?

    Thanks.

    tech55541
    Participant

    Hello,
    I would really appreciate it if someone could help me get this working. I understand it is going to take some coding, but that is what it is. A forum should not require this much coding to begin with. Why do the roles have to be so confusing? Remember, if normal people cannot understand how to do something by reading the codex, that creates more threads for the more advanced issues.

    I am pretty much a nonprofit organization with my blog and a small forum, I do not have money to pay a developer, so I am asking the wonderful volunteers here to please provide some assistance.

    Thanks.

Viewing 25 results - 6,601 through 6,625 (of 32,519 total)
Skip to toolbar