Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'wordpress'

Viewing 25 results - 7,876 through 7,900 (of 32,687 total)
  • Author
    Search Results
  • #243673
    danbp
    Participant

    The easiest way would be to create your own widget, as this widget is in a core file (bp-members/bp-members-widgets.php). Then you can ignore the built in widget and use yours.

    Line 307 > 309 is a div containing what you have to modify.

    <div class="item-avatar">
       <a href="<?php bp_member_permalink(); ?>" title="<?php bp_member_name(); ?>"><?php bp_member_avatar(); ?></a>
    </div>

    Change bp_member_name() to bp_member_user_nicename()

    Code related to who’s online goes from line 247 to 390.

    – Copy/paste it to bp-custom.php
    – change class name to something unique. ie. class My_Whos_Online_Widget extends WP_Widget
    – in __construct function, in $name replace (BuddyPress by Custom)
    – modify the div content by replacing bp_member_name() by bp_member_user_nicename()

    Done !
    You have to register the new widget. In bp-custom

    function register_my_custom_widget() {
        register_widget( 'My_Whos_Online_Widget' );
    }
    add_action( 'widgets_init', 'register_my_custom_widget' );

    Go to Appearance > Widget and select (Custom) Who’s Online Widget.

    Finito ! 🙂

    WP codex reference

    shadow_boi
    Participant

    Hi @danbp,

    i have tried on other default wordpress theme, the mentioned users notification does not work on any of them.
    i actually checked the notifications page, there has no notification for the mentioned action. so i dont think it might be a theme related issue. it seems like the notification event is not recorded in DB.

    so to recap of what works and what does work:

    the notification does not work if I mention someone in forum reply or in a forum topic.
    Notification works for when i mention someone in buddypress activity streams.

    shubham9
    Participant

    i am using wordpress 4.3, the latest version of wordpress and i have a social community website wherein the users can have access to both forums and social networking , but the problem is the activity streams do not refresh automatically , i have to hit the refresh button on my browser.
    can anybody suggest some plugins for the same. I am a newbie to the buddypress and wordpress community

    #243653
    danbp
    Participant

    @bfchris2, sorry, the file is here /bp-legacy/buddypress-functions.php

    cplouffe
    Participant

    Hi all,

    This may be an easy question to answer (I’m hopeful), but I’ve been unable to find a solution to my problem so far. I’m currently using WordPress 4.3 with BuddyPress 2.3.2.1 installed on my server. I have Extended Profiles enabled, and am using the plugin BuddyPress xProfiles ACL to manage custom extended profile groups assigned by user role.

    I have two roles that I am working with primarily – ‘students’ and ‘institutions’. Each of these roles have their own unique group of profile fields, some of which have the same name (e.g., each role has an ‘Address’ extended profile field). Within the bp_members loop, I am usually able to obtain a given user’s extended profile data by using the following function:

    $value = xprofile_get_field_data($field, $user_id);

    where $field is the name of the field I want to retrieve a value from in all lowercase letters (e.g., ‘Address’ would be ‘address’). I have run into an issue when trying to get field data from a profile field that has the same name for two separate user role groups. Using the same field name for both user roles will only return results for one of the roles (the role where that profile field was first created). I’m assuming the extended profile field for one of the user roles is being stored in the database with a slightly modified name, but I am unsure of how to retrieve this name.

    Is there a way to request all xprofile field names for a given group of users (or even an individual user)? If I can obtain a list of the xprofile field names – or more specifically, a list of strings I could pass to the xprofile_get_field_data function – I should be able to get all the data I am looking for.

    If you could please help me solve this problem, it would be greatly appreciated.

    Thanks a lot,
    Cam

    #243648
    danbp
    Participant

    @mangelesgcl,

    consider this plugin: https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/
    and read this plugin support topic:
    https://wordpress.org/support/topic/buddypress-integration-11?replies=4

    Other technique

    Create a new page and add your terms of service. Save.
    Add a new field to profile Base tab (the one which shows on register page).
    Field title: Terms of Service
    Field description: by checking this box you agree with our TOS. And a link to the page:
    <a href='http://my-site.com/page_name/'>Read our Terms of Services</a> Caution: use single quotes to enclose the url
    Field type: checkboxes.
    Field option: custom and only one option: TOS ! Leave it unchecked.

    On the right of the screen:

    Field requirement: required.
    Field visibility: only me and check Enforce field visibility

    Guess we’re done !

    While registering, if the checkbox is not checked, the process will stop and user will be adviced that he omited a field. Once he checked it, he can finish his subscription. This doesn’t mean he read your TOS, but you’re covered if you warned him to read TOS first. And ensure that the link is working and the page exist with content !

    Depending your country law, TOS can be more or less regulated. It’s your responsability to get informed about that before using it.

    #243642
    cplouffe
    Participant

    Sorry for the late reply – I was on vacation. Thank you for referring me to that URL, Hugo. I will admit that I should have visited the ‘Getting Started’ page before installing BuddyPress and looked for big picture issues in the WordPress installation as opposed to zoning in on my specific problem.

    I don’t know if an error message could be added letting the user know when the GD module is not installed on the server (perhaps this could be difficult…), but having some sort of indication of why the error was encountered would be helpful in debugging.

    Thanks again,
    Cam

    Paul Bursnall
    Participant

    You could also use this plugin. Exclude the URLs you want to be accessible to all. Everything else will be hidden, including from SERPS.

    https://wordpress.org/plugins/jonradio-private-site/

    #243624
    danbp
    Participant

    Which theme do you use ? Seems you renamed yours to Test, and i was unable to find it somewhere.
    Also, do you use a cache plugin ? If it’s the case, disable it or clear it while testing CSS.

    I cannot put it in maintenance mode

    This is not necessary if you had a local copy. I strongly recommend you do that if you want to manage correctly a high traffic site.

    You can use a child-theme for your theme, not for BP which has no theme since 1.9. The one called bp-default is no more maintained and is only in for temporary backward compatibility for (very) old BP site.

    BP use templates, which are stored in bp-templates/bp-legacy/buddypress/. Those templates are tailored to fit with almost any recent (and decently coded) themes.

    Creating a child theme is explained on hundreds of sites and on WP’s codex. Additionnal infos for BP are given here.

    #243622
    Henry Wright
    Moderator

    I’m not sure what the “provider user identifier” is? If it’s something in WordPress Social Login, try asking the question over at their support forum. They should be up to speed on it.

    #243620
    Henry Wright
    Moderator

    You’d need to use Ajax. Take a look at the Ajax in Plugins article for more info.

    #243619
    Henry Wright
    Moderator

    How are you linking your style sheet? Make sure you’re using wp_enqueue_style().

    Ref: https://codex.wordpress.org/Function_Reference/wp_enqueue_style

    #243618
    danbp
    Participant

    @dayan89,

    could it be that you created your Top menu, by adding a new menu without having two different menu location in your theme ? This can explain why you see always your item, what ever menu you choose. This happen because you try to assign 2 different menus to a same place.

    Following snippets where successfully tested with Twenty Twelve.

    This fires the profile link on the menu tab.

    function profile_button_menu_item ( $items, $args ) {
       
    // menu name. Primary is default main menu location in Twenty themes
        if ( $args->theme_location == 'primary') {
            $items .= '<li><a href="' . bp_loggedin_user_domain() . 'profile/public/">' . __('My Profile') . '</a></li>';
        }
        return $items;
    }
    add_filter( 'wp_nav_menu_items', 'profile_button_menu_item', 10, 2 );

    The following explains how it works with 2012.

    In 2012’s header.php, there is only one menu, located line 45
    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) );?>

    To use 2 menus, I added below that line another location
    <?php wp_nav_menu( array( 'theme_location' => 'top', 'menu_class' => 'nav-menu' ) );?>

    In child-theme’s functions.php, i added

    
    function register_my_menu() {
      register_nav_menus(
        array(
          'top' => 'Top'   
        )
      );
    }
    add_action( 'init', 'register_my_menu' );

    Under Menu Settings (wp-admin/nav-menus.php) i have now 2 theme locations.
    Primary Menu and Top
    Understand here that 2 locations are different of having only 2 menus. Location is a unique place for ONE menu.

    Of course, I have 2 different menus. One is assigned to Primary Menu location, the other one to Top location.

    And i can now move my profile item from one to other menu, by simply changing the location (primary ⇔ top) in profile_button_menu_item function.

    Codex reference: https://codex.wordpress.org/Navigation_Menus

    #243612
    danbp
    Participant

    Hi @djsteveb,
    I don’t have that tab under menus on my other bp install Really ? Have you activated buddypress in screen options ? Just in case of… 😉

    BuddyPress Links in WordPress Menus

    dayan89
    Participant

    Hi,

    I have two menu areas on my website: main and top. I would like to add user profile link to top menu only.

    I found this example, which was were useful: https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#8-add-edit-profile-to-a-wordpress-menu But it adds link to both menus, top and main. I would like to add user profile link only to top menu, without adding it to main menu.

    Can you help me please?

    #243582
    shaunik
    Participant

    I have existing site with 500 plus users and already have WP profile fields created a while ago with simple fields like address, city, state and Zip and custom fields like year joined and speciality.
    I am planning on deploying Buddypress to add functionality to the site. How can sync all these fields with XProfiles fields
    I know https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/ help you create Xprofile fields and https://wordpress.org/plugins/bp-xprofile-wp-user-sync/ help you sync first and last name.
    How about all other fields. I need members to be able to message each other, create events, map each other by location and events by location and finally create groups. Do I need BuddyPress or alternate that work with WP Profiles will work.

    Thanks/Shaunik

    #243576
    danbp
    Participant

    @xrossgg,

    read some advice here.

    #243574
    danbp
    Participant

    @creationp,

    once you have identified the correct element id or class, you add !important to the new rule you want for it.
    In a child-theme style.css preferably, something like:

    h1.entry-title {
     color: #DDD!important;
    }

    Note that this example will we applied to ALL page title.

    #243572

    In reply to: PHP 7.0 compatibility

    danbp
    Participant

    @vinzen, wait a little or accept yes and no ;-). PHP 7.0.0 RC 1 is out since 2015/08/21…. RC version should not be used on production sites.

    WordPress and BP are both guaranted to work only on the latest stable release of anything needed to get them to work. But you can test at your own risk, RC’s and trunk version are avaible for that.

    php7 has a projected release date of November 2015. Next WP release is scheduled in december 2015. And BP around october…

    WP devs are already using php7 for unit test. More from here (WP) and here (BP).

    #243569
    XrossGG
    Participant

    Thanks Henry, Maybe you have just opened up a new world to me. I’ve been working with Salesforce in the past to store a lot of personal information, now it’s a different CRM/online marketing system. I was never aware that WordPress could be used as a CRM system. I would need something advanced though, something like Salesforce and then also an online marketing tool included. Quite honestly, I would love to keep everything inside WordPress, but I’m not sure that something like that exists. Would there be any (eventually paid) specific solutions that you could advise?

    What I need is at least the following (and much more…):
    * store all details from visitors (personal details, mailing preferences, interests, etc), with advanced search and selection functionalities
    * send an automated email to members that weren’t active for the past x months
    * Send an automated thank you email to people who joined an event
    * Track email, login, site activity
    * Etc etc.

    #243568
    Henry Wright
    Moderator

    You could use WordPress as your CRM. There are quite a few plugins in the repo for that purpose. My advice is to set up a test install, try them out and see which one works best for you.

    #243566
    danbp
    Participant
    shanebp
    Moderator

    Custom notifications in non-components is tough.

    Have you try hooking bp_notifications_get_notifications_for_user with a higher priority than what bbPress uses? Something like 8 instead of 10?

    You may want to submit a ticket to bbPress about the orphaned return in their function.

    Marc
    Participant

    Hi everyone,

    I’am currently try to add custom notification from a non BuddyPress component. I’m using this hooks:
    bp_notifications_get_registered_components
    bp_notifications_get_notifications_for_user
    and this function:
    bp_notifications_add_notification

    Everything works well except the hook bp_notifications_get_notifications_for_user. My problem is in my installation there is the bbPress plugin. It is also using this hooks. So this hooks is call twice, and the $action argument is empty or contain the rendered notification content. So I’m not allowed to do the right things on the second call.

    I must add this to this file in bbPress plugin :
    /wp-content/plugins/bbpress/includes/extend/buddypress/notifications.php on line 78 (at the end of the function return $action):

    
    /**
     * Format the BuddyBar/Toolbar notifications
     *
     * @since bbPress (r5155)
     *
     * @package bbPress
     *
     * @param string $action The kind of notification being rendered
     * @param int $item_id The primary item id
     * @param int $secondary_item_id The secondary item id
     * @param int $total_items The total number of messaging-related notifications waiting for the user
     * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
     */
    function bbp_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    
    	// New reply notifications
    	if ( 'bbp_new_reply' === $action ) {
    		$topic_id    = bbp_get_reply_topic_id( $item_id );
    		$topic_title = bbp_get_topic_title( $topic_id );
    		$topic_link  = wp_nonce_url( add_query_arg( array( 'action' => 'bbp_mark_read', 'topic_id' => $topic_id ), bbp_get_reply_url( $item_id ) ), 'bbp_mark_topic_' . $topic_id );
    		$title_attr  = __( 'Topic Replies', 'bbpress' );
    
    		if ( (int) $total_items > 1 ) {
    			$text   = sprintf( __( 'You have %d new replies', 'bbpress' ), (int) $total_items );
    			$filter = 'bbp_multiple_new_subscription_notification';
    		} else {
    			if ( !empty( $secondary_item_id ) ) {
    				$text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) );
    			} else {
    				$text = sprintf( __( 'You have %d new reply to %s',             'bbpress' ), (int) $total_items, $topic_title );
    			}
    			$filter = 'bbp_single_new_subscription_notification';
    		}
    
    		// WordPress Toolbar
    		if ( 'string' === $format ) {
    			$return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr( $title_attr ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $topic_link );
    
    		// Deprecated BuddyBar
    		} else {
    			$return = apply_filters( $filter, array(
    				'text' => $text,
    				'link' => $topic_link
    			), $topic_link, (int) $total_items, $text, $topic_title );
    		}
    
    		do_action( 'bbp_format_buddypress_notifications', $action, $item_id, $secondary_item_id, $total_items );
    
    		return $return;
    	}
    	return $action;
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications', 10, 5 );

    And i have to do the same thing for my custom notification rendering.

    So my question is quite simple: Is this a bug? A bug from bbPress? A bug from BuddyPress? Or I am not using the hook properly?

    Please advice me, and I create a ticket if it is necessary.

    Thanks in advance.

    #243554
    Killa_
    Participant

    Hey. Is there a way to output permanent steam links in profiles using WordPress Social Login?
    It can output a permanent ID in “provider user identifier” field of WSL which can be linked to any custom buddypress field, but how do I convert it to something like this: steamcommunity.com/profiles/<provider_id> ?

Viewing 25 results - 7,876 through 7,900 (of 32,687 total)
Skip to toolbar