Anybody who wants his blog to be like a CMS would wants a user directory page where all users of the blog can be seen.

I just found the plugin just for that and it is called Profiler by Eric Schulz

here are the screenshots of the profiler plugin

Directory View

Directory View

Profile View

Profile View

It is perfect for creating a user directory page where you can view other members but i wanted more… What i want is an extended user profile where aside from the email and join date a yahoo messenger address and perhaps a friendster url (entered via the Register Plus plugin) can be seen.

So i decided to edit Eric’s plugin to do what i had in mind… :)

After an extensive review of the codes here is the addition that i made to the source codes…

  1. function pf_get_friendster($id)
  2. {
  3. global $wpdb;
  4. $friendster = $wpdb->get_var("SELECT `meta_value`
  5. FROM `wp_usermeta`
  6. WHERE `meta_key` = ‘friendster’");
  7. return $friendster;
  8. }

  1. function pf_get_yim($id)
  2. {
  3. global $wpdb;
  4. $yim = $wpdb->get_var("SELECT `meta_value`
  5. FROM `wp_usermeta`
  6. WHERE `meta_key` = ‘yim’");
  7. return $yim;
  8. }

So that should get the extra values from our databases and what’s left is to output the it into the user profile page.. I placed my data inside a table so that the labels and the values can be styled seperately to make it look better and the code is as follows…

edit the function pf_output_single($id) and near line 470s i think just after the show photo codes here is what i did to the $output code…

  1.         $output .= "<table><tr>";
  2.         $output .= "<td><span class=\"profName\">$display_name</span></td></tr>";
  3.         if(get_option(‘pf_show_emails’) == ‘yes’)
  4.                 $output .= "<tr><td><span class=\"profField\">Email:</span></td><td><span class=\"profVal\"><a href=" . "mailto:" . $user_email . ">" . antispambot($user_email) . "</a></span></td></tr>";
  5.         if($user_url != && $user_url != ‘http://’)
  6.                 $output .= "<tr><td><span class=\"profField\">Website:</span></td><td><span class=\"profVal\"><a href=" . $user_url . " rel=\"nofollow\">$user_url</a></span></td></tr>";       
  7.         $output .= "<tr><td><span class=\"profField\">Join date:</span></td><td><span class=\"profVal\">" . pf_format_datetime($user_registered) . "</span></td></tr>";
  8.         $output .= "<tr><td><span class=\"profField\">Friendster:</span></td><td><span class=\"profVal\">$friendster</span></td></tr>";
  9.         $output .= "<tr><td><span class=\"profField\">YM ID:</span></td><td><span class=\"profVal\"><a href=ymsgr:sendim?$yim>$yim</a></span></td></tr></table>";

after saving and firing up my user profile page here is what it looks like…

New Profile Page after editing

New Profile Page after editing

After changing themes this is what the user directory looks like then:

New Directory With a Different Theme

New Directory With a Different Theme

New Profile Page With New Theme

New Profile Page With New Theme

Download my profiler edit Profiler Plugin (29)

Credit remains with Eric Schulz for developing such a wonderful plugin

Popularity: 49% [?]