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
- Download Post Avatar. Unzip the contents and upload gkl-postavatar.php to the WordPress plugin folder (/wp-content/plugins).
- Activate the plugin from the Plugin Management screen.
- 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
- To add an image to a post, go to the Post Avatar section (just below the Save button).
- Select the image name from the list.
- 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.
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!
i cant get this to work. when i click on the options page, its blank and i cant do anything
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.
Kudos! This plugin works like a charm. I love it. Thanks for this.
It works great for me. Thank you very much for your hard work.
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.
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!
ah found the update! it works. thanks!
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~~~
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
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
Luxferi left some comments on how to style the template tag.
Read it here
I seriously truly officially LOVE YOU to F-ing DEATH!!!!! *dies* I can finally truly ditch LJ. You are my hero. lol 🙂
*dork*
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
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!
Hey Mike, Can you send me the url to your site? I’m not certain yet what is the problem.
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?
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?
Amanda, can you check the page source and see what is the url of the image that is trying to load?
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
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 ?
I can’t find loop.php either >..
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 >.
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.
Yinz, The Loop is the code where your entry template tags are found. You have to put the post avatar code inside there.
I second Yenz’ requests. User specific images and an admin panel upload option would be da-bomb.
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
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!
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!
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
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
You are a truly Class Act, Vix! Thanks for the great plugin and thanks for your help fixing someone else’s!
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).
@Alan: The avatar preview in the Write Post screen only works in Firefox. I’ve added this to the known issues list.
I tried to download the latest version and it tells me the download does not exist! Please help!
it would be a must if this plugin can be used for the comments :O)
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!
This is amazing and I love you. Thank you so much!!
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.
@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.
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
James: You have to use the latest Post Avatar release (1.2.3) together with the Role Manager plugin in order to customize which user groups can post avatars.
there are some bug with Gengo + Post avatar both last version. Can you help me ?
this plugin is interesting, have to check it
i want it to appear beofre title and post both but only 1 pic
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 🙂
Sorry – posted my comment in the wrong spot. I’ll move it!
It works, but only in select browers. The image are not appearing in the posts as they should in both IE and Firefox. It works fine with Safari.
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.)
Sadly the plugin is for displaying avatars with a post.
You can try the Gravatars plugin (http://en.gravatar.com/site/implement/wordpress) which displays a commenters avatar if they have an account with Gravatar.com