[Plugin: Cimy User Extra Fields] User List loop
-
I would really appreciate some help in getting Cimy User Extra Fields to show up in the user list through the Alkivia Open Community plugin.
I’ve read through the Read Me but I’m not very proficient in PHP. I tried adding the Cimy code from example 5 to the Alkivia userlist.php file and it’s not working quite right.
Cimy$values = get_cimyFieldValue(false, false); $old_name = ""; foreach ($values as $value) { $user_id = $value['user_id']; $new_name = $value['user_login']; if ($old_name != $new_name) echo "<br /><br />".$new_name."<br /><br />"; echo $value['LABEL'].": "; echo cimy_uef_sanitize_content($value['VALUE'])."<br />"; $old_name = $new_name; }Alkivia
<?php foreach ( $users as $user ) : ?> <h1 class="user-name"><?php echo $user['display_name']; ?></h1> <div class="short-profile"> <?php /* Sample to get the thumbnail instead the avatar. if ( ak_get_object('akucom')->activeComponent('gallery') ) { echo aoc_get_user_image($user['ID'], 'alignleft', true); // Get thumnail. } */ ?> <div class="image"><a href="<?php echo $baselink . urlencode($user['user_login']); ?>"><?php echo get_avatar($user['ID'], $avatar_size) ?></a></div> <p><?php echo $roles[ak_get_user_role($user['ID'])]; if ( empty($user['user_url']) || 'http://' == $user['user_url'] ) { echo '</p>'; } else { ?> <br /><?php _e('My site:', $i18n); ?> <a href="<?php echo $user['user_url']; ?>" target="_blank"><?php echo substr($user['user_url'], 7); ?></a></p> <?php } $userData = get_userdata($user['ID']); if ( ! empty($userData->description) ) { echo wpautop('<p class="title">' . __('About Me', $i18n) . '</p>' . $userData->description); } ?>it’s repeating all of the users’ Cimy extra fields on every user. so for example with 5 total users, user 1 has all 5 users extra fields, user 2 has all 5 users extra fields, etc.
It’s the foreach function that’s doing it right?…but everything I’ve tried won’t just show the single user’s info.
Any help is appreciated.
The topic ‘[Plugin: Cimy User Extra Fields] User List loop’ is closed to new replies.