Forum Replies Created
-
In reply to: link admin bar change
Yes, I have exactly the behavior I want (almost) but the result is conclusive for me.
Much research, testing to get lost between what I disable, enable, modify the original files, etc.In reply to: link admin bar changefunction my_admin_bar_render() { if (! is_super_admin() ) { global $wp_admin_bar; $wp_admin_bar->remove_menu('site-name'); } } add_action( 'wp_before_admin_bar_render', 'my_admin_bar_render' );
This code is ok.
In reply to: add profile fields profile, topicWell, 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>
In reply to: link admin bar changeI found better. How to tell the function that the visitor and the user can not see the site-name.
/** * Add the "Site Name" menu. * * @since 3.3.0 * * @param WP_Admin_Bar $wp_admin_bar */ function wp_admin_bar_site_menu( $wp_admin_bar ) { // Don't show for logged out users. if ( ! is_user_logged_in() ) return; // Show only when the user is a member of this site, or they're a super admin. if ( ! is_user_member_of_blog() && ! is_super_admin() ) return;
In the code, “simply remove the code ! is_user_member_of_blog() &&” but how to write a function.
f ( ! is_super_admin() ) return;
In reply to: link admin bar changenow I have other worries.
I want to change the display of links for users and not for admins.
But I did not find what id done that?
On the site title (just left of the toolbar), what is the code that I redo a function?In reply to: link admin bar changeProblèm ok
function edit_url_profil_bar_admin( $wp_admin_bar ) { global $current_user; $wp_admin_bar->add_node( array( 'id' => 'my-account', 'href' => ('/forums/membre/'. $current_user->user_login), ) ); $wp_admin_bar->add_node( array( 'id' => 'user-info', 'href' => ('/forums/membre/'. $current_user->user_login), ) ); $wp_admin_bar->add_node( array( 'id' => 'edit-profile', 'href' => ('/forums/membre/'. $current_user->user_login .'/edit/'), ) ); } add_filter( 'admin_bar_menu', 'edit_url_profil_bar_admin' );
with this code, I have exactly what I wanted.
I helped myself this http://www.geekpress.fr/wordpress/tutoriel/modifier-howdy-admin-bar-1102/ code to make the change. In addition, I took a piece of their code as I removed the greeting. I just put the code to change the links.In reply to: link admin bar changeIt is these values but I tried to create a function to replace values but I do not know it at all.
I try to put code in my function.php not affect my wordpress (update)In reply to: add profile fields profile, topicI 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.jpgMember 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 bureauThese 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.
In reply to: link admin bar changethe link?
I do not see how we can do to have a variable and divide it into two.
If not, i thought the easiest way to do not touch the core of WordPress is created a condition more about $profile_url will either go to /forums/membre/user or go to /forums/membre/user/editIn reply to: link admin bar changeOK. I have to because it is the wordpress code that displays the name of the pseudo code and modify the profile.
In reply to: link admin bar changeI just edit my previous message because I finally solved my problem.
With each update, the file is overwritten or not?
In reply to: link admin bar changeFound
file /wp-includes/admin-bar.phpif ( $current_user->display_name !== $current_user->user_login )
$user_info .= “<span class=’username’>{$current_user->user_login}</span>”;$wp_admin_bar->add_menu( array(
‘parent’ => ‘user-actions’,
‘id’ => ‘user-info’,
‘title’ => $user_info,
‘href’ => (‘/forums/membre/’. $current_user->user_login),
‘meta’ => array(
‘tabindex’ => -1,
),
) );The link works.
In reply to: link admin bar changeOh yes, this is what plugin that added this option.
But I think I have to change the file after a shot on the admin bar file to separate the two codes.
But I do not know too so it’ll be tough.In reply to: add profile fields profile, topicOk, 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.jpgOn 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.jpgIdem 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.
In reply to: link admin bar changeno, I have not used the codex.
I checked the box of bbpress option.
And the links are replaced.
http://www.hostingpics.net/viewer.php?id=857251bbpress.jpg