Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,901 through 6,925 (of 32,519 total)
  • Author
    Search Results
  • #171995
    Pascal Casier
    Moderator

    The SQL I have is to wipe out ALL data from bbPress, so that’s not what you want.

    Workaround proposal:
    If you go on your dashboard > Replies > All Replies (so /wp-admin/edit.php?post_type=reply), and then select the forum in the dropdown box that says ‘in all forums’ and click filter.
    In the screen options, put the ‘number of items’ to e.g. 100.
    Delete some screens in this way…

    Does that work ?

    Then the same with the topics, empty the trash and try to delete the forum.

    Pascal.

    #171994
    Pascal Casier
    Moderator

    What exactly do you want to edit ?
    That shortcode will show you the index table. If you want to change something in it, have a look at https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ if you find what you want to change.

    Pascal.

    #171981
    Pascal Casier
    Moderator

    After you installed bbPress, 3 new items should appear in your dashboard: Forums, Topics and Replies. That last one shows all the replies.
    The standard link is /wp-admin/edit.php?post_type=reply

    Pascal.

    #171980
    Pascal Casier
    Moderator

    For the forum list in your sidebar, check the widget: https://codex.bbpress.org/features/widgets/

    To edit the ‘index forum page’, create a standard WordPress page and change the slug to ‘forums’. This new page will then be used in stead of the standard list. You can then of course use the [bbp-forum-index] shortcode to display the list of forums.

    Pascal.

    #171979

    In reply to: smiles in the bbpress

    selenii
    Participant

    Yes it works, but how can I insert it on my text tool as a bbcode for the choice. I will that my users have one option to choice some smile from the list.

    #171977

    In reply to: smiles in the bbpress

    Pascal Casier
    Moderator

    As bbPress is using WordPress below, it supports the basic ones.
    When I type :-) or :-P, it automatically converts them to πŸ™‚ or πŸ˜›

    So if you have set that option, it comes automatically.

    Pascal.

    #171971

    In reply to: smiles in the bbpress

    Pascal Casier
    Moderator

    As said, the basic ones are already in WordPress (Dashboard: Settings > Writing > Formatting).

    If you want more, but no full plugin, check the code of the above plugins to see how they did it.

    Pascal.

    #171962

    In reply to: smiles in the bbpress

    Pascal Casier
    Moderator

    Hi,

    If you want custom smilies or stickers, then check for plugins like ‘wp-Monalisa’ or ‘Font Emoticons’, however bbPress can use WordPress’s supplied smilies, see https://codex.wordpress.org/Using_Smilies and https://codex.wordpress.org/Emoji
    πŸ˜› πŸ’€ πŸ‘» πŸ‘½ 😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾 πŸ™Œ πŸ‘ πŸ‘‹ πŸ‘ πŸ‘Š

    Pascal.

    #171961
    selenii
    Participant

    How can I use smiles in the bbpress. I will insert it in my reply form.

    For example with:

    <script type="text/javascript">
    function addsmile($smile){
    document.getElementById('comment').value=document.getElementById('comment').value+' '+$smile+' ';
    }
    </script>
    <?php
    global $wpsmiliestrans;
    $dm_showsmiles = '';
    $dm_smiled = array();
    foreach ($wpsmiliestrans as $tag => $dm_smile) {
     if (!in_array($dm_smile,$dm_smiled)) {
     $dm_smiled[] = $dm_smile;
     $tag = str_replace(' ', '', $tag);
     $dm_showsmiles .= '<img src="'.get_bloginfo('wpurl').'/wp-includes/images/smilies/'.$dm_smile.'" alt="'.$tag.'" onclick="addsmile(\''.$tag.'\');"/> ';
     }
    }
    echo '<div style="width:100%; margin-left:0px; margin-right:0px;">'.$dm_showsmiles.'</div>';
    ?>

    But it did not works. Have anybode idea why?

    #171958
    stewmills
    Participant

    I temporarily solved my problem by installing this widget, as I just got FTP access today and have not attempted to follow other options via creating a bbPress.php page, etc.

    Here’s the plugin: https://wordpress.org/plugins/bbpress-login-register-links-on-forum-topic-pages/

    You can edit it and configure 4 different places that it shows up, but it’s not in the plugin options, you have to “edit” the plugin and you’ll see the code that designates what shows up where, such as this:
    add_action(‘bbp_template_before_pagination_loop’,’bbpressLoginRegisterLinksOnForumPage’);

    #171926
    Robin W
    Moderator

    but yes as Pascal says, you do need to list the forums that you want to include

    and I have just updated the plugin for a technical error which should not affect you, but you may want to load the latest version from my site

    http://www.rewweb.co.uk/bbpress-additional-shortcodes/

    #171925
    Robin W
    Moderator

    ok, I think I know the problem.

    If you copied/pasted the shortcode from my website, it incorrectly formats the shortcode on your website.

    I’ve now corrected, so if you go back onto my website and copy/paste then it will now work.

    or just type the shortcode in !

    scorpnetwork
    Participant

    Hi!

    Late, but here is my promised Feedback.

    The Forum is just too big to get this going. I am paying a Coder not to get a custom Script for this.

    Cant wait to finally switch to BBpress…

    Thanks for the help tho!

    #171920
    Pascal Casier
    Moderator

    But… you wanted to limit to some forums, no ?

    So let’s say you only want to show 5 topics from forums 10, 11 and 12, then you would put:
    [bbp-display-topic-index show='5' forum='10,11,12']

    Pascal.

    #171914
    awal16
    Participant

    I 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;
    	}
    }
    
    #171910
    cookavich
    Participant

    I created a test page with this as the content:

    [bbp-display-topic-index show=’5β€²]
    
    [display-newest-users show = ’10’]

    This was the result:

    screenshot

    #171903
    Pascal Casier
    Moderator

    The 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.

    #171889
    Robin W
    Moderator

    ok so for the roles, you should see and use

    Custom Capabilities

    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 πŸ™‚

    #171888
    Robin W
    Moderator

    your 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 !

    #171883
    Stephen Edgar
    Keymaster

    You can also use bbp_create_initial_content() with some bbp_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

    ying-sun
    Participant

    hi. 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?

    #171875
    Robin W
    Moderator

    no, 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/

    #171873
    Robin W
    Moderator

    can you tell me what you are putting as the shortcode?

    #171872
    Robin W
    Moderator

    https://codex.bbpress.org/themes/theme-compatibility/

    should answer your questions, but do come back if you need further help !

    #171867
    cookavich
    Participant

    That 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.

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