Skip to:
Content
Pages
Categories
Search
Top
Bottom

add profile fields profile, topic


  • cocolabombe0
    Participant

    @cocolabombe0

    Good evening, I added a field on the WP profile and wanted to bbpress posted on the profile.
    How do we do?
    I tried your plugin bbp profile information so I have almost everything I want but not totally.

    What added to the Profile page of WP fields (Role on the site, website, additional fields (with add function), etc.).

    For the formatting, changing the file should be simple but I do not know what code used to do.

    Same, how added some fields in the WP topics (subject / response).

    What bothers me in the plugin’s name display / First name / email automatically. Why not have checkboxes on what the user wants to view. But before the administrator can block fields.

    Given that I want to add a facebook fields and if it is not empty and the link, I want to display on the profile and the topic / response mode with an image.

    For additional fields, four are enough for me, but how to add it to the wp-admin?

    On my site, wp-admin is accessible for admins and the member / user by everyone.

    If you do not understand me, I will try to make screenshots to make it more understandable.
    Sincerely Nicolas.

Viewing 4 replies - 1 through 4 (of 4 total)

  • Robkk
    Moderator

    @robkk

    You may need to contact Robin in his plugin support forum. You may need to include pictures because it was hard for me to understand.

    https://wordpress.org/support/plugin/bbp-profile-information


    cocolabombe0
    Participant

    @cocolabombe0

    Ok, I was on.
    I added a Facebook field in the License File function.php theme.
    So we can see also in publishing bbpress.
    http://www.hostingpics.net/viewer.php?id=918166contact.jpg

    On these fields created in the meta WP, how to display it on the profile page as the image below (but is plain text)
    http://www.hostingpics.net/viewer.php?id=567243profil.jpg

    Idem on the forum topics. As already does plugin.
    Added text or an image under the name of the user.

    For the plugin, I tried to contact him to see.


    cocolabombe0
    Participant

    @cocolabombe0

    I try to edit the user-profile.php file.
    I’ve just figured out how to retrieve information.

    Profile Overview:
    http://www.hostingpics.net/viewer.php?id=211738profile.jpg

    Member List
    http://www.hostingpics.net/viewer.php?id=989016member.jpg

    			<?php $user_info = get_userdata(bbp_get_displayed_user_id()); ?>
    			
    			<p class="bbp-user-forum-role"><?php echo 'Roles sur le site: ' . implode(', ', $user_info->roles) . "\n";?></p>
    			<p class="bbp-user-forum-role"><?php  printf( __( 'Forum Role: %s',      'bbpress' ), bbp_get_user_display_role()    ); ?></p>
    			<p class="bbp-user-topic-count"><?php printf( __( 'Topics Started: %s',  'bbpress' ), bbp_get_user_topic_count_raw() ); ?></p>
    			<p class="bbp-user-reply-count"><?php printf( __( 'Replies Created: %s', 'bbpress' ), bbp_get_user_reply_count_raw() ); ?></p>
    
    			<p><?php printf ( __( 'First name: %s', 'bbpress' ), bbp_get_displayed_user_field( 'first_name'));?></p>
    			<p><?php printf ( __( 'Licence: %s', 'bbpress' ), bbp_get_displayed_user_field( 'licence'));?></p>
    			<p><?php printf( __( 'Role sur le site: %s',      'bbpress' ), bbp_get_user_blog_role()    ); ?></p>
    			<p><?php printf( __( 'Role sur le site: %s',      'bbpress' ), bbp_get_user_role()    ); ?></p>
    			
    		<h2 class="entry-title">Réseaux sociaux</h2>
    		<p><?php  printf( __( 'Facebook: %s',     'bbpress' ), bbp_get_displayed_user_field( 'facebook')    ); ?></p>
    		<p><?php  printf( __( 'Twitter: %s',      'bbpress' ), bbp_get_displayed_user_field( 'twitter')     ); ?></p>
    		<p><?php  printf( __( 'Google+: %s',      'bbpress' ), bbp_get_displayed_user_field( 'google_plus')    ); ?></p>

    How to display the roles with the text displayed on the image of the members?
    Basically, I want the user michael Menil, we see:
    Roles sur le site: administrateur, keymaster, admin bureau

    These terms mean:
    Administrator (the website)
    KeyMaster (the Forum)
    admin office (lower than the administrator)

    The first two roles are given by WP FRONT ROLE USER EDITOR PERSONAL PRO. The third, I created from scratch by the same plugin.


    cocolabombe0
    Participant

    @cocolabombe0

    Well, I still just solved my problem by French text.
    Everything is starting coding lol.

    <?php
    $roles_site = $user_info->roles;
    $roles_forum = $user_info->roles;
     
    	foreach ($roles_site as $key => $valeur) {
    		if ($valeur == 'admin_bureau') {
    			$roles_site[$key] = 'admin bureau';
    		}
    		if ($valeur == 'administrator') {
    			$roles_site[$key] = 'administrateur';
    		}		
    		if ($valeur == 'subscriber') {
    			$roles_site[$key] = 'utilisateur';
    		}
    		if ($valeur == 'webmaster') {
    			$roles_site[$key] = 'webmaster ';
    		}
    		if ( ($valeur == 'bbp_blocked') || ($valeur == 'bbp_keymaster') || ($valeur == 'bbp_moderator') || ($valeur == 'bp_participant') || ($valeur == 'bbp_spectator') ){
    			unset($roles_site[$key]);
    		}
    	}
    	
    	foreach ($roles_forum as $key => $valeur) {
    		if (($valeur == 'admin_bureau') || ($valeur == 'administrator') || ($valeur == 'subscriber') || ($valeur == 'webmaster') ){
    			unset($roles_forum[$key]);
    		}
    		if ($valeur == 'bbp_blocked') {
    			$roles_forum[$key] = 'bannis';
    		}
    		if ($valeur == 'bbp_keymaster') {
    			$roles_forum[$key] = 'Administrateur';
    		}
    		if ($valeur == 'bbp_moderator') {
    			$roles_forum[$key] = 'modérateur';
    		}
    		if ($valeur == 'bp_participant') {
    			$roles_forum[$key] = 'utilisateur';
    		}
    		if ($valeur == 'bbp_spectator') {
    			$roles_forum[$key] = 'spectateur';
    		}
    	}
    ?>
    
    			<p class="bbp-user-forum-role"><?php echo 'Roles sur le site: ' . implode(', ', $roles_site) . "\n";?></p>
    			<p class="bbp-user-forum-role"><?php echo 'Roles sur le Forum: ' . implode(', ', $roles_forum) . "\n";?></p>
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar