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.

55 thoughts on “Post Avatar 1.0

  1. The zip is faulty. I tried to download it using Firefox 1.5 and IE 7.

    Your plugin looks interesting I will have a look at it when the zip is working. Thanks in advance!

  2. Pingback: WordPress Station » Blog Archive » Post Avatar 1.0

  3. i cant get this to work. when i click on the options page, its blank and i cant do anything

  4. Bobby: Could you be more specific about what the problem is?

    Did you activate the plugin and on the Post Avatar options page there’s nothing to see?

    In any case, I’ve sent you an e-mail.

  5. Pingback: Wordpress-Plugins » Blog Archiv » Post Avatar 1.0

  6. I am using dreamhost to host my site and they have disabled allow_url_fopen. Is there any solution that will allow me to use the plugin? Using cURL instead perhaps? I am completely dumb when it comes to programming so if cURL will work I would need step by step instructions on how to fix it. Thanks a lot in advance.

  7. hey this plugin looks perfect for what i am trying to do. however when i activate the plugin and go to Options>Post Avatar it says:

    Fatal error: Call to undefined function: wp_nonce_field() in /www/amplifico.net/www/amplificoblog/wp-content/plugins/gkl-postavatar.php on line 208

    Can you help? Thanks so much!

  8. This plug-in is very nice..
    Thank you.^^
    But I have some problem.
    This messege is shown :
    Warning: getimagesize(): URL file-access is disabled in the server configuration in /home/heeya7420/html/wordpress/wp-content/plugins/post-avatar/gkl-postavatar.php on line 144

    Warning: getimagesize(http://heeya7420.dothome.co.kr/wordpress/wp-content/uploads/icons/ellensleeping.gif): failed to open stream: no suitable wrapper could be found in /home/heeya7420/html/wordpress/wp-content/plugins/post-avatar/gkl-postavatar.php on line 144

    Help Me~~~

  9. Pingback: Garinungkadol » Blog Archive » Post Avatar 1.1

  10. If you are getting the error URL file-access is disabled in the server configuration or you are hosted with Dreamhost, please download the latest version of Post Avatar here

  11. Hello,

    First of all, many thanks for this nice made plugin for WP! Well done.

    Personly, i dont use the default theme on my blog and everything is working fine, but the badest problem is that my post-image is showing very incorrectly place. When i post a newspost it will be add to the leftside above the sidebar, very weird. Anyone know how to fix this, or how to change this?

    Thanks alot
    AVD

    Blog: http://www.dreun.net

  12. Pingback: The WordPress Podcast · Episode 6: Akismet rumors, lots of new and updated plug-ins, listener mail

  13. I seriously truly officially LOVE YOU to F-ing DEATH!!!!! *dies* I can finally truly ditch LJ. You are my hero. lol :)
    *dork*

  14. Pingback: Jess Please! » Blog Archive » All you’ve got left is one Kraft Dinner

  15. Hi, first many thanx to your nice plugin. It works almost fine with one exeption i don’t understand.

    if i write one post i am able to choose an avaar and save the post. if i write a second post after the first and i choose the same avatar again (which i think was intented to do so) then the new post shows up two times the same avatar and the avatar of the post before is gone. do you have a solution for that?
    best regards from vienna, Austria
    mike

  16. Hey Vix, You posted on my blog about my mysterious Post Avatar problem. Yes, I am using that template tag but nothing is showing up! Everything else is fine, I get the admin screen, I get the avatar options on my post screen. The only thing wrong is the tag. If you look at the source of my blog you’ll see that I commented where the tag should be but it just isn’t showing up. Any ideas? Thanks!

  17. I got the plugin installed also.. but i have no clue what u mean by loop… what loop?..

    How do i put the tags on my theme to show on my main page?

  18. I installed the updated version on my site and followed the instructions. However, there is a broken image under the ‘image preview’, and after selecting an image and saving the post, it comes back to the page saying “No Avatar Selected” still. On the updated post I saw a commenter had the same problem as me and someone suggested puting the php code in the Loop.php … however, my Loop is spread throughout my pages, and currently the php tag is within the if (have_posts) section of the loop in my index.php and I’m still getting nothing.

    Help?

  19. I just checked the source and there isn’t anything there about the icon, or anything relating to the plugin. I have the php included into the index.php, and the drop down menu shows up on my write page, but there’s no sign of it in the post or in the actual site’s source.

    O_o lol

  20. Can this plugin be used for multiple user interface? Eg. display specific avatar for each user’s post just like livejournal entries?

    Is uploading of avatar possible by means of ftp only ?

  21. I also face the same problem as Amanda, the avatar droplist shows up in the write menu but when published, the avatar is not shown on the post. I tried adding

    to single.php for single post, the avatar nv came out either.. Pls help >.

  22. Yinz said:

    All users share the same set of avatars. I’ll add this to the development wishlist.

    Is uploading of avatar possible by means of ftp only ?
    At the moment yes.

  23. Yinz, The Loop is the code where your entry template tags are found. You have to put the post avatar code inside there.

  24. I think it would be better for the avatar to be in the profile menu rather than the write menu together with the upload menu, such that the avatar chosen will always be displayed each entry. It reduces the loading time for the write page too. =)

    Thanks Vix for your help, appreciated it very much~! =)

    silverelf

  25. Great idea for a WordPress plugin!

    One problem I’m having though: when I have multiple posts on my homepage, the avatar for the most recent post works fine – but the avatars for the posts below disappear.

    Does the PHP have to be at a certain place in the loop? Or more than once in the loop? I’m using the latest release of the K2 theme.

    Any help would be great! Thanks!

  26. Ok….well, nevermind. I guess it just took a little while to update, and now it’s working just fine.

    Sorry for the alarm!

    The only other problem I’m having is that on the single post pages (the permalink entries), the avatars aren’t using the CSS I’ve used for the main page. They’re in a different spot.

    If anyone has any idea how I can correct this easily, let me know! Thanks!

  27. I recieve these errors. Someone, please help me…Thanks. THese errors are recieved when Creating New Post.

    Warning: opendir(E:\Inetpub\thehotfix.net\Wordpress\\images\news\logos\) [function.opendir]: failed to open dir: Invalid argument in E:\Inetpub\thehotfix.net\Wordpress\wp-content\plugins\post-avatar\gkl-postavatar.php on line 49

    Warning: readdir(): supplied argument is not a valid Directory resource in E:\Inetpub\thehotfix.net\Wordpress\wp-content\plugins\post-avatar\gkl-postavatar.php on line 51

    Warning: closedir(): supplied argument is not a valid Directory resource in E:\Inetpub\thehotfix.net\Wordpress\wp-content\plugins\post-avatar\gkl-postavatar.php on line 71

  28. Hi, I’ve got this working perfectly for me, using the code within my files.
    However I also have the same issue as the person above. It doesn’t appear to affect functionality though!
    Thanks!
    Kelly

  29. You are a truly Class Act, Vix! Thanks for the great plugin and thanks for your help fixing someone else’s!

  30. This is a MUCH needed Plug-in for WordPress.

    Are there compatibility issues with any of the browsers (IE, Safari)? It is working for me in FireFox, but not the others. Also, (this may be a sytle tweak) the post image thumbnail is not a thumbnail. I’m getting the full pic (in FireFox, nothing in the other browsers).

  31. @Alan: The avatar preview in the Write Post screen only works in Firefox. I’ve added this to the known issues list.

  32. I tried to download the latest version and it tells me the download does not exist! Please help!

  33. I have an odd problem, the post avatar works fine on the main page but when you scroll back to previous pages it loads the avatar in the upper right hand corner of the page as well as next to the post… Any ideas on how to fix this?

    Thanks!

  34. I have this plug-in and the lj-crossposting plug-in and was wondering if there was a way to make sure the avatar was crossposted too. The avatar shows up on the rss feeds, but not when using the crossposter.

  35. @Magicpointshoe: I’m not sure how the lj-crossposting plugin works. But off the top of my head, I can’t see how the post avatar would be cross-posted. Even if the images are the same, the urls are two different beasts.

    I’ll poke around the lj-crossposting plugin and see what (if anything) can be done.

  36. Hi,

    Is there a way for this to be admin only. My thought was to have sponsor posts and I would put the avatar on myself. My site is a job site.

    Thanks

  37. This one is nice, and also works with pages, thanks a lot! I managed to modify my theme so a small version of the post avatar is displayed in the list of pages next to each link.. so lots of little icons all over the place now, really love it :)

  38. Great PlugIn!

    I am trying to get this Post-Avatar-selectionbox in the comments form…
    so that random guests can choose a quick
    buddyicon for the comment.

    Anyone done this before?

    Any help would be nice.)