WP People

Tags: xfn, links, blogroll, people
Requires at least: 2.7.1
Tested up to: 2.8.4
Stable tag / Version: 3.4.0
Plugin Download
Support Forum : Hacks and Scripts / wp-people Thread

This hack plug-in will search a post and find names that match database records of people maked with the WP Category in the XFN Links. When it finds a match, it will replace the name with a link to the person. There is a administration screen for adding people and their bios to the database and viewing the current people marked for the filter. More than one person can be linked on a post. A individual name will only be linked once per post.

The original author of the hack stopped supporting it a while ago. I took his original idea and used another hack (acronymit) as a guide to make this work. The original worked with the my-hacks script used in WordPress 1.0.1, so this is beyond the functionality of the original.

If you were using the version 2 of Word Press People, then you will be able to see any current people in WP People. As of version 3.1.0, you can Copy records from the WP People table into the XFN Links databse.

Installation

  1. Upload `wp-people` to the `/wp-content/plugins/` directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to the WP People administration page under the Tools section. The first time there will create the “WP People” Category
  4. Go to the Links administration page. Add new Links or add the WP Category to those people who you want to be included in WP People.
  5. Optionally Install the ‘WordPress Force Word Wrapping‘ plugin to prevent the description text from extednig past the popup window area.

Usage

The field on the Links form match up the following way:

  • Name is the Real Name (searched name) in WP People
  • Description is the Nick Name (displayed name) in WP People
  • Web Address is the Link in WP People
  • Advanced Notes is the Description/Bio in WP People
  • Advanced Image Link is the Photo in WP People

Updates and updates

WordPress has been making more updates lately than a backstage of a Las Vegas review.  Since the automatic update hasn’t worked in a few attempts, I have been forced to update manually by finding the files that are updated and uploading them to the site.  Hopefully I am finding all the files and doing all the updates.  I guess when they do their next big release, I’ll do a complete update of all of the files just to be on the safe side.

One issue with the updates is that if you create plugins, like I do, then you have to verify that your plugin works with the new update.  This usually isn’t a difficult task when you have a demo page on your site.  Just go to the page and see if it still works.  That was the step I took with my Mixed Tape plugin. However, as a plugin creator, you aren’t done there.  In order for someone to feel a little more comfortable about your plugin, you have to keep the “Tested up to:” version up-to-date.  Updating this information on your plugin requires an update to the “readme.txt” file and then a checkin to the source control database.  Apparently I’m getting better at it, because I am not reloading the files up multiple times.

What prompted me to make my plugins compliant with the new version of WP was a suggestion in my forum about a change to the WP People plugin.  The user wanted to customize the title or hover text on the link to the WP People bio.  I thought that was a great idea and now I found a little time to tackle the request.  While I was coding away, I changed the code around to work a little more like a plugin I made for 9/12 Candidates.  And, I also removed the table html that creates the layout for the form.  The changes aren’t major, but they weren’t minor either.  Hopefully it will allow me to do updates to that plugin much easier in the future.

But of course, my two little plugins are free, so I don’t see myself making a living off of WordPress plugins, even though a few developers get some money.

99.9999% done with WP People

Well, I figured out how not to only add buttons for my WP People plugin but to have it popup with a window to select from the WP People list and then select a person and have it insert back into the Page or Post. And, I got it to work with both the tinyMCE (the pretty WYSIWYG editor) and basic editors. Yippee!!! Of course, IE is a piece of junk, so it doesn’t work 100% with IE. A couple of errors appear when it loads the list popup, but you can just click through those and the insert still works.

On top of getting this to work, I reduce the number of pages used in another example I saw. In the other examples, it looked like they had to create one popup page for each of the editors. I managed to make it work with just one page (i.e. regardless of what IE says). I also eliminated some other side files that the examples were using. However, my plugin is much simpler and didn’t need a lot of other things.

Of course, as I sit here writing this, I realize that I didn’t restrict the WP People list to the owner, so I guess I’ll be making a quick change. A geek’s work is never done.

A little more functionality to WP People

After looking over a few examples of adding a button to the Post/Page editor, I found Deanna Schneider’s blog about adding a button. And, I got it to work! Woo hoo!

wp-people-ss-tinymce-toolbar

