Using WordPress for Client Development Logs

Over at Equal Web Creative I have recently introduced the use of client development logs so that clients can keep a track of the progress on their sites and so that you can communicate more effectively with clients during a project.  In order to implement this I have used WordPress as a multisite installation as well as a few themes and plugins.  Here I intend to explain how I have produced this.

To start with your will need to install a copy of WordPress onto your server and then activate the multisite capabilities of WordPress.  To do this I followed the excellent tutorial below:

Once you have your installation completed you now have the ability to create multiple sites on one WordPress install.  The idea here is that each of your clients will have a 1 site for their client or project log.  You then create users for each of the people within the organisation that will be working on the site so that they can contribute to the discussion and keep track of the progress that is being made.

The next thing is that you will need a theme for the client sites.  I had a brief look around for a theme that was in the style of discussion rather than pure blogging or a website and quickly remembered about Automattic’s P2 theme.  This is a discussion real time blogged theme that is more conducive to a project logs functionality.  The one major alteration to the code that I wanted to make in this theme was to make it so that pages and posts did not appear unless the user was logged in.  To do this I made use of the WordPress is_user_logged_in() function.  The following was added to the site in order to display the content if the user is logged in and to show a login form if the user is not logged in:

[code language=”php”]

// continue with theme code

[/code]

The next thing I wanted to do was to make the users login from a standard page that was linked to on the Equal Web Creative site, labelled client login.  Therefore a created a very simple theme on the main network site that consisted on an index.php page in the same design and style as the main Equal Web Creative site that contained a login page.  On submit this redirected the users to the main sites dashboard.  Here is how this was done:

[code language=”php”]
<form name="loginform" id="loginform" action="” method=”post”>

<input type="text" name="log" id="user_login" class="input" value="” size=”15″ tabindex=”10″ />

<input type="submit" name="wp-submit" id="wp-submit" value="” tabindex=”100″ />
<input type="hidden" name="redirect_to" value="/wp-admin” />

[/code]

It is the last part of line 12 above that takes the user to the main blogs dashboard.  The problem here was that I wanted them to go to their own project log site rather than this one.  To do this I removed them as a user of the main blog through the Super Admin panel in the WordPress dashboard.  Once this was done it meant they we redirected to the dashboard of their primary site which was their own client or project log.

The final step here was that I wanted them to go straight to the front end of the site and not into the dashboard.  In fact there really is no need for the clients to see the dashboard of WordPress in this setup.  I Googled and searched for this for a long time but eventually settled on this rather botched way of doing it, using a javascript window redirect.  This code is placed in the P2 themes functions.php file in order to redirect none admin users from the dashboard to the live site:

[code language=”php”]

Welcome to this Equal Web Creative Project Log site. As you are seeing this it means you are a site admin!

ID );
$addr = $details->siteurl;
?>


//–>

[/code]

Basically this code adds a new dashboard widget to the sites dashboard. In that widget it first checks to see if the user is an admin of the site.  If they are it simply outputs a paragraph telling them so.  If they are not an admin it gets their primary sites ID and then redirects them to that site using the javascript window.location function.

And there you have it.  No doubt there are several things within this that could be done better a neater and if you have any feedback on this then please let me know below.  I hope you find it useful.

One response

  1. Thanks you this is help me a lot

Leave a Reply

Your email address will not be published. Required fields are marked *