Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,401 through 4,425 (of 32,518 total)
  • Author
    Search Results
  • Robin W
    Moderator

    to only have it for a specified form, you add the form id

    eg

    add_action( 'gform_after_submission_5', 'set_post_content', 10, 2 );

    will make it fire only for gravity form ID 5

    #191087
    Robin W
    Moderator

    try this in your custom css

    .container {
    	width: 100%;
    }
    
    .et_pb_widget {
    word-wrap : normal ;
    }
    
    #sidebar .bbp-login-form label {
    	width: auto;
    }
    #191078
    semperaye
    Participant

    Shouldn’t there be some functions code in there somewhere? I’m using the php code snippets plugin so I don’t really know how to code these things i’m just copying and pasting into that…

    #191077
    semperaye
    Participant

    I’m still getting “page not found” with abufrank’s code.

    #191074

    In reply to: Creating Custom Search

    Adolfo Augusto
    Participant

    It was necessary create file bbpress.php, copy the files for folder(in my theme) bbpress: content-search, loop-search and pagination-search.

    how this post

    Getting Started in Modifying the Main bbPress Template

    for tamplate customized.

    #191059
    Robin W
    Moderator

    It could be coded, but it would be an hours work and several calls. A plugin that relies on bbpress should check that when loaded, but whilst I know most of mine do, I couldn’t swear that they all do !!

    #191057
    erich199
    Participant

    Hello,
    I’m trying to rename the current roles as well as ADD new roles. When I add the filter to change the current role name, it doesn’t add the new user role I’ve added. If I remove that code, then the new user role shows up.

    This is the code I’m using.

    //BBpress Custom Roles // 
    function add_new_roles( $bbp_roles )
    {
        /* Add a role called tutor */
        $bbp_roles['bbp_lead'] = array(
            'name' => 'Community Lead',
            'capabilities' => custom_capabilities( 'bbp_lead' )
            );
     
        return $bbp_roles;
    }
     
    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_lead' )
            $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 'tutor' role */
            case 'bbp_lead':
                return array(
                    // Primary caps
                    'spectate'              => true,
                    'participate'           => true,
                    'moderate'              => true,
                    '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'    => true,
     
                    // Topic caps
                    'publish_topics'        => true,
                    'edit_topics'           => true,
                    'edit_others_topics'    => true,
                    'delete_topics'         => true,
                    'delete_others_topics'  => true,
                    'read_private_topics'   => true,
     
                    // Reply caps
                    'publish_replies'       => true,
                    'edit_replies'          => true,
                    'edit_others_replies'   => true,
                    'delete_replies'        => true,
                    'delete_others_replies' => true,
                    'read_private_replies'  => true,
     
                    // Topic tag caps
                    'manage_topic_tags'     => true,
                    'edit_topic_tags'       => true,
                    'delete_topic_tags'     => true,
                    'assign_topic_tags'     => true,
                );
     
                break;
     
            default :
                return $role;
        }
    }
    // End BBpress Custom Roles //
    
    //BBpress Rename Roles //
         /* BBPress Renaming Roles */
        add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
        function ntwb_bbpress_custom_role_names() {
        return array(
        // Keymaster
        bbp_get_keymaster_role() => array(
        'name' => 'Administrator',
        'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
        ),
        // Moderator
        bbp_get_moderator_role() => array(
        'name' => 'Moderator',
        'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
        ),
        // Participant
        bbp_get_participant_role() => array(
        'name' => 'Member',
        'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
        ),
        // Spectator
        bbp_get_spectator_role() => array(
        'name' => 'Spectator',
        'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
        ),
        // Blocked
        bbp_get_blocked_role() => array(
        'name' => 'Blocked',
        'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
        ));}
    //BBpress Rename Roles End //
    #191054

    In reply to: list of all functions

    Nate Zander
    Participant

    Bump. Would love an actually complete codex to help guide theme development.
    https://codex.bbpress.org/developer/ 🙁

    #191016
    Robin W
    Moderator

    ok, so

    1. Save the attached code to your pc, as a new file called reply.js
    2. Create a directory on your theme called ‘js’, and copy the renamed file reply.js to it, so that you end up with wp-content/themes/%my-theme%/js/reply.js

    where %my-theme% is the name of your theme

    Let me know if this works

    addReply = {
    	moveForm : function(replyId, parentId, respondId, postId) {
    		var t = this, div, reply = t.I(replyId), respond = t.I(respondId), cancel = t.I('bbp-cancel-reply-to-link'), parent = t.I('bbp_reply_to'), post = t.I('bbp_topic_id');
    
    		if ( ! reply || ! respond || ! cancel || ! parent )
    			return;
    
    		t.respondId = respondId;
    		postId = postId || false;
    
    		if ( ! t.I('bbp-temp-form-div') ) {
    			div = document.createElement('div');
    			div.id = 'bbp-temp-form-div';
    			div.style.display = 'none';
    			respond.parentNode.insertBefore(div, respond);
    		}
    
    		reply.parentNode.insertBefore(respond, reply);
    		if ( post && postId )
    			post.value = postId;
    		parent.value = parentId;
    		cancel.style.display = '';
    
    		cancel.onclick = function() {
    			var t = addReply, temp = t.I('bbp-temp-form-div'), respond = t.I(t.respondId);
    
    			if ( ! temp || ! respond )
    				return;
    
    			t.I('bbp_reply_to').value = '0';
    			temp.parentNode.insertBefore(respond, temp);
    			temp.parentNode.removeChild(temp);
    			this.style.display = 'none';
    			this.onclick = null;
    			return false;
    		}
    				
    		try { t.I('bbp_reply_content').focus(); }
    		catch(e) {
    			
    
    			
    			
    		}
    		
    		
    
    		return false;
    	},
    
    	I : function(e) {
    		tinymce.execCommand('mceFocus',false,'bbp_reply_content');
    	}
    	
    	
    	
    }
    #191015
    Robin W
    Moderator

    ok, so

    1. Save the attached code to your pc, as a new file called reply.js
    2. Create a directory on your theme called ‘js’, and copy the renamed file reply.js to it, so that you end up with wp-content/themes/%my-theme%/js/reply.js

    where %my-theme% is the name of your theme

    Let me know if this works

    addReply = {
    	moveForm : function(replyId, parentId, respondId, postId) {
    		var t = this, div, reply = t.I(replyId), respond = t.I(respondId), cancel = t.I('bbp-cancel-reply-to-link'), parent = t.I('bbp_reply_to'), post = t.I('bbp_topic_id');
    
    		if ( ! reply || ! respond || ! cancel || ! parent )
    			return;
    
    		t.respondId = respondId;
    		postId = postId || false;
    
    		if ( ! t.I('bbp-temp-form-div') ) {
    			div = document.createElement('div');
    			div.id = 'bbp-temp-form-div';
    			div.style.display = 'none';
    			respond.parentNode.insertBefore(div, respond);
    		}
    
    		reply.parentNode.insertBefore(respond, reply);
    		if ( post && postId )
    			post.value = postId;
    		parent.value = parentId;
    		cancel.style.display = '';
    
    		cancel.onclick = function() {
    			var t = addReply, temp = t.I('bbp-temp-form-div'), respond = t.I(t.respondId);
    
    			if ( ! temp || ! respond )
    				return;
    
    			t.I('bbp_reply_to').value = '0';
    			temp.parentNode.insertBefore(respond, temp);
    			temp.parentNode.removeChild(temp);
    			this.style.display = 'none';
    			this.onclick = null;
    			return false;
    		}
    				
    		try { t.I('bbp_reply_content').focus(); }
    		catch(e) {
    			
    
    			
    			
    		}
    		
    		
    
    		return false;
    	},
    
    	I : function(e) {
    		tinymce.execCommand('mceFocus',false,'bbp_reply_content');
    	}
    	
    	
    	
    }
    #191011
    Robin W
    Moderator

    yes add this to your child theme function file

    add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply') ;
    function rew_no_reply () {
    Return 'xxx@yyy.com' ;
    }

    changing xxx@yyy.com to wehatever address you want

    #190997
    discusspf
    Blocked

    Hi, I am using bbPress 2.5 here: https://discusspf.com/community/

    My problem is occurring as follows: I have the forum set up so it displays the recent topics as a shortcode on a page for the forum. This works fine for me (keymaster) and displays a create topic box at the bottom of the forum. However, for normal users it displays that they cannot create topics on the forum index, but when they navigate to a particular forum area they are able to create topics then. What is causing this issue and how might I fix it?

    Thanks in advance.

    #190992
    TechHaus
    Participant

    Ok, found this… still digging…

    bbp_show_lead_topic

    #190989
    Robin W
    Moderator

    I think it is

    add_action( 'bbp_template_before_replies_loop', 'rew_shortcode' ) ;

    #190958
    cri00
    Participant

    Hello!

    We are looking to modify BBpress meaning:

    – remove the possibility for anonymous users posting answers to questions.
    – remove BBpress notices like ”You can publish HTML content” or ”You can use BBCodes to format your content”.
    – remove the website field request when asking a question, along subject type and question status.
    – add a name for the description field regarding the title of the subject.
    – customize the right sidebar to include: add a question, search and categories of the forum.

    We are using bbpress 2.5.14 and wordpress 4.7.9. Any help will be much appreciated.

    Thank you!

    #190943
    lilymonsterz
    Participant

    I am unable to have access to the “Name” field in the Profile editor. Even as an Admin, I can’t change my displayname/profile name.

    The only way I can is to go into

    Inspect Element>Rightclick
    Find and click “<fieldset class=”bbp-form” style=”display: none;”>
    <legend>Name</legend>” tag in the page.

    Edit the “element.style” from “display:none;” to “display:block;”.

    Unfortunately this element has a “Display:none” embedded into the code that I can’t seem to find anywhere else in the back end to manually force it to display.

    If anybody could help me I would be very grateful.

    http://prntscr.com/ip4o89

    #190924
    discusspf
    Blocked

    My installation is here: https://discusspf.com/community/

    My trouble is with font sizes. OP seems to be too small, all further replies are decent size and anything included in a quote is huge. Is there a way to change these just for the bbPress part of my theme? I have the ability to add custom CSS for bbPress but don’t know what code to add. Can someone please supply code which will make OP and quote text the same size as all the replies. Thanks a bunch in advance!

    #190923
    principiante
    Participant

    Sorry Robing,
    I still missing member register on this kind of pages:

    Velero compartido Agosto 2011


    Is that thread?
    Please…can you tell me code for this? Something like:
    add_action( ‘bbp_template_before_topics_?????’ , ‘rew_shortcode’ ) ;
    Thanks a lot!

    #190920
    w3215
    Participant

    Thanks. Something that truly gave a clean interface (like gutenberg or medium.com as mentioned) would be ideal. But if there are not currently options for that for the bbpress text editor, are there options to improve the editor from the default?

    For example, to make it comparable to the text editor for ‘Discourse’ forum sites? (like https://discuss.reactjs.org/ or https://discuss.atom.io/).

    I have heard there may be a way to turn on the tinyMCE toolbar in bbpress, which is an improvement.

    However, I’m new to wordpress, but that seems to normally go along with a text editor that gives the writer two less than ideal options: a (i) “visual” option with the tinyMCE (the problem being it strips away a lot of formatting–for example removing tabs if you paste code in) or (ii) the basic “text” option, which is not great for a general audience bc it requires the writer deal with stuff like tags and html-jargon. Its also confusing to give users two different options that seem to do the same thing but in slightly different ways.

    So, if a Gutenberg-like experience is too much to ask right now, is there anything around that can give users the straightforward toolbar experience of the “Discourse” text editor?

    w3215
    Participant

    Hi! I would like to provide the best writing experience possible for users of the forum I plan to set up with bbpress. Gutenberg is a good example–a clean “elegant” interface, options to go full screen (so the only thing user sees is where they will write), options to style with a button click, and option to easily insert code snippets with a button click. Its comparable to using good writing software, and no need for non-technical users to know what “UL”, “OL”, “Li” etc mean.

    I have been looking through some plugins for styling bbpress, but I have not seen them discuss this aspect. Are there options available to make the bbpress text editor “elegant” in a way that is comparable to Gutenberg or the writing experience on a spot like medium.com?

    #190896
    Partizan
    Participant

    Ok i fixed my problem by leaving the forum root slug as it is and just went and created a new bbpress.php in my theme folder… and selected the look of the index page from theme in code.

    Thank you!

    #190894
    Partizan
    Participant

    Hi!

    First of all thanks for quick response. Its not just breadcrumbs that are affected – all topics links have the same problem. Ok let me try to describe…
    1. I made change with method 1.
    2. I have changed forum root from original permalink forums to forums-test.
    3. New page permalink is set to forums and i call index forum with code on this page and it works – it shows forum root but all links of topics and subforums offcourse are affected with change of forum root link change and links to forums-test.
    4. If i set forums-test back in forum settings to just forums then my page that is supposed to show forum index called with code gets overridden with original forum page and page theme i don’t want.

    #190827
    atouba1887
    Participant

    Hello,
    thanks for the answer. No we use the shortcode [bbp-register]

    #190816
    ericross
    Blocked

    Hi,
    I got the below information from http://forum.wpbeaverbuilder.com/ this site .

    You’ll want to check the bbPress codex for that. Check the link below for more info.
    https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #190815
    ericross
    Blocked

    I think this could work try this code, may be it works.

    1- Please add following code to Quick CSS in Enfold theme options under General Styling tab

    .single-topic #bbpress-forums {
    margin-top: 0;
    }
    2- They do not show up on the bottom by default. If you would like to show, please add following code to Functions.php file in Appearance > Editor

    add_action( ‘bbp_template_after_single_topic’,’bbp_bottom_pagination’ );
    function bbp_bottom_pagination() {
    $output = bbp_get_template_part( ‘pagination’, ‘replies’ );
    return $output;
    }

Viewing 25 results - 4,401 through 4,425 (of 32,518 total)
Skip to toolbar