A bunch of changes to the Post Avatar plugin. Download it now.
- 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. - 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 - 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;" />
hi, i posted on your original version 1.0 thread with another problem that i solved by updating, but now i am having another problem with this updated 1.1 version!
Wonder if you can assist… so the plugin seems to be installed properly, i set the Path to Images Folder ok and when i go to Write Post the images show up in the drop down ‘Select’ menu ok. However when i select an image to use, instead of previewing it on the right under ‘Preview’ it says ‘No Avatar Selected’.
Despite this , i tested out publishing a post with an avatar image selected in the menu but no image shows up. In fact when i go back to edit the post the ‘Select’ menu has reset itself to ‘No Avatar Selected’.
Very confused! Hope you can help. Thanks again!
amplifico: I faced the same problem as you, until I stumbled onto the solution.
If you read the post above you will see that the author has written More Template Tag Options. I chose A, defining my own CSS class.
1. Go to your WordPress Theme folder, and open Loop.php (use notepad)
2. Find where your post content is, and add this line:
<?php if (function_exists(‘gkl_postavatar’)) gkl_postavatar(‘example’, ”, ”); ?>
Replace example with postavatar.
3. Open your style.css and find where most of your css for post content is. (My css isn’t that good, I’m not sure if you can place them anywhere or in specific area, but just what works for me) and add this:
.postavatar {
padding: 5px 5px 5px 5px;
float: left;
}
Hope I didn’t mess up the code here. If it is, or you need more help, email me. luxferi [ AT ] gmail.com
I’ll try the best I can. Good luck!
Oh good, it didn’t mess up. 🙂