Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,126 through 1,150 (of 32,432 total)
  • Author
    Search Results
  • #228312
    DeepBlue
    Participant

    Hi Robin

    How can i show unread messages with your plugin ?

    i suppose it is with shortcodes, but i didnt find a shortcode to show unread messages

    i want to show unread messages on a dedicated page, so i would need a shortcode

    thanks 🙂

    #228309
    Robin W
    Moderator

    This function should do that – change “mysite.com/login” to where you want it to go

    function rew_change_text( $translated_text, $text, $domain ) {
    	if ( $text == 'You do not have permission to view this forum.' ) {
    	$translated_text = 'This forum is visible only to this group members, please click <a href="mysite.com/login">here</a> and sign up for this group';
    	}
    	return $translated_text;
    }
    
    add_filter( 'gettext', 'rew_change_text', 20, 3 );

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    #228279
    Keith_Saunders
    Participant

    I have the same issue which I have been trying to find a solution for days now.

    Like angelfire4xx I just want to create roles for Gold, Silver and Bronze members.

    Like others I have scanned lots of posts and documentation and tried various suggestions.

    I have in my child functions the following which I did manage to actually create roles, but they did not work using the following code

    function add_custom_role( $bbp_roles ) {

    $bbp_roles[‘BRONZE Member’] = array(
    ‘name’ => ‘BRONZE Member’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ));

    $bbp_roles[‘SILVER Member’] = array(
    ‘name’ => ‘SILVER Member’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ));

    $bbp_roles[‘GOLD Member’] = array(
    ‘name’ => ‘GOLD Member’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ));

    return $bbp_roles;
    }

    add_filter( ‘bbp_get_dynamic_roles’, ‘add_custom_role’, 1 );

    When I installed the “Members” plugin it told me the following

    Warning: Undefined array key “bronze_member” in /homepages/17/d531871193/htdocs/clickandbuilds/BeoworldForum/wp-content/plugins/members/inc/functions-roles.php on line 257

    for each of the created custom roles, hence why it does not work.

    Can anyone suggest a way forward other than what is already been posted.

    #228201
    ollietubb1
    Participant

    Thanks Robin,

    I thought that for some reason I was unable to use shortcodes in my particular situation but the project has been a long build and I have forgotten why! Will have a fresh look.

    Thank you,
    Ollie

    #228200
    Robin W
    Moderator

    if you create a wordpress page with the same slug as your forum – typically ‘forums’, and put the shortcode

    [bbp-forum-index]

    this should then look like the existing forum.

    If so, then before the shortcode add a block in which you can put text or a link or whatever you want

    #228180
    Brian Henry
    Participant

    Best to create a staging site for your bbPress install and try to import your IPB. I remember a lot of trial and error to get as much as I did working, so you might need to write some code. But it _should_ work for forums and posts – at least, it did for the one migration I needed to do 3.5 years ago.

    #228175
    Mike Witt
    Participant

    I’m just looking for any ideas on how to debug this. I don’t see how it would be a bbPress problem, but on the BuddyPress forum they basically said “Ask bbPress and GeneratePress.” So I’m doing that.

    WordPress 5.9.2, BuddyPress 10.1.0, bbPress 2.6.9
    (I haven’t upgraded to BP 10.2.0 yet, but I don’t see any fixes that seems to apply to this.)
    It happens “once in a while” since upgrading to BP 10.1.0. (Four times since March 9th.)
    It *might* be related to email notifications (mentions?) in a bbPress closed topic.

    [09-Mar-2022 17:13:53 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND user_id = 1348 AND component_name = 'messages' AND component_action = 'new' at line 1 for query UPDATE wp_bp_notifications SET is_new = 0 WHERE item_id IN () AND user_id = 1348 AND component_name = 'messages' AND component_action = 'new_message' made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/generatepress/page.php'), generate_do_template_part, get_template_part, locate_template, load_template, require('/themes/generatepress/content-page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, bp_replace_the_content, apply_filters('bp_replace_the_content'), WP_Hook->apply_filters, BP_Members_Theme_Compat->single_dummy_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require('/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/home.php'), bp_get_template_part, bp_locate_template, load_template, require('/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/messages.php'), bp_get_template_part, bp_locate_template, load_template, require('/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/messages/single.php'), bp_thread_the_message, BP_Messages_Thread_Template->the_message, do_action('thread_loop_start'), WP_Hook->do_action, WP_Hook->apply_filters, bp_messages_screen_conversation_mark_notifications, bp_notifications_mark_notifications_by_item_ids, BP_Notifications_Notification::update_id_list

    #228149
    DeepBlue
    Participant

    I agree with you, but i tested bbpress with the top 20 wordpress themes, and confirmed that user profile and search pages were not detected by any theme

    all other pages are detected except those 2

    it’s like those 2 pages don’t belong to the same template than other bbpress pages in the core code

    #228148
    Robin W
    Moderator

    that would tend to indicate an issue with bbpress and elementor working together, which I have already seen with their Hello theme.

    bbpress works to WordPress standards, many theme builders exist because they see WordPress as a restriction and feel they can offer improvements, so stretch and alter what WordPress does, which can then can make plugins have issues.

    Because it is open source, and there are no definitive rules, it is wrong to say that it is a bbpress problem, or indeed an elementor problem or a divi problem, each makes their own code to work, but you cannot guarantee interoperability of everything with everything.

    #228118
    DeepBlue
    Participant

    Hi

    Two solutions : you can either use this plugin :

    or an easier solution, add this css, it will hide the possibility to change nickname (it will be only possible to change if from admin dashboard)

    i think this is a good choice, as you dont want your members to constantly change their nicknames

    label[for=nickname] {
        display: none!important;
    }
    input#nickname {
        display: none!important;
    }
    label[for=display_name] {
        display: none!important;
    }
    select#display_name {
        display: none!important;
    }
    #228116
    DeepBlue
    Participant

    Addon : to hide search form from user profile tabs too (recent topics and recent replies tabs) :

    /*Hide search form on all tabs topics and replies*/
    #bbp-user-body .bbp-search-form {
        display: none;
    }
    #228114
    DeepBlue
    Participant

    Sure 🙂

    #bbpress-forums div.bbp-search-form {
    	display: none!important;
    }
    #228112
    Robin W
    Moderator

    it is theme related, but add this to the custom css part of your theme

    #bbpress-forums {
    	padding: 15px !important;
    }

    I can’t help with the subscribe, as that only shows to logged in users.

    #228109
    Robin W
    Moderator

    quoting the actual code you used would be useful 🙂

    #228090
    DeepBlue
    Participant

    Hi

    I use [bbp-forum-index] on a page but it show a search box on top right, how to get rid of it ?

    Thanks !

    #228089
    DeepBlue
    Participant

    Hi

    Im working on this on file loop-single-topic.php

    How can i show only user avatar ?

    as in the code above this line show avatar AND user name :
    <span class=”bbp-topic-freshness-author-av”><?php bbp_author_link( array( ‘post_id’ => bbp_get_topic_last_active_id(), ‘size’ => 48 , ‘type’ => ‘avatar’ ) ); ?></span>

    How can i show only avatar on left side and on right side date of last post AND last poster name

    like this bbpress site for instance:

    https://olympus.crumina.net/groups/hiking-route/forum/

    Thanks

    Robin W
    Moderator

    That is how it is supposed to be.

    The dashboard is for administration, generally sites hide the dashboard from ordinary users either by using code or a plugin such as

    Hide Admin Bar Based on User Roles

    #228078
    meembat
    Participant

    I am using bbpress notify (no spam). I just dropped the no spam part in the post.

    I am ok with the Bcc. Just need to figure out how to ensure bbpress notify (no spam) does not interfere with the notifications from subscriptions.

    The alternative would be default all users to be subscribers to all forums. Is there a plugin for that? Or else may need some code or direct database changes to implement that.

    #228077
    Robin W
    Moderator

    I had NOT set bbpress notify to override bbpress subscriptions, so not sure why it was still disabling those notifications.

    I suspect that plugin assumes you want to override the subscriptions – but no idea.

    However, the email seem to have been addressed to noreply@domain, with the user email Bcc’ed

    Yes this is how bbpress now does this. The idea is that many mailservers chop lots of emails being sent at once, so this avoids that pitfall in theory. The fact that the noreply goes nowhere is not an issue as such, and you’ll find that many sites use this method.

    You can use this to amend that, though old this plugin still works

    AsynCRONous bbPress Subscriptions

    and if you want to amend the sending email use

    bbp style pack

    and dashboard>settings>bbp style pack>Subscription Emails

    Finally you might want to try

    https://wordpress.org/plugins/bbpress-notify-nospam/ as a better version of the notify plugin

    #228069
    DeepBlue
    Participant

    Hi

    Subforums appear like this by default :

    Parent Forum
    Subforum

    Subforum

    Subforum

    When looking at the source code, there are 2 <br> between each subforum, which explains the line break : <br><br>

    i would like to remove those line breaks to have this :

    Parent Forum
    Subforum, Subforum, Subforum

    which is the way main Forum CMS show subforums

    Do i need to edit a file ? or any easier way with bbp style pack plugin ?

    Thank you 🙂

    #228032
    DeepBlue
    Participant

    Ok actually i found the solution, for those who are looking for this :

    create a /css/ folder in your child theme with a tinymce-custom-editor.css with :

    body#tinymce.wp-editor {
        font-family: Sans-serif,Arial!important;
    }

    then add in your functions.php :

    // EDITOR TINYMCE CHANGE POLICE
    add_filter( 'mce_css', 'add_custom_editor_style' );
    function add_custom_editor_style() {
        return get_stylesheet_directory_uri() . '/css/tinymce-custom-editor.css';
    }
    #228022
    Robin W
    Moderator

    sorry, I thought I had answered that above, you play with these settings

    .mce-content-body p {
    	font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
    	font-size: 16px;
    	color: #333;
    	overflow-wrap: break-word;
    	word-wrap: break-word;
    }
    #228008
    Robin W
    Moderator

    Is this plugin not compatible with Enfold?

    or you could ask

    is enfold not compatible with this plugin?

    check out

    https://kriesi.at/support/topic/getting-bbpress-to-work-with-the-enfold-theme/

    and perhaps raise with enfold as this is a paid theme

    #228000

    In reply to: Similar topics bbpress

    Robin W
    Moderator

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    #227999

    In reply to: Similar topics bbpress

    Robin W
    Moderator

    add_action( 'bbp_template_after_single_topic', 'rew_other_topics' );

Viewing 25 results - 1,126 through 1,150 (of 32,432 total)
Skip to toolbar