Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,426 through 1,450 (of 3,787 total)
  • @danbp

    Participant

    Which role is concerned ?

    Does that member exist ? Is it pending or spammed ?
    Have you tried with another display filter on member’s directory ?

    In reply to: Likes don’t show up

    @danbp

    Participant

    BuddyPress doesn’t use likes. This is probably due to a plugin.
    Test first with twenty fifteen, and if the issue is still in, ask the plugin author.

    @danbp

    Participant

    Hi, perhaps you omited a dot or another php element. Anyway, below snippet add same fonction to members directory by using the appropriate filter, so you haven’t to touch the template.
    Add it to child theme functions.php or bp-custom.php

    Show user’s role on member directory

    function who_are_you_dir() {
    
    $user = new WP_User( bp_get_member_user_id() );
    
    	if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    		foreach ( $user->roles as $role ) {
    
    	/**
    	 * Fetch the user's role. See https://codex.wordpress.org/Roles_and_Capabilities
    	 * _e('role name', 'text_domain' ) allows use of translation
    	 * else use echo "role name"; 
    	*/
    
    		// Output
    			if ( $role == 'administrator') {
    			echo "Administrator";
    			} 
    
    			if ( $role == 'subscriber') {
    			echo "Subscriber";
    			} 
    
    			if ( $role == 'contributor') {
    			echo "Contributor";
    			}
    
    			if ( $role == 'author') {
    			echo "Author";
    			}
    
    			if ( $role == 'editor') {
    			echo "Editor";
    			} 
    		}
    	}
    }
    add_filter ( 'bp_directory_members_item', 'who_are_you_dir' );

    To show user’s role(s) on his profile, you can use this:

    Show user’s role on profile

    function blablabla() {
    
    $user = new WP_User( bp_displayed_user_id() );
    
    	if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    		foreach ( $user->roles as $role )
    			echo $role;
    	}
    }
    add_action( 'bp_before_member_header_meta', 'blablabla' );
    In reply to: Creat Group Problem

    @danbp

    Participant

    My question was does the page really exist. This means simply that you have to check for this in WP’s pages list and in BP settings for page, that this page is showing in regard of group : page selectbox.

    Do you use plugins other than BP ? If yes, deactivate all except BP and test with 2015.
    https://codex.wordpress.org/Debugging_in_WordPress

    @danbp

    Participant

    xprofile component use his own tables:
    _bp_xprofile_data
    _bp_xprofile_fields
    _bp_xprofile_groups
    _bp_xprofile_meta
    See here for detailed structure: https://codex.buddypress.org/developer/buddypress-database-diagram/

    Somehow related to your question, this topic who explains how to use bp_update_user_meta (update_user_meta belongs to WP)

    In reply to: Creat Group Problem

    @danbp

    Participant

    Have you permalinks activated ?
    Does the page really exist ?
    Have you tested with 2014 or 2015 theme ?

    @danbp

    Participant

    @jmunce, nice extension effort ! Why not contributing to BP’s codex ?

    An answer to your question:
    https://buddypress.org/support/topic/my-contributions-tab-with-subtabs/

    Note, related to ” the right way”: BuddyPress is filtrable to 95% (or so).
    https://codex.buddypress.org/type/action/
    https://codex.buddypress.org/type/filter/

    @danbp

    Participant

    Hi,

    before finding something, you have to search. What do you search ? Nobody knwos ! 😉

    Generally, custom work in Bp is done around template files.
    bp-templates/bp-legacy/buddypress/

    Custom code can be added via bp-custom.php (you have to create this file manually and install it in wp-contet/plugins/ folder

    And here a good ressource to search (if you know what) and to get any needed information around that search: http://hookr.io/plugins/buddypress/#index=a

    Another tool to use locally and which can be helpfull is notepad++, which has an incredible built-in search engine. But like with the online tool, you have to know what to search.

    @danbp

    Participant

    There is a solution for this. See this plugin.

    @danbp

    Participant

    @1amyone,

    you simply have to copy/paste the media url into the form.
    Note that you can only use WP’s allowed medias. See the list.

    read also about media embedding on the BuddyPress codex.

    Embeds

    @danbp

    Participant

    No. But ou can replace the word in the language file by an empty space html entity (& n b s p ; ) and simply add an image, or better, a dashicon, via css.

    @danbp

    Participant

    You can try to modify
    \buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.php

    To do so, you need a template overload
    Be carefull with class & id’s, as this part is actually working with ajax to show/hide

    @danbp

    Participant

    hopefully I’m not asking too many questions… You do, but with a guitar, so i don’t be too afraid (i have 3 near me)

    If you use rtmedia, there is no reason to use mediapress as both do more or less, the same thing. And vice versa.

    I don’t use rtmedia so i don’t know how it works and display content in BP.
    What is the tab with bio, info ? Do you mean the original WP profile page ? Are you speaking about the admin profile page ?

    Embeding a wp content is not very difficult. Search the forum for embed post on profile. I answered one of this question a few days back with a complete solution.

    @danbp

    Participant

    Hi,

    activation and register are not added automatically when you install BP. You have to assign them manually.

    Register and Activation Pages


    Aside you need also to activate permalinks in your WP install to get BP working correctly.

    @danbp

    Participant

    Hi,

    recommended method for this is to use the language file.

    Customizing Labels, Messages, and URLs

    If you search the forum, you will find many topics about this subject.

    @danbp

    Participant

    @danbp

    Participant

    Hum… copy/pasting is not very complicated. Another way would be to use MediaPress, which works great on profiles. Or even custom post type, but this would be longer to get it to work within profiles. Depends of your php knowledge.
    Also, custom work like this is over the scope of this forum.
    I give you a BuddyPress way to do that. Now it’s your turn to decide and to do. 😉

    @danbp

    Participant

    @canadianmusicnetwork,

    i never used BuddyForms, so i can’t help you with this. Ask on their support if a specific audio field exist or can be added, and how.

    That said, WP comes with all of this, but later. Meaning by this that a user will be able to upload an audio file once it is already registered.

    It is commonly accepted that nothing can be added to a site as long as a new user is not validated or pending.

    On a standart install, i would use a simple text field on a new field group named Audio. And, eg., if you allow 5 files, use 5 fields.

    BP strips HTML on prfoile fields, so it’ not possible by default to get the automatted embed like in a post. Why is unclear to me, as embed is implemented since BP 1.6 for activities, groups, but not profiles… Anyway, a little bp-custom snippet magic (here it is ! ) will let you do this.

    function set_audio_field( $field_value ) {
    	$bp_this_field_name = bp_get_the_profile_field_name();
    	// field name (case sensitive)
    	if( $bp_this_field_name == 'N° 1' || $bp_this_field_name == 'N° 2' ) {
    		$field_value = strip_tags( $field_value );
    		$field_value = '';
    	}
    	return $field_value;
    }
    add_filter( 'bp_get_the_profile_field_value','set_audio_field');

    That’s it for site admin. Now for the user.

    The new user capability should be “author”, so he can upload files. This is default, but you can change that, if you search a bit on WP’s codex.

    First he have to upload his file. From Toolbar: Dashbord > Media > add new. Then he has to copy the file URL avaible on the media upload page, under “edit” and then in the right menu.

    User goes to his profile > edit > audio tab and paste the file URL into the audio field, save and voila ! Here the result:

    audio display on profile

    That’s only one possibility. the’re others, like custom post type…

    @danbp

    Participant

    Hi,

    members are all in the users list avaible on Dashboard > Users. If you are site admin, you can also delete members on frontend. Go to the profile you want to delete and click on Edit which appears on WP’s Toolbar. There is an item “delete this profile”.
    Advantage goes to dashboard handling, as you can bulk delete from there. 😉

    @danbp

    Participant

    Hi, no need to shout, writing in capitals is really rough. [Mod – topic title modified]

    In a WordPress system, you can only upload allowed medias. You already know (probably) that you can embed videos in post by simply copy/pasting the video link into it. This works also with BuddyPress when you enter a video URL to a profile field, it plays automatically, without any additionnal player.

    MP3 is an audio format and you can use the same technique as for videos. Read here.

    For more advanced display, you have several possibilities by plugins (rtMedia or MediaPress) or by building a custom display which fits exactly to your need. You don’t want a plugin (?), so i’m affraid you have to do something from scratch.

    That said, keep in mind that allowing users to upload “big” data files to your site is a mess. First because of the upload limitation in WordPress (by default 2 mo max.) This can only be increased if you have access to the server settings (eg. php_ini and httpd_conf). And if you have some traffic and many MP3, you need a generous bandwith. That’s why it’s recommended to use external services to store these datas. But if you follow this, you can only use what WP allows.

    Before thinking about a miraculous snippet in bp-custom, give more details about the scenario you imagine for users (file amount, file size, why do you want this during registering and not later, and so on…).

    Depending your answers, the solution can be very simple or very complicated.

    @danbp

    Participant

    @danbp

    Participant

    @jrunfitpro, thought BP Attachment is great, and MediaPress (files are on github) also.

    @danbp

    Participant

    Please use code button when inserting code into post.

    @danbp

    Participant

    Hi,

    of course, in so far that php 7 will be used by WordPress. BuddyPress’s dev follow the same route.

    WordPress and PHP7

    @danbp

    Participant
Viewing 25 replies - 1,426 through 1,450 (of 3,787 total)
Skip to toolbar