Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'wordpress'

Viewing 25 results - 5,926 through 5,950 (of 32,690 total)
  • Author
    Search Results
  • #257873

    In reply to: Plugin

    valuser
    Participant
    #257869
    Antonio
    Participant

    Hi guys, I created a custom notification that is added when an user receive a like on a custom post type.

    All good unitl now, but I noticed that if the post receive 2 likes, from 2 different users, the user receive only the first notification and not the second one.

    Any help would be really appreciated.

    
    //Component declaration
    if(!function_exists('my_custom_register_wiki_notification')) {
    	function my_custom_register_wiki_notification() {
    		// Register component manually into buddypress() singleton
    		buddypress()->my_custom_wiki = new stdClass;
    		// Add notification callback function
    		buddypress()->my_custom_wiki->notification_callback = 'my_custom_wiki_like_format_notifications';
    
    		// Now register components into active components array
    		buddypress()->active_components['my_custom_wiki'] = 1;
    	}
    };
    
    //Notification format declaration
    if(!function_exists('my_custom_wiki_like_format_notifications')) {
    	function my_custom_wiki_like_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    
    		// New custom notifications
    		if ( 'my_custom_wiki_like' === $action ) {
    
    			$wiki_post = get_post( $item_id );
    			$post_title = get_the_title( $item_id );
    
    			$custom_title = sprintf( esc_html__( 'Your post "%1$s" received a like', 'my_custom' ), $post_title );
    			$custom_text  = sprintf( esc_html__( 'Your post "%1$s" received a like', 'my_custom' ), $post_title );
    			$custom_link  = get_permalink( $item_id );
    
    			// WordPress Toolbar
    			if ( 'string' === $format ) {
    				$return = apply_filters( 'my_custom_wiki_like_format', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
    
    				// Deprecated BuddyBar
    			} else {
    				$return = apply_filters( 'my_custom_wiki_like_format', array(
    					'text' => $custom_text,
    					'link' => $custom_link
    				), $custom_link, (int) $total_items, $custom_text, $custom_title );
    			}
    
    			return $return;
    
    		}
    
    		return $action;
    
    	}
    }
    
    //Function that add the notification when like is triggered
    function my_custom_add_like() {
      //...
      //...
    
      if(my_custom_is_wiki_like_notification_enabled()) {
    		        bp_notifications_add_notification( array(
    			        'user_id'           => $post_object->post_author,
    			        'item_id'           => $post_id,
    			        'secondary_item_id' => get_current_user_id(),
    			        'component_name'    => 'my_custom_wiki',
    			        'component_action'  => 'my_custom_wiki_like',
    			        'date_notified'     => bp_core_current_time(),
    			        'is_new'            => 1,
    		        ) );
    	        }
      
    }
    
    #257864
    Paul Wong-Gibbs
    Keymaster

    Hi @sfarinsky! Let’s get the terminology right, that may be why you’ve had struggle searching for answers.

    A Multi-Site is a collection of individual Sites (blogs). A Multi-Site runs inside one Network. It is possible to have Multi-Networks, which lets you run multiple Networks — all from the same set of WordPress files.

    Multi-Networks are not exposed by default, and require extra plugins to enable and manage (they’re a fairly advanced option; I have no idea how they work, to be honest).

    So, yes. You have a multisite and a network (though the latter is normally a technicality). 🙂

    Single Sign-On (SSO) should “just work”. Multiple domains should also “just work”, though you need to have a plugin that helps you achieve SSO across a multiple domain environment (because WordPress sets authentication cookies per-site, and cookies set on one site can’t be read from another site).

    If your question is how do you get domain mapping and single sign-on, I’d suggest this plugin: https://github.com/humanmade/Mercator

    Hope this helps

    #257863
    Paul Wong-Gibbs
    Keymaster

    OK, lots of plugins. I am pretty sure it must be caused by one of the other plugins, but unfortunately we can’t get any more detailed information from this error.

    Do you have a test site / development site for this? What you really need to do is switch to a default WordPress theme and see if the error message still shows up.

    If it does, then you’ll need to start deactivating your plugins until you find which one causes the error to disappear when you turn it off. Once you have that, maybe someone can look at the code for that plugin and try to understand what’s happening.

    An alternative is to add some debug code to print a more useful error message, but that’s something that should also only be done on a test/dev site.

    #257856
    sfarinsky
    Participant

    Help!

    We are trying to build our sites, currently, I have multisite and I guess a network (still trying to wrap my head around this). We have buddypress and bbpress on the secondary forum site. Here’s what we’re looking to accomplish:

    2 sites, main shop/site, forum
    Both have different domains

    -single sign-on
    -same user credentials
    -potential social integration with facebook

    Users can buy our products from main site, post about them on forum from same name, etc.

    Sounds simple, but we are having the hardest time!!

    Is this possible? If so, how do we achieve this? I have scoured the internet looking for answers and am having no such luck.

    Also, is it possible to have login without the WordPress page? Would like this as seamless as possible.

    #257852
    gokhank
    Participant

    Hi,

    It should be simple but I need help to solve it urgently. How can I convert back to buddypress registration page to original wordpress registration page?

    I do not want to use only buddypresss registration page, I want to keep the rest but I couldn’t find any way to revert it back to default wordpres version.

    Thanks in advance.

    #257845
    Ariful Alam Tuhin
    Participant

    Hello @prabin04,
    That, reloads each time click on Favorite/Remove Favorite button. So, I override BuddyPress function to add counter next to favorite button without page load.
    Here is the LINK.

    #257841
    idichoo
    Participant

    Hi guys,

    thanks for the reply, I think you have miss understand what i mean.

    At the frontend buddypress user page, every time any user login(include admin) when entered a wrong password is keyed redirect to the wordpress page. I would like to know you have any advice to show wrong password or user name entered instead of redirect to wordpress page.

    And at the frontend buddypress user page, there is no forget password link, what if the user lost his or her password (exclude admin), how can the user receive it password thru email.

    #257839
    danbp
    Participant

    Wich file format do you use for your list ? Where is this list taken from: wordpress, private list,… ?

    Pehaps you could use this plugin if you used CSV ?

    For more details, check on WP codex how to achieve this task. BP shares users with WP and is not concerned directly by your question.

    #257821
    danbp
    Participant

    Try this one which use CSS – and is working !

    Add the snippet to child-theme’s functions.php

    function replace_some_admin_menu_icons() {
    
    // dashicons-performance = f311
    // dashicons-smiley = f527
    // adminmenu is the ul ID
    // the second ID is the li
    // div is where the icon goes
    ?>
    
    <style type="text/css">
    
    #adminmenu #toplevel_page_bp-activity div.wp-menu-image:before {
      content: '\f311';
    }
    
    #adminmenu #menu-posts-reply div.wp-menu-image:before {
      content: '\f527';
    }
    </style>
    
    <?php } 
    add_action( 'admin_head', 'replace_some_admin_menu_icons' );

    Reference: WordPress Dashicons

    #257804
    Henry Wright
    Moderator

    Perhaps that filter hook is for filtering embeds in WordPress content? BuddyPress must have a filter for this. I’ll need to have a dig around…

    #257787
    danbp
    Participant

    This is confusing. Do we talk about group header image or site header image ?

    The first post of the thread mention group header. You added yours saying “i have the same problem”.
    It is not the same problem apparently !

    As example, when i go to Lotus group, the group header image is in
    <a id="header-cover-image" href=..../groups/lotus/"></a>

    So i’m pretty sure my solution should work for the group header image.

    Your custom-header-image is in a div, that’s right, but it is the general site header image.

    You received an answer on your theme support, but i suggest you try it without the error:

    The single group page
    body.single-item.groups #custom-img-header

    instead of (which is the group directory page)
    body.directory.groups #custom-img-header

    This one is working on my theme
    body.single-item.groups img.header-img

    #257776
    danbp
    Participant

    That’s very theme dependant and eventually if you customized your site it needs adjustment too. Essentially CSS and JS. Unable to tell more as you didn’t mention wich theme you use.

    Perhaps you can also try to use this plugin
    https://wordpress.org/plugins/buddymobile/

    sazler
    Participant

    Hi, things are going great on my desktop, where the WordPress profile loads on the left and the Buddypress loads on the right for the register form. But it is a mess on mobile with short fields and overlapping headings. How can I get the Buddypress section to drop below the WordPress one when viewed on mobile, so it can utiise the full width.

    #257773
    Paul Wong-Gibbs
    Keymaster

    What version of WordPress, BuddyPress, are you using?

    What theme, and what other plugins do you have active?

    #257772

    In reply to: Register LABEL

    Paul Wong-Gibbs
    Keymaster

    Ah, what’s the profile field type for that? Is it a date field type or a “Birthday” field type?

    Are you using the https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/ plugin ?

    danbp
    Participant

    See in bp-templates/bp-legacy/buddypress/members/single

    and read here for some general guidance. Note: even if only Twenty theme are described as example, you can use (more or less) the same technique for any other theme.

    What ever, all starts by creating a child-theme as very first step.

    Related to your question, do drop down list of the sub nav and hide them in the object nav fields, i think you don’t need to alter a template, but to write a custom function.

    As i can be wrong about you goal, perhaps take also a look to core file bp-core/bp-core-buddybar.php to understand how nav and subnav are instanciated.

    Read also https://codex.buddypress.org/developer/navigation-api/

    #257739
    mlwilkerson
    Participant

    I posted the final bit of my solution to this problem over on BBPress Ticket #2191 here:
    https://bbpress.trac.wordpress.org/ticket/2191#comment:17

    It’s filter code that helps bbPress to know what BuddyPress group is associate with any activities that might happen in a sub-forum.

    So the BuddyPress group still has just one forum, but that one forum can have multiple sub-forums.

    #257737
    danbp
    Participant

    [URL’s removed] by user request.
    Only 5 tickets of your’s on Trac: https://buddypress.trac.wordpress.org/search?q=dono12

    #257734
    mlwilkerson
    Participant

    Thanks for the suggestion, @earl_d. I had tried it already, but at your suggestion, I tried again. I did find one user error on part that was partially responsible for the fact that it didn’t work previously (the root group forum had a visibility of “Hidden”, which breaks makes the topic inaccessible to non-admin users). But still, your suggestion didn’t work for me.

    TLDR: I got it working, mostly, though not entirely, and not using the approach you suggested, but your suggestion sent me down a fruitful path that ended up working out. See Scenario 4 below. Posting all of this for the benefit (hopefully) of others that may come along some day trying to work through the same issue.

    (BTW, the way I interpreted your suggestion was that I should set the top-level group forum to have type=category instead of type=forum. In any case, here are my results…)

    Versions

    1. WordPress: 4.6
    2. bbPress: 2.5.10
    3. BuddyPress: 2.6.2

    Scenario 1:
    (a) Create the BP Group without an associated forum.
    (b) Separately, later, create a forum with type=category
    (c) Go to the BP Group’s settings to try and associate the Forum to the BP Group

    Fail: The forum drop-down has the category forum greyed out, probably because it’s type=category.

    Scenario 2:
    (a) Create the BP Group *with* an associated Forum (which will automatically have type=forum)
    (b) Separately, later, go edit that new Forum’s type, setting type=category
    (c) Navigate to the forum’s page within the group. Say’s “the forum is empty.”
    (d) Add a new sub-forum type=forum
    (e) Create Topic A in the sub-forum
    (f) Navigate to the group’s forum again (as a non-admin user)

    Expected: Topic A should appear
    Actual: Topic A does not appear

    (g) How about directly linking to Topic A? Maybe Topic A is accessible to the user, but somehow the template simply isn’t outputting it under (f) above?

    Expected: Topic A should be accessible
    Actual: Topic A is accessible

    Therefore: the user can see and interact with Topic, but BuddyPress doesn’t know about it as being part of the forum.

    In retrospect, what seems to have actually happened here is that the original group of type=forum was regenerated and associated with the BP Group. So our topic is probably not showing up in the Group because it’s parent is the sub-forum of a forum the forum that is no longer associated with the group.

    Scenario 3:
    I thought: If sub-forums don’t work, then maybe multiple sibling forums could work. The Settings page for BuddyPress obviously only allows you to attach one forum, though the data model seems to allow for multiples. However, after slogging through the code, it’s clear that the current version of bbPress thwarts the adding of multiple forums. In at least two places that I saw in the code (like includes/extend/buddypress/groups.php), you have something like this:

    // No support for multiple forums yet
    $forum_id = (int) ( is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids );

    So even if you were to completely bypass the user interface and do a hack of some kind to attach multiple forums to the group, this sort of code would thwart the hack.

    Scenario 4:
    So what if we go back to Scenario 1, but set up the initial group-associated forum with type=forum, instead of type=category. It would then be selectable in the admin UI, or could just be created automatically upon creation of the group.

    (a) Create a new private group with an associated forum
    (b) Go create a new private forum and set its parent to be that initial group forum
    (c) Create a topic in the sub-forum
    (d) Navigate to the forum within the group as a non-admin user

    Expected: The sub-forum should be visible and navigable
    Actual: It is! The user can click through, see the topic within the sub-forum, and reply on it.

    Conclusion: Success! This is the best and most functional scenario thus far.

    Key differences from what I’d tried and failed before:

    1. All forums involved have to be set to Private visibility. If Hidden, then some aspects of this may success, but others will fail.
    2. The forum that is associated with the group will have to be type=forum, not type=category. But I wrote a little plugin that disallows creation of new topics within a forum, without having to mark it CLOSED (thereby also disabling comments). So this will functionally turn this top-level group forum into a category/container forum anyway

    Caveat: I have noticed that when my admin user replies on the topic within the sub-forum, the BP Activity is created as expected (seen in the admin screen under Activities), but it doesn’t show up in the BP news feed of my non-admin test user. The other way works, though: if my non-admin user posts a reply to that topic, then this activity shows up in the news feed of my admin user. I need to debug that.

    #257732
    Dono12
    Participant

    @shanebp and @hnla Can you please remove my site URL from this code snippet and from the other URL below? I’m sorry to ask but the snippets
    seems to be added in Bing and Google searches. Thanks in advance.

    https://buddypress.org/support/topic/showing-wordpress-posts-on-buddypress-activity/

    Also I submitted a ticket earlier today making the request can you check if it’s in moderation and cancel it? It’s not showing in my Topics Started Page. Thanks again in advance and sorry for the trouble.

    #257726
    mlwilkerson
    Participant

    I have the same need/concern.

    Unfortunately, I think the suggestion from @openring to use https://wordpress.org/plugins/bbp-private-groups/ won’t work. I’ve looked closely at that plugin. It doesn’t seem to have anything to do with BuddyPress groups. Rather, it seems to have to do with creating it’s own role based access groups. So that’s a way of having more access control over your forums, which is valuable in and of itself, but it doesn’t pertain to BuddyPress.

    #257723
    mairaj
    Participant

    If you like to keep using Yoast for WordPress pages and exclude BuddyPress from using Yoast, you may try this.

    function wpseo_fix_title_buddypress($title) {
        // Check if we are in a buddypress page 
        if ( function_exists( 'buddypress') && ( !empty( buddypress()->displayed_user->id ) || !empty( buddypress()->current_component ) ) ) {
            $bp_title_parts = bp_modify_document_title_parts();
    
            // let's rebuild the title here
            $title = $bp_title_parts['title'] . ' ' . $title;
        }
        return $title;
    }
    add_filter( 'wpseo_title', 'wpseo_fix_title_buddypress');
    #257721

    Hello,

    we build a One-Click-Installer for our WordPress-Multisite and we would like to activate some BuddyPress components.

    First we activate the plugin programmatically and then we would like to activate the component groups per default.

    We modified array in the option bp-active-components and added ‘groups’ => 1.
    But it seems, that BuddyPress is gonna overwrite this.

    Any ideas how we can enable the group component, after the programmatically activation of BuddyPress?

    Cheers
    Andreas

Viewing 25 results - 5,926 through 5,950 (of 32,690 total)
Skip to toolbar