I manage a "topic blog" for work. For the uninitiated, a "topic blog" has posts from a community of interest on a given topic. Often, topic blogs have lots of contributors. That’s the case for Communicat.us. Managing lots of users requires some tools and some automation.
Today’s tasks included adding 15 new users, sending out the "getting started" guide to everyone, and updating the "authors" page. To make the least work of it all, I added a Dragon Design’s Import Users plug-in for WordPress. That made shore order of adding the 15 new users. But, before I did the upload, I found out how to modify the email that get’s sent for each new user.
WordPress supports "pluggable functions". Fortunately for me, the wp_new_user_notification() function is one of those. Steve Taylor got me started with his basic code for extending the email that gets sent out. Here is what I ended up with …
… Feel free to copy this into a file called "new_user_email.php", upload it to your plugins directory and activate it. Don’t forget to also upload your getting_started.pdf to your upload directory and double check you have set the upload path under Administration >> Settings >> Miscellaneous
Everything was working well but then I noticed the automated "Authors" page was full of the new users with no photos, "nice names" or biographies. The page is generated using an "authors.php" file added to the theme. The problem is that is shows all registered authors. What would be better is if it only showed authors who had actually contributed to the blog. So, I set about to some good ol’ trial and error with "SELECT", "COUNT", "WHERE", "GROUP BY", and "ORDER BY" … aka SQL code. Here is a snippet of the final results …
So, now I can add new users quickly. New users get the same information to start blogging (both some guides on what is a good blog post as well as the tools they can use to write their posts. Once a users starts to contribute, they will automatically appear on the page of authors.
It was all pretty easy. If you manage a multi-user blog, feel free to use these techniques and take the above code.