Post Avatar 1.1

A bunch of changes to the Post Avatar plugin. Download it now.

  1. Localization
    Dominik has also added a German translation. If you want to create your own translation of Post Avatar the .pot file has been included in the package and is inside the languages folder.

  2. Live preview of selected images
    If you’ve set the option to show images in the Write Post screen, this live preview lets you check if you’ve chosen the right image. This feature was added by a href=”http://wordpress.gaw2006.de/”>Dominik who will be helping me out with further development. Please note the live preview has only been tested in Mozilla

  3. More Template Tag Options
    A. Define your own CSS class by using this query string inside The Loop:

    <php if (function_exists('gkl_postavatar')) gkl_postavatar('example', '', ''); ?>

    Here, “example” is the name of the class. The following is shown on your page:
    <div class="example"><img src="http://www.garinungkadol.com/wp-content/images/icons/messer01.jpg" alt="title of post" style="width:100px; height:100px; border:none;" /></div>

    B. Define your own HTML with the string parameters “before” and “after”.
    e.g. before = <p class=”mypic”>
      after = </p> in this example…

    <php if (function_exists('gkl_postavatar')) gkl_postavatar('', '<p class="mypic">', '</p>'); ?>

    will result in:

    <p class="mypic"><img src="http://www.garinungkadol.com/wp-content/images/icons/messer01.jpg" alt="title of post" style="width:100px; height:100px; border:none;" /></p>

    C. Show the image without any divs:

    <php if (function_exists('gkl_postavatar')) gkl_postavatar('', '', ''); ?>

    to get:

    <img src="http://www.garinungkadol.com/wp-content/images/icons/messer01.jpg" alt="title of post" style="width:100px; height:100px; border:none;" />

For support please comment here

Post Avatar 1.0

This is a WordPress plugin that allows you to easily include previously uploaded images with a post. Similar in concept to Livejournal Userpics

Download: post-avatar1.0.zip


Since I wanted Livejournal functionality on my blog, I went in search of some plugins that could help me display an image with a post.

I tried the Post Image plugin but that meant I had to upload a picture for every time I made a new post. I found that wasteful since I tend to re-use images in my posts.

Next I tried just placing in the link to the image in the Custom Fields section of the Write Post screen but I have difficulty remembering the image names and I spent too much time checking on the different pictures.

So I decided to create a plugin that would display a list of images I had already uploaded, for me to select when adding a post.

Features

* Easy selection of images in the Write Post screen.
* Allows the following file types: .jpg, .jpeg, .gif and .png.
* Template tag to display in themes.
* Does not display missing images.

Installation

  1. Download Post Avatar. Unzip the contents and upload gkl-postavatar.php to the WordPress plugin folder (/wp-content/plugins).
  2. Activate the plugin from the Plugin Management screen.
  3. Go to Options » Post Avatar ». Set the following options:
    * Path to Images Folder – location of your images folder in relation to your WordPress installation.
    * Show image in Write Post Page – Set to “Y” if you want to see a thumbnail of the post avatar in the Write Post screen. If not set to N.

Usage

A. Upload images
Upload the images that you intend to use to the folder defined in the Post Avatar options.

B. Display post avatars in your theme
Add the following within The Loop;

<?php if (function_exists('gkl_postavatar')) gkl_postavatar() ; ?>

The plugin will show your image encased within a <div> with the CSS class, “postavatar”. You may want to add a style for this in your stylesheet.
Example:

<div class="postavatar"><img src="http://www.garinungkadol.com/wp-content/images/icons/messer01.jpg" alt="post title" height="100" width="100" border="0" /></div>

C. Adding Post Avatars

  1. To add an image to a post, go to the Post Avatar section (just below the Save button).
  2. Select the image name from the list.
  3. Save your entry.

Version History

1.0 (08/25/2006)

  • Initial release

Support

Please use the comments section to submit bugs, get help or leave feedback.