Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 3,376 through 3,400 (of 32,481 total)
  • Author
    Search Results
  • Hammy Havoc
    Participant

    Hi everybody!

    I’m having some problems importing from the latest phpBB into the latest bbPress.

    I get the following error:

    1. No passwords to clear
    2. No users to import

    Everything else appears to import as expected.

    #205588
    Chuckie
    Participant

    This works:

    		'video'      => array(
    			'controls' => true,
    			'width'    => true,
    			'height'   => true,
    		),
    		'source'     => array(
    			'src'    => true,
    			'type'	 => true
    		)
    #205587
    PDidee
    Participant

    Since the latest update to 2.6.0 I’ve noticed that I am unable to click into the visual editor on replies to posts. Text tab works but the text area for the visual editor isn’t working at all. I can’t click into the space and type anything there. I’m using the following code to use the visual editor…

    function bbp_enable_visual_editor( $args = array() ) {
    $args['tinymce'] = true;
    $args['teeny'] = false;
    return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

    function bbp_tinymce_paste_plain_text( $plugins = array() ) {
    $plugins[] = 'paste';
    return $plugins;
    }
    add_filter( 'bbp_get_tiny_mce_plugins', 'bbp_tinymce_paste_plain_text' );

    function bavotasan_bbpress_upload_media( $args ) {
    $args['media_buttons'] = true;

    return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bavotasan_bbpress_upload_media' );

    function add_theme_caps() {
    $role = get_role( 'subscriber' );
    $role->add_cap( 'upload_files' );
    }

    add_action( 'admin_init', 'add_theme_caps');

    #205585
    Chuckie
    Participant

    Is this right? I don’t want to blindly add the code so I appreciate confirmation:

    'video'      => array(
    	'controls' => true,
    	'width'    => true,
    	'height'   => true,
    ),
    'source'     => array(
    	'src'    => true
    )

    ?

    #205578
    Chuckie
    Participant

    So I have this code for html tags not showing in topics for non-admin:

    // Stop HTML Tags appearing in bbPress posts for non-admin users
    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,
    			'href'     => true,
    			'title'    => true,
    			'rel'      => true,
    			'class'    => true,
    			'target'   => true,
    		),
    
    		// Quotes
    		'blockquote' => array(
    			'cite'     => true,
    		),
    		
    		// Div
    		'div' => array(
    			'class'     => true,
    		),
    		
    		// Span
    		'span'          => array(
    			'class'     => true,
    			'style'     => true,
    		),
    
    		// Paragraph
    		'p'          => array(
    			'dir'    => true,
    			'style'  => true,
    		),
    		
    		// Code
    		'code'       => array(),
    		'pre'        => array(
    		'class'      => true,
    		),
    
    		// Formatting
    		'em'         => array(),
    		'strong'     => array(),
    		'del'        => array(
    			'datetime' => true,
    		),
    
    		// Lists
    		'ul'         => array(),
    		'ol'         => array(
    			'start'    => true,
    		),
    		'li'         => array(),
    
    		// Images
    		'img'        => array(
    			'class'    => true,
    			'src'      => true,
    			'border'   => true,
    			'alt'      => true,
    			'height'   => true,
    			'width'    => true,
    		),
    
    		// Tables
    		'table'      => array(
    			'align'    => true,
    			'bgcolor'  => true,
    			'border'   => true,
    		),
    		'tbody'      => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'td'         => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'tfoot'      => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'th'         => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'thead'      => array(
    			'align'    => true,
    			'valign'   => true,
    		),
    		'tr'         => array(
    			'align'    => true,
    			'valign'   => true,
    		)
    	);
    } 

    I need to add some more tags to this list because my topics now support embedded videos. A user did a topic and it shows as:

    <video controls=”controls” width=”300″ height=”150″>
    <source src=”path; /></video>

    What must I add to this tags array for this?

    Thanks

    #205576
    livefree
    Participant

    In using bbstyle pack, when I have it set to have edit profile in the menu, it refers to this link…
    /users/*username*/edit
    … but I end up with an error page…
    “Sorry, This Page Is Gone.
    The page you are trying to view no longer exists or has been moved. You may try the search form below to find it.”

    I also tried the bbstyle pack shortcode [bsp-profile] and same result as above.

    You asked on another thread…
    What have you got set for dashboard>settings>forums>forum user slugs>user base ?
    It is set to the default… I never changed it…
    users

    I found an old plugin as a workaround, but I would rather not add another plugin, especially one that is not updated for the past two years…
    /plugins/bbp-profile-link-shortcode/

    When I use that plugin, it works fine for profile edit… I put their shortcode in a sidebar widget… and it refers to this link…
    /users/*username*/
    … this link works to reach Profile.

    Here is the problem…

    I have my wp in a sub folder of the domain, WordPress Address (URL).
    And, the Site Address (URL) is the domain root.

    bbstyle pack is using the WordPress Address (URL) … adding the folder to the link string … and not the Site Address (URL)…like this…

    /domain/folder/users/*username*/edit
    … this will not work… “Page is Gone”

    /domain/users/*username*/edit
    … this works.

    Is there a way to change the setting for bbstyle package to use the Site Address (URL) as opposed to the WordPress Address (URL)?

    #205575
    Robin W
    Moderator
    #205570
    Robin W
    Moderator

    this will let you change text if you need it – not as good as having an ‘accepted translation’ but better than English

    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    add_filter(  'ngettext',  'rew_bbpress_translate' , 20 , 3 );
    
    function brexit_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            'Topic' => 'New-word',
                             'topic' => 'new-word',
             );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
         return $translated;
    }

    just change what you need and add to in the middle section

    Put this in your child theme’s function file – or use

    Code Snippets

    #205562
    Chuckie
    Participant

    As already mentioned I have the information displayed with the functions code tweak. Thanks for the referral to the plugin though.

    #205546
    Oxibug
    Participant

    Hi There!

    For guys whom using action hook {bbp_forum_metabox}, It was uses ($post_id) and since v2.6.0 they modify the variable into WP_Post object so if you use {$post_id} to get your custom meta values it won’t work and you must modify it to {$post->ID} instead of {$post_id}.

    I extremely recommended to make two functions using {version_compare} with bbp_get_version() to solve this.

    if( version_compare( bbp_get_version(), '2.6.0', '<' ) ) {
        // Use $post_id
        add_action( 'bbp_forum_metabox', array( $this, 'bbp_forum_metabox' ) );
    }
    else {
       // Use $post->ID
       add_action( 'bbp_forum_metabox', array( $this, 'bbp_forum_metabox_GTv260' ) );
    }
    #205529
    pipipi07
    Participant

    Thank you for making it 2.6!
    However, there was a problem after the update.

    I use bbpress in Japanese.
    In ver.2.5, a code that sets the topic title to 20 characters in Japanese was added to functions.php and it worked properly.
    This is the code.

    function title_max_length ($ default) {
    $ default = 20;
    return $ default;
    }
    add_filter ('bbp_get_title_max_length', 'title_max_length');

    But after 2.6, it didn’t work.
    For example, if default = 20, only 6 characters will be reflected in the title in Japanese. If it is half-width alphanumeric characters, up to 20 characters are correctly reflected.

    I know this is a multibyte issue, but I don’t know how to deal with it. Can I change the limit on the number of characters in a title even with multibyte?
    I hope to find a good solution.

    I am not good at English. I’m sorry in terrible English. thank you for reading!

    #205526
    livefree
    Participant

    Also, Robin… I ran along this path because in bbstyle, this shortcode didn’t work…
    [bsp-profile]
    … it leads to …

    …/forumslug/users/email@gmail.com
    And, I get…

    “Sorry, This Page Is Gone.
    The page you are trying to view no longer exists or has been moved. You may try the search form below to find it.”

    #205523
    livefree
    Participant

    I have to use the workaround and can’t use the default edit profile link… which I would prefer …
    the default link is …
    /forumslug/users/emailgmail-c*o*m/edit
    … it doesn’t work

    the edit profile link is…
    …/forumslug/users/emailgmail-c*o*m

    the workaround is this plugin, but I would rather not add another plugin, especially one that is not updated for the past two years.

    Any thoughts on how I could list the edit profile correctly, say, in a widget or with a code?

    #205519
    randrcomputers
    Participant

    Glad im reading tonight as i use same shortcode so will wait for 2.6.1

    #205505
    Chuckie
    Participant

    My phpBB database is 3.2.7

    I was trying to look at your source code for the phpBB importer but I can’t quite follow the logic.

    #205501
    Chuckie
    Participant

    I was not able to use the previous phpBB importer as it was failing right at the start. This new version seems to work better! However, I have some comments about this.

    1/ A possible problem.

    Here is my log (which I paused in the end):

    Import Stopped (by User.)

    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%
    9.Calculating topic stickies (0 through 99 of 100)0%
    8.No anonymous topic authors to import
    7.All topics imported100%
    7.Converting topics (900 through 928 of 928)90%
    7.Converting topics (800 through 899 of 928)80%
    7.Converting topics (700 through 799 of 928)70%
    7.Converting topics (600 through 699 of 928)60%
    7.Converting topics (500 through 599 of 928)50%
    7.Converting topics (400 through 499 of 928)40%
    7.Converting topics (300 through 399 of 928)30%
    7.Converting topics (200 through 299 of 928)20%
    7.Converting topics (100 through 199 of 928)10%
    7.Converting topics (0 through 99 of 928)0%
    6.No forum subscriptions to import
    5.All forum parents imported100%
    5.Calculating forum hierarchy (0 through 25 of 25)0%
    4.All forums imported100%
    4.Converting forums (0 through 30 of 30)0%
    3.Skipping password clean-up
    2.Skipping user clean-up
    1.Skipping sync-table clean-up
    Starting Import...
    Ready to go.

    The issue was step 9 where it seemed to be in a ever repeating cycle of:

    9.Calculating topic stickies (7 through 100 of 100)100%
    9.Calculating topic stickies (100 through 7 of 7)100%

    2/ Feature Request

    Because I was not able to previously import content I came up with a new simplified set of forum categories etc in my bbPress forum. Therefore, ideally I would love to be presented with a list of forums that are going to be imported so that I can map them to the existing forums I have created. So some would be merging several into one if that makes sense.

    At the moment (even though I hit stop on point 9) I was able to view the forum and could seem many boards imported – a quick look it looked great. It is just that I wanted control over how the topics were imported. Thus my idea for the mapping from old forums to current forums.

    Can this be done?

    Please let me know if I need to give more info.

    I don’t know if this should be a “trac ticket” or not.

    Well done guys.

    Andrew

    PS. The related question (which can be closed and linked to this new one is: https://bbpress.org/forums/topic/importing-from-phpbb-5/).

    #205474
    Chuckie
    Participant

    We have shortcodes for the login and password reset process.

    The login form has a logout button that avoids the confirmation prompt.

    The default logout experience asks the user to confirm.

    What would be nice is ability for a logout shortcode that we can put on our own page so that the question is asked consistent with the theme.

    I am using My Theme Login plugin so I can specify what page to use for logout.

    As mentioned, the login form is avoiding the prompt but it would be nice if it was optional to show the prompt and that it could be done on our own page.

    #205467
    livefree
    Participant

    ok, found the setting for this item …
    “* How do I remove this from the menu?”
    … under the bbp style pack

    But, the second issue still is a problem and prevents me from using the bbpress edit profile method …
    *When that menu item is clicked, “Edit Profile”, it reaches this page…
    …/forumslug/users/emailgmail-c*o*m/edit (added * to get this to post)
    And it gives this error…
    “Sorry, This Page Is Gone.
    The page you are trying to view no longer exists or has been moved. You may try the search form below to find it.”
    Why is this link incorrect and can it be corrected?

    I use a shortcode for the forum user profile and works and the link is this…
    …/forumslug/users/emailgmail-c*o*m (added * to get this to post)
    (the “… /edit” is missing from this link and it works)

    scmsteve
    Participant

    I pulled down the latest from the repo because I saw quite a bit of work was going on… Very excited to see the movement, and wanting to get in on the testing to be sure things are working ok. Maybe I jumped in the middle of some commits and that is my problem, but…

    I am updating an earlier v2.6 dev release, which was working fine. But after doing the update and starting to test, a rather large error showed up on the first page where the shortcode [bbp-forum-index] is showing the list of forums, but none of the subforums under them.

    I was trying to track this down via WP-CLI, but doing the shortcode from there, or even calling bbp_list_formums() is returning nothing at all, so the context must not be set up properly. I can’t figure out how to use that as a debugging path, and don’t really know offhand what is the right way.

    If this isn’t the right location in the forums here, please let me know which section is better. 🙂

    #205456
    livefree
    Participant

    WP Version 5.2.4
    bbPress Version 2.5.14
    bbp style pack Version 4.3.2

    When logged in, the main nav is showing “Edit Profile” and links to
    …/forumslug/users/emailgmail-c*o*m/edit (added * to get this to post)

    Two questions:
    * How do I remove this from the menu?
    (I have checked the main menu and it’s not showing this item under Appearance > Menus
    I have deactivated all plugins… also tried wp2019 theme … no change)
    *When that menu item is clicked, it reaches this page…
    “Sorry, This Page Is Gone.
    The page you are trying to view no longer exists or has been moved. You may try the search form below to find it.”
    Why is this link incorrect and can it be corrected?

    I use a shortcode for the forum user profile and works and the link is this…
    …/forumslug/users/emailgmail-c*o*m (added * to get this to post)
    (the “… /edit” is missing from this link and it works)

    Mahalo!

    #205445
    Chuckie
    Participant

    Thanks for this. I couldn’t work out why HTML tags were displaying for other users except me then I spotted the question about user roles.

    Adding this code in appears to fix the issue.

    #205418
    Robin W
    Moderator

    private forums overrides bbpress, and you would simply need to make any ‘hidden’ forums only accessible to a group that say contains admins.

    I think this still works

    Remove Private: label prefix

    Put this in your child theme’s function file – or use

    Code Snippets

    #205414
    Robin W
    Moderator

    ok, the code works in my test site, so a reply edit admin link show ‘hello’ instead of ‘Edit’.

    If this is not the case, then it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Then come back

    #205394
    Robin W
    Moderator

    ok, where did you put the code?

    #205387
    Robin W
    Moderator

    ok, so this (untested) one should put the class in for the edit, and change the word edit to ‘hello’

    can you test and let me know that it works, and I’ll look at the others.

    add_filter ('bbp_before_get_reply_edit_link_parse_args' , 'rew_get_reply_edit_link' ) ;
    
    function rew_get_reply_edit_link ($args) {
    	$args['link_before'] = '<i class="fa fa-edit">' ;
    	$args['link_after'] = '</i>' ;
    	$args['edit_text'] = 'hello' ;
    	
    return $args ;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

Viewing 25 results - 3,376 through 3,400 (of 32,481 total)
Skip to toolbar