• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

How to Use Wordpress as a Membership Directory ...

Do you want to create a moderated membership directory that showcases your member’s information? Do you want it to be flexible, be very little work after initial setup, and use a world-class open source platform that you are already familiar with?

Your first thought might not be to use Wordpress for such a project, but since it already has an extremely easy way to accept, moderate and update registrations – it’s a perfect candidate.

In this tutorial I will show you how I built a successful membership directory using nothing more than a standard Wordpress 2.3+ install and 2 very powerful plugins.
The Plugin Installs

The heart of the site is powered by two plugins.

First, use the WP User Manager plugin from Dealsway to add new fields to the user profiles. The install and setup is pretty straight forward - just activate the plugin and add any new fields you want via it’s own admin section. The information entered in these fields will become the information that will create the member’s “homepage.”

Secondly, we use the famous Role Manager plugin which restricts what your members can do once they are logged into your site. This is important because in order for a member to be granted their own author page, he or she needs to have made at least one post.

In my case, I didn’t want my members to have the ability to post anything, just to only fill out their profile information. To get around this, I used the Role Manager plugin as-is, but changed the Author role to only have the rights Publish Posts and Read. (The Hide Dashboard capability you see in the screen shot is a function of the IWG Hide Dashboard plugin. It was an easy way to clean up the admin panel for my members.)



Setting Wordpress Options

After you have installed all the plugins, we need to get Wordpress ready for your new registrations.

In your Admin panel, under options, set your New User Default Role to Subscriber. This ensures that a member won’t be given an author page until you “approve” and manually move them to the Author role. (A Subscriber can’t make posts, an Author can.)



Once a member has registered and filled out all the appropriate profile information, we need to “approve” that member. We do this by simply moving that member into the Author role and making a post on his or her behalf. I want each approved member to have made a post in order to create the New Member Feed [example]. To post on behalf of that member, choose that member’s name out of the dropdown list in the Post Author section in the sidebar before publishing their post.



This post doesn’t need to be anything spectacular. On Pittsburgh Designers, I simply write “This business has been added as a member. Please visit their Design Profile.”

There are other ways of doing this to make it slightly simpler, but I do it this way because I want to use Wordpress’s default feed as a New Member Feed.

Your membership management duties are now done.
Creating the Author Page

All that’s left now is the need to create the author.php template to display all this new member profile information that the WP User Manager plugin allowed us to accept.

For the sake of this tutorial, we only added 2 new fields to the member profile page: business_name and business_owner.

At the top of the author.php template we will add this code. Hint: Each new field you add will need to be declared here.
<?php
/*
Template Name: Author Template
*/
global $wp_query;
$curauth = $wp_query->get_queried_object();
$key="wpum_"."business_name";
$business_name = get_usermeta($curauth->ID, $key);
$key="wpum_"."business_owner";
$business_owner = get_usermeta($curauth->ID, $key);
?>

Now right below that, in the body section of your template, we are going to add this data and markup to display it in a structured way:
<?php get_header(); ?>
<div id="bodycontent" >
<div class="bodytext" >
<h2><?php echo $business_name; ?></h2>
<p>The owner of this business is <?php echo $business_owner; ?></p>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

The next step is to also show some of the default fields that the member entered within their profile. I only want to show the member’s website address and About the user section, so we modify our template to look like this:
<?php get_header(); ?>
<div id="bodycontent" >
<div class="bodytext" >
<h2><?php echo $business_name; ?></h2>
<p>The owner of this business is <?php echo $business_owner; ?></p>
<p>Website: <a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url;
?></a></p>
<p>About the Business: <?php echo $curauth->description; ?></p>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Hint: A full list of $curauth-> calls can be viewed in the Wordpress Codex.

Lastly, we want to do some basic error checking.

What would happen if the member didn’t put anything in the business_owner field? In this case, we can just wrap that line in an if statement (…or any variable we want to protect against being blank):
<?php if ($business_owner != null) { echo "<p>The owner of this business is
".$business_owner."</p>"; }; ?>
Listing your Members

So how do you list all of your approved members? It is as simple as adding the wp_list_authors to any template file. This is the customized version of that function I use:
<?php wp_list_authors(’hide_empty=1&show_fullname=0&optioncount=0&exclude_admin=0′);
?>
Tutorial Wrapup

This tutorial was based on my experiences in building the Pittsburgh Designers community into a thriving, local membership directory for creative types. Mosey on over to the site and take a peek for yourself how what a finished project like this can look like.

You can download the complete finished author.php template here.

source: wpdesigner

 View Full Story.

AddThis Social Bookmark Button

Posted at 03:36:12 pm | Permalink | Posted in WordPress Plugins  

Related Stuff

50 Best Premium WordPress Themes of 2008

2008 has been a productive year for WordPress theme development and the premium/paid/proprietory theme industry. I have chosen fifty of my ...

Adding tabs easily in your WordPress theme

When you are running a blog for some time, you will have more and more contents to display, and the same space where to make them ...

How to Relocate your Wordpress Blog to a New Domain Name

Making the decision to move my blog from http://www.courseladder.com to http://www.golfballdriver.com was a big one, and a good one, and it ...

How To Replace Your Wordpress Search With Google

Google is the undisputed king of search. They do it well. What many bloggers may not be aware of is that you can use Google as your ...

SEO: 5 Must Have Wordpress Plugins

The greatest place to get traffic for your wordpress blog is from search engines. The skill of SEO [Search Engine Optimization] is often ...

Top Stuff

Free Blogger templates Anime Themes

Wordpress Guestbook Generator Plugin

GeekLog

Zookoda

Introduction to blogs and blogging

jumpcut


Friendship Poems

best Friendship Poems

Custom Software Development

High quality software development at low prices. PHP, ASP.NET, AJAX

msn web messenger

MSN Web Messenger enables you to quickly and easily use basic instant messaging features on a web browser on any computer without installing any software.

Stock Exchange Chat

Stock exchange community, chat room for each quote

eBuddy

web based messaging for everyone, everywhere.

Self Imrovement

Videos for self improvement, self help, communication skills

MSN Web Messenger

MSN Web Messenger full review, tips and screen shots.

cultural differences and communication

The body language of Russians and Americans are different. Russians stand closer than Americans. They look directly and unwaveringly into your eyes.

Facebook Applications

Do you want to know the latest facebook applications?

Egyptian cotton bed

Visit Aqttan online store for famous egyptian cotton home textile products.


About Webloglines

Webloglines is a project offers a comprehensive collection of blogging services, articles, themes and plugins from around the world. Whether you're looking to promote your own blog or find blogs on various topics, this site is for you.


Search


Topics

  • Adsense (11)
  • Blogging Tips (61)
  • Blogs Slides (25)
  • Blogs Websites (22)
  • Digg (8)
  • How to Blog (77)
  • Search Engines (3)
  • SEO (50)
  • WordPress Plugins (105)
  • WordPress Security (35)
  • Wordpress Themes (44)
  • Wordpress Tips (59)

© 2006 www.webloglines.com. All Rights Reserved. Powered by IRange