What story do we live in

In 2013 I watched an inspiring talk from Chris Lema on project execution given for the WordPress community.  As I’ve been working with WordPress it has been a journey that started to help my local Church to move from a very flat and static site over to a new Blog and CMS acting much more as an intranet than simply a website.  My day job is working for a local engineering company which has engaged me in great opportunities in technology, leading teams and a little travelling.

I remember at the time Chris inspired me again to look at the context (story) that I was setting for my teams to work in, saying this is the main thing for leaders “set the context!“.  Well that was 3 years ago and I still remember the talk, last Friday I spent a whole day listening to Phil Moore on the New Ground academy the subject was “the story of the Bible” as with 3 years ago the impact was not that this answers all our questions but sets the context, however, this time not for others but me!  Much time and effort is wasted in teams without leaders setting the context, what shapes your decision making and where does your context for life come from?

Phil has even written a short book on it “The Bible in 100 pages” worth a read…
The bible in a 100 pages

Overwrite Author Name

Are you currently giving multiple users the same login details? If ‘yes’ then read on…

I came across the need to create a consistent author name across a site, very much like how wordpress.tv seems to be, looking from the public front end.  If you see any of the posts that wordpress.tv make its always the same author name even though all the content is obviously being provided by many different users/authors.

So in comes ‘Overwrite Author Name‘ to do a similar job for any of your sites which has multiple authors providing content but you want to have a clean authorship used across the site.  The obvious workround for this would be to give all the users (for example office staff) the same username and password details, but this is very inflexible and weakens site security.  It would be much better to allow all users to login to the site with their own access rights and capabilities and automatically change the name of the author at the time of post save and this is the reason I created the ‘Overwrite Author Name‘ plugin.

Off-course to to re-edit the post/page users will need the ‘edit_others_posts‘ or ‘edit_others_pages‘ wordpress capability respectively and likewise for any custom post types used.

You could always put something like the following code into your functions.php file..

add_action('save_post', 'overwrite_author_name');

function overwrite_author_name($post_id) {
    
    //this is the user name ID to be enforced.
    $enforced_author = 7797;
    
    //this is the post types to have an enforced user name.
    $author_post_types = array('post', 'page');
    if ($parent_id = wp_is_post_revision($post_id))
        $post_id = $parent_id;
        
    $post = get_post( $post_id );
    if (( $post->post_author != $enforced_author ) && (in_array($post->post_type, $author_post_types))) {
    
        // unhook this function so it doesn't loop infinitely due to the use of save_post within overwrite_author_name
        remove_action('save_post', 'overwrite_author_name');
        
        // update the post, which calls save_post again
        wp_update_post(array('ID' => $post_id, 'post_author' => $enforced_author));
        
        // re-hook this function
        add_action('save_post', 'overwrite_author_name');
}

..but that ties you into the theme, having the plugin allows you to swap themes and not loose the functionality.

I’ll be releasing to the wordpress plugin repository in the next day or so.

GitHub page.

 

Role Based Help Notes

"Taking Notes" - By Krissy.Venosdale
“Taking Notes” – By Krissy.Venosdale

I have published my ‘Role Based Help Notes’ wordpress plugin to the wordpress community to help groups work together in activities and content where logged in users of a wordpress site are already allocated role(s). The plugin basically allows you to quickly create helpful guides/content for any defined user role and opens up the Content Management Site (CMS) capability for your site.  This lends itself to help you talor the helpful guides/content to each separate role and allows the group to update and maintain the content.

As all people in history benefit from standing on the shoulders of giants in their field so this plugin is no different it has been given an “Extension” section to provide a quick and easy route to installing plugins that compliment Help Notes just choose those you want if not already installed on your site.  All this is possible with TGM-Plugin-Activation (by Thomas Griffin and Gary Jones.) an amazingly useful way to bundle plugins into your themes, or as I have here a plugin!

The plugin uses custom post types for user roles. This allows users, with a specific role, the ability to create and edit their own ‘help notes’ providing a private set of notes for use. It can be used for anything else that fits with that role (e.g. creating minutes-of-meetings notes etc…).
To add new roles to the basic wordpress roles (Administrator, Editor, Subscriber ..etc) you will need to use another plugin refer to Roles_and_Capabilities and Resources.. Plugins. You can then use one of these plugins (e.g. User Role Editor) to allocate users to multiple roles.

So if you want to quickly give a group a private area to share and post ideas/notes ..

  1. Create a new role.
  2. Add users to the role.
  3. Enable the Help Notes from the settings.

A global ‘General Help Notes’ type is also available which is not tided to a specific role, this has the same access/capabilities as the standard wordpress ‘post’ type for read/write access.

 

 

Helpful references used along the way..