Through her example, I was able to figure out how to create a page that would be called when the button is clicked. The popup page lists the WP People available, with their picture, an abbreviated version of their bio, name and nickname. Next to each person is a button to insert them into the post. When you click the button, the full name of the person is inserted into the post. Simple as that.

Now, I just have to figure it out on the basic Page/Post editor. I figured out how to add the button.
wp-people-ss-simple-toolbar

However, I’ve only been able to pull up a separate window with the list in it. This really doesn’t work for what I want to do. I want to have the popup that allows me to interact with the page that pulled it up. I’m sure it’s something simple and hopefully I’ll figure it out soon and then I’ll be done with my WP People upgrade.

More updates to WP People

Well, in an attempt to add a button to the editor menu so that a user could easily add people from the WP People list to a post, I managed to go through and update the code to make it compatible (upgradeable) with earlier version of WP People, just in case. I also figured out how to copy WP People from the table to the XFN database. The biggest annoyance was adding the category after inserting the record in the to table. But, after figuring it out, I trucked along and made it possible to edit, add, and delete WP People XFN Links. Woo hoo!! So now, if someone adds uses WP People, they can easily edit the information without going to the Links page and find their WP People.

The next step is to finally add that button to the Post and Page editor. Hopefully it won’t take me too long to figure it out. I will later have to add some error checking to the Add/Edit forms and get the Delete button to popup an alert again, but that’s not really too important at the moment.

Hopefully, when I get this button part done, I might get back to either doing more working on the Meetup Organizer Tool or adding a FAQ plugin to WordPress. Most of the FAQ plugins I see are for overall FAQs, but I want to make one that can be link to a particular item or page. This way, I can write a different FAQ for each plugin, widget, or application that I do.

WordPress plugins and svn annoyances!

Small things in programming have been annoying me the last couple of days.

WordPress has started using svn (Subversion) as a method of version control for plugins. What this does, is allow the developer to upload version of the plugin to a database and then the plugin will automatically be updated on the download page. Also, it will alert anyone who has the plugin that there is an update to the plugin. From there, the user of the plugin can easily install/update it through the Admin panel. It’s actually very useful.

Well, I just recently updated my WP-People plugin to be compatible with WordPress 2.7.1 and also use the XFN database used in WordPress. As part of this update, I submitted the plugin to the svn database. After trying to find some easy instructions on how to use Subversion, I found some instructions on Designpraxis. The first time through was easy. But, the display on the download page was not exactly 100%. Only a short description was showing, even though I added the information for the other areas in the readme file. However, I didn’t have the readme file named correctly. So, I changed the name of the readme file and tried to up the versions to 3.01. Well, I did something wrong and ended up with a sub-folder of my plugin under the plugin directly. This caused errors, because it tried to load the plugin twice. After trying a few ways to update it to 3.02 without the sub-folder, I finally got it to work with version 3.03.

I think I have the steps for updating:

  1. Create a folder under the tags with the version number.
  2. Update your plugin in the Trunk directory. Make sure to update Version information in the main php file and the Stable Tag in the readme file.
  3. Copy the files into new folder under the tags directory and commit the changes.

After a bit, the updates will pass through on the download page. I guess after I make some updates, I can determine if these are the correct steps. The trunk folder lost it’s green check mark symbol, that’s probably not a good thing. Also, I am still not sure where I put the version release notes, I guess I can put them at the end of the main description. I add them to the log when I do the commit, but they don’t show on the download page.

I plan on including the relationship values from the XFN and a better layout on the WP People Admin page of those who are part of WP People. I might eventually include an easy way to edit the XFN data from the WP People Admin page.

WP People Updated

I was trying to add a FAQ to my blog for the Meetup Organizer Tool I am working on and then I got side tracked updating my WP People Plugin.

The WP People Plugin basically takes the Name value from Links added to the blog and replaces it with a nick name and a link to more information about the person. I originally had created a database table to hold the people and an admin screen to add, edit and delete. Then I saw the XFN option in WordPress and figured it would be much easier to use that information.

Apparently I tried to do this update a while back and stopped development on it. Well, now I am close to being done and I will store it on the WordPress Plugin Database. Woo hoo!!

Of course, I need to get back to what I originally planned, taking a FAQ script and making it a Page plugin for WordPress.