Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 2.4   Updated Sunday, February 22nd, 2009 at 8:20pm

User Bio Popup plugin for WordPress

This WordPress plugin searches posts and pages for the nicknames of authors. When it finds one, it turns it into a link which brings up a popup window with the author’s bio and image. It uses the contents of the ‘About Yourself’ field in the user’s profile for the actual bio, and the image used depends on which of the two methods you select. The options page for this plugin allows you to configure the popup’s heading, width, height, and more. It also is fully customizable with the built-in CSS in the popup template file.

Download

  If you have found this page useful, please consider donating. Thanks!

Instructions

  • Download dd-user-bio-popup.zip and uncompress
  • Upload dd-user-bio-popup.php to your plugin directory
  • Upload ddub-template.php to your theme directory
  • Enable the plugin
  • Configure the plugin options (under DDUserBioPopup). More information on that is below

Upgrading

Be sure to download both files when you upgrade, and check the options and the information on this page to make sure something has not been changed.

Change Log

  • 09-29-07 Version 2.4 – ‘Load Default Options’ button added. Tested with WP 2.3
  • 05-16-07 Version 2.3 – Updated for WordPress 2.2.
  • 04-06-06 Version 2.2 – Now in the options, you enter the FULL URL to the images directory. It should help make things a bit more standard. Everything validates now as well.
  • 04-05-06 Version 2.1 – Image detection code improved, gravatar code improved, and a few other little things.
  • 04-04-06 Version 2.0 – Popup code completely redone. Now popup window has it’s own template file. Images are now supported (Uploaded and Gravatars), as well as many other fixes and updates.
  • 04-02-06 Version 1.0 – First release.

Using images

The image used depends on your settings. This plugin allows you to create a directory, and upload images to it. You must simply specify the full URL to this directory in the options.

If you like, you could use a directory that your other author’s have access to, so they can upload their images themselves.

For image file names, simply use the author’s nickname – lower case, with spaces removed. The plugin will search for matching files that are either jpg, gif, or png.

Example

Let’s say your wordpress installation is at http://www.somesite.com/wp/ and you create a subdirectory called authors for the images. In your options page you would enter http://www.somesite.com/wp/authors/ for the directory.

Let’s also say that you have a user called Some User. You would want to call the image someuser.jpg (or gif or png). That’s it!

Now if the plugin cannot find a matching image, and Gravatars are enabled, it will try to find one by using the author’s email address (in their profile).

This plugin uses its own code for Gravatars, so you do not have to install anything else. If you are already using a Gravatar plugin, that is fine. They will not conflict.

Configuring

The CSS code for the popup window is contained in the template file (ddub-template.php). Feel free to change this to fit your site.

Options

Here are the settings available in this plugin’s options page in the WordPress admin panel.

Author images directory

This is the full url to your author image directory. This is where you can choose to store images for each author.

Use Gravatars?

If enabled, and an author image cannot be found in the specified directory, the author’s gravatar will be used. If you want to always use gravatars, just leave the ‘author images directory’ option blank.

Heading for the popup

This will be shown at the top of the popup window. If you want to include the user’s name, use %U.

Hover text for link

This will be shown when the visitor’s mouse is hovered over the link. If you want to include the user’s name, use %U.

Popup window width

Self-explanatory.

Popup window height

Self-explanatory.

CSS for popup window

This allows you to completely customize the popup window. The #wrapper div is around the content.

Other Modifications

If you would like the popup window to have a scroll bar, just search for the following code in the main script file:

scrollbars=0

And change it to this:

scrollbars=1

Pages: « 7 6 5 [4] 3 2 1 » Show All

  1. i’ve got it working now. I used some guy’s ubb-parser and intergrated it into the template. Matbe it’s not very neat but it works. You can use ubb tags like [b] [i] [u] [s]

  2. Hi there,
    I’m not an coding expert but i really need an option to us bold text within the pop-up, is there a way to make this?

    Thanks in advance,

    Jurriaan

  3. Marc: img_found is set to false originally.. then it sets it to true once it actually finds the image – strange that it is working for you like that :)

    I am not sure if you will be able to get this plugin to work in the sidebar though, as there is not a standard plugin filter to handle that. Currently it only works for the actual content of the post/page. It might be easier to just setup manual links to author pages for the sidebar. You could try this:

    (somewhere in the sidebar)
    <ul>
    <li><?php echo ddub_generate("User1"); ?></li>
    <li><?php echo ddub_generate("User2"); ?></li>
    <li><?php echo ddub_generate("User3"); ?></li>
    </ul>

    That should generate the proper links :)

  4. Is there a way to use that plugin for a list of authors in the sidebar? I get the list with . Is i t possible to link these names to the bio with User Bio popup?

  5. 56
    Marc

    got it. changed $img_found = FALSE; to $img_found = TRUE; in the template. works.

  6. Marc: Link?

    IBloon: Try wrapping the code tags around code (see below the message box)

  7. 54
    Marc

    Okay guys, i tried it for 2h now. The Bio shows up, but the image is missing. The subdirectory is accessable with firefox, the pics show up an are named like the nicknames. No spaces or capital letters. Any Ideas?

  8. Umm… Sorry for double commenting but for some reason my previous comment’s code didn’t go through….. I used comment tags… Let me try it again.

    Replace

    with

    
    <a href="void(0)" title="View Bio" rel="nofollow">/ddub-template.php?ddub=', '350', '600')"&gt;</a>
    

    Read my previous comment for more information…. I hope this works.

  9. I found a simple hack allowing you to link where your post authors are to the bio popup. Ok that was alittle confusing, basically if you have a blog with more than one user, replace

    
    
    

    With

    
    <a href="void(0)" title="View Bio" rel="nofollow">/ddub-template.php?ddub=', '350', '600')"&gt;</a>
    

    On your index page and your single.php page. (if your using k2, you can find on the ‘theloop.php’ page)

    This will make the YOURNAME in “this post was posted by YOURNAME” (or something similar) link to your bio popup. :)

    I am sure that alittle more editing could make this useful on comments as well.

    Thanks for this plugin, great job!!

  10. Todd: Sure, you could change this line:

    $content = str_replace($u_nick, $link_data, $content);

    And replace $u_nick with $u_first. Of course you will then have to declare $u_first above in the code, where $u_nick is declared. Try this:

    $u_first = get_usermeta($u->ID, 'first_name');

    I will leave the rest as an excersize to the reader, although that is pretty much all there is to it :)

  11. 50
    Todd

    Is there any way to get the plugin to work by searching for the authors first name?

  12. Todd: This plugin searches for the author’s nickname – not their regular name. Check to see what the nickname is set to in the user settings.

  13. Take a look at my site (www.iscramla.com) The author only shows up on the post page, not the front page. But, after installing your plugin, the authors name does not become a link. Why is this?

  14. Some of you might find this new plugin useful :)

    http://www.dagondesign.com/articles/add-signature-plugin-for-wordpress/

  15. Ambrosia: Yes, this is a known issue. The plugin does not work out very well in some cases such as this :) I am open to ideas for it though :) It is just a matter of choosing a nice method to get it to only apply it to the text you want it to change.

    Nathan: That is an interesting idea. I have not ever created any plugins which actually change the output of the feeds, but I imagine it would be possible. When I am able to, I will look into it :)

Pages: « 7 6 5 [4] 3 2 1 » Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.