Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,376 through 4,400 (of 32,522 total)
  • Author
    Search Results
  • #191528
    Stephen Edgar
    Keymaster

    I’ve just created the user testtest on the site

    I can login successfully using the following 3 methods:
    • Using Chrome on my desktop
    • Using Chrome emulating an iPhone 7+
    • Using my iPhone 7+ directly

    Using the above 3 methods worked successfully logging in at *both* these URLs:
    http://www.getswing.co.uk/wp-login.php
    http://www.getswing.co.uk/forums/

    The only other things I can suggest is checking with your webhosting if you have any firewall applications or rules that might be the cause of this.

    p.s Feel free to the delete the testtest account I created

    #191516
    Pascal Casier
    Moderator

    I have no solution unfortunately. And reminding is not chasing 🙂

    You don’t have any code snippets added in a function.php that you forgot to deactivate when deactivating all plugins?

    #191515
    michaellanfield
    Participant

    Hi. I would like to edit the search bar height and remove the grey border but not to cut off the text. What code do I add to custom css? Thanks.

    #191511
    Robin W
    Moderator
    $post_id = bbp_get_forum_last_active_id($forum_id)) ;
    $last_author  = get_post_field ('post_author', $post_id);
    #191509
    ico33
    Participant

    Hi guys, I can’t understand why but today the widget of the recent replies has a strange issue. And just in ONE topic.

    What does I mean? I have this widget going on for months. Everything was ok.

    It shows the 7 most recent replies, but when a reply is in a specific topic, there is the issue. You click on the last reply (of that topic!) and you are brought to the first page of the topic, and not to the last message. If in the 7 most recent replies there are other topics, wverything is ok and you get the last reply. I see that the issue is in the link the widget generates for that specific topic, and don’t know why the other topics are ok. Even this single topic was ok, but since 3 or 4 days, there is that issue with that topic.

    ES:

    Now my widget shows the 7 most recent replies. This is the link of the reply of the “problematic topic”

    mondolapdance.it/forums/topic/monella/#post-12435

    Here is the link of another reply of a different topic
    mondolapdance.it/forums/topic/pupa-club/page/20/#post-12434

    As you can see, the topic “Monella” doesn’t have the pagination in the link. Why? That topic is 67 pages. But clicking on it (it’s the link in the most recent replies widget) you go to the first page, not to the last replies as it happens for others replies.

    #191507
    Radzio125
    Participant

    Thanks for answer. Unfortunately I want to get only user ID number. I want use this to do something like this:

    $last_author = id_of_the_forum_topic_last_active_user
    $user = get_user_by('login',$last_author);
    if (is_user_online($user->ID)) {
    } else {
    }

    What do I need to put in place of the id_of_the_forum_topic_last_active_user?

    #191497
    Robin W
    Moderator

    $author = bbp_get_author_link( array( 'post_id' => bbp_get_forum_last_active_id($forum_id)) ;

    #191477
    Rakesh Roy
    Participant

    Is it possible to choose a reply of a topic as an answer or best reply?
    Nay plugin or code example
    Thanks in Advance

    #191473
    djhorne
    Participant

    @casiepa

    Thanks for coming back.

    So I my theme is mobile optimised – and have tested others

    I have run test using Google Inspect and I get

    Request URL: http://www.getswing.co.uk/wp-login.php
    Request Method: POST
    Status Code: 403 Forbidden
    Remote Address: 46.30.215.105:80
    Referrer Policy: no-referrer-when-downgrade

    When I run it on a responsive sit using Google Inspect – I get in

    Request URL: http://www.getswing.co.uk/wp-login.php
    Request Method: POST
    Status Code: 302 Found
    Remote Address: 46.30.215.105:80
    Referrer Policy: no-referrer-when-downgrade

    When I use http://www.getswing.co.uk/wp-admin/

    It works on mobile

    #191453
    Robin W
    Moderator

    bbpress uses the wordpress default avatar as set in

    dashboard>settings>discussion

    There are plugins that let you add additional defaults eg

    Add New Default Avatar

    or use code in your functions file or a snippets plugin (https://en-gb.wordpress.org/plugins/code-snippets/) such as

    add_filter( 'avatar_defaults', 'mytheme_default_avatar' );
    function mytheme_default_avatar( $avatar_defaults ) 
    {
        $avatar = get_option('avatar_default');
    
        $new_avatar_url = get_template_directory_uri() . '/images/default_avatar.png';
    
        if( $avatar != $new_avatar_url )
        {
            update_option( 'avatar_default', $new_avatar_url );
        }
    
        $avatar_defaults[ $new_avatar_url ] = 'Default Avatar';
        return $avatar_defaults;
    }
    #191439
    avaiya
    Participant

    Is there a way to have my main Forum page show up with my 3 Forums listed, but NOT show the subforums underneath each forum? Instead, I’d like to have people click through on Forum 1, for example, to see the sub forums within Forum 1.

    I’m using this shortcode to show my forums on the main forum page:

    [bbp-forum-index]

    #191438
    Robin W
    Moderator

    bbpress just uses the display name as set in

    dashboard>users>all Users>edit user

    so you could change your users to what you want.

    users can change their individual if you give them access to their wordpress profile or their bbpress profile.

    There are some plugins and code that can change stuff eg

    Quick Tip: Set the Default Display Name for WordPress Users

    I googled ‘wordpress change display name for all users’ and lots lots of stuff.

    #191433
    avaiya
    Participant

    I’m using bbPress for my membership site, and when people do things like use bold or italicized letters, add any of the custom things on the menu when they create a post, if they are subscribed to the post, they get a notification email that looks like this:

    Hi @ande!

    Thanks for checking on me. 😊 I worked through The Process and I do feel better. Here’s what I came up with. Am I doing this right?
    <div><span style=”font-size: 24px; font-weight: bold;”>The Process™ Worksheet:</span></div>
    <div></div>
    <div><span style=”color: #09afff; font-weight: bold;”>Step 1:

    How can we fix this so the emails don’t show up in code?
    Thanks!

    Editor Mike
    Participant

    add_filter( ‘bbp_number_format’, ‘rew_number_format’, 10 , 5) ;

    function rew_number_format ($number_format, $number, $decimals, $dec_point, $thousands_sep) {
    	$thousands_sep = '' ;
    return apply_filters( 'rew_number_format', number_format( $number, $decimals, $dec_point, $thousands_sep ), $number, $decimals, $dec_point, $thousands_sep );
    }
    Robin W
    Moderator

    can you post exactly what you put in the code snippets please

    Robin W
    Moderator

    probably easier to just add the plugin ‘code snippets’ into your site and put the code there.

    That way you will not risk breaking your site

    #191346
    mar6co
    Participant

    Hi bbpress friends,

    I want to combine the shortcode with a href html command. At the moment iam doing this:

    <td>
    
    [caption id="attachment_238" align="aligncenter" width="150"]<a href=[bbp-topic-form forum_id=659]><img class="wp-image-238 size-thumbnail" src="http://hilf-mir-aus.de/wp-content/uploads/2018/03/internet.png" alt="" width="150" height="150" /></a> Internet & Technik[/caption]
    </td>

    Any guesses, its not working…

    #191274
    tvirtual
    Participant

    I am looking to do just what the original poster was looking for:
    When a user creates a new topic, the menu assigned to this new topic should be the same menu as the forum. It is currently using the default WordPress menu. Can someone point me to the right code and where to add it to automatically assign the right menu to new topics? I appreciate your help.

    #191251
    hanza3
    Participant

    I’m looking to do something relatively simple – move the tags in a single topic post up under the title, rather than under the search bar – their default position.

    I’ve been going through to files to try and figure out where this code would be but since there are so many files in default > bbpress I was hoping to get some direction on where to find the relevant code.

    Thanks!

    #191244
    Cars10
    Participant

    When you enter a forum, a list of Topics is shown, but the table header says “Forum” instead of “Topics”. I have checked the source code and _e(“Forum”, “bbPress”) is used, and probably elsewhere as well.
    There does not seem to be a way to properly rename each label in bbPress.

    1. I think the label is wrong as we list Topics and not Fora
    2. Could bbPress not facilitate to rename more labels? Our customer even wants the label to be CATEGORIES rather than even Topics.

    I know, I could add a JS per page plugin and do a jQuery to renbame, but that ius of course the LAST resort – bad design.

    Thanks for any hints to achieve or a fix on bbPress (e.g. adding a filter for certain such areas)

    Carsten

    #191192
    Robin W
    Moderator

    The message in the .po is

    ‘This user…’

    but in your example it is

    ‘you are…’

    The code should be translated

    but you can just put this in your functions file

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'You are not currently subscribed to any forums' ) {
    	$translated_text = 'new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );

    and change ‘new text’ to whatever it should say

    #191160
    erich199
    Participant

    Hi @robin-w,

    I managed to get this to work with this code
    I needed a custom role and I also needed to reorder it in my legend. This code made it work

    //BBpress Custom Roles // 
    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 //
    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() )
    		),
    		'bbp_lead' => array(
            'name' => 'Community Lead',
            'capabilities' => custom_capabilities( 'bbp_lead' )
            ),
    		// 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 //
    Robin W
    Moderator

    This code will limit the topic title to 80 or whatever number you set $length to

    Put it in your child theme functions.php file

    add_filter ('bbp_new_topic_pre_title' , 'rew_limit_topic_length' ) ;
    add_filter ('bbp_edit_topic_pre_title' , 'rew_limit_topic_length' ) ;
    
    function rew_limit_topic_length  ($topic_title) {
    	$length = 80 ;
    	if (strlen($topic_title) > $length) {
    		$topic_title = substr($topic_title, 0, $length);
    	}
    return $topic_title ;
    }
    Robin W
    Moderator

    The only solution I found was 8 years old

    may well still be valid – link to this please

    #191143
    Robin W
    Moderator

    can you say which shortcode(s) you are using on that page

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