Changeset 39491

Show
Ignore:
Timestamp:
04/09/08 23:18:54 (3 months ago)
Author:
peterwsterling
Message:

format example added

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • add-local-avatar/trunk/avatars.php

    r39351 r39491  
    55      Description:      A plugin to manage public and private avatars. 
    66      Author:                 Peter Sterling 
    7       Version:          2.0 
     7      Version:          2.1 
    88      Changes:          0.1 - Initial version. 
    99                              1.0 - Added pagination of users list. 
    1010                              2.0 - Added pagination of the commentors list too. 
     11                              2.1 - Added example formatting information. 
    1112      Author URI:       http://www.sterling-adventures.co.uk/ 
    1213*/ 
     
    319320                  <li>Default image if no public (global) or private (local) avatar found; defaulted to value set above.</li> 
    320321            </ol></code></p> 
     322            <p>Apply format to the avatars with something like the following in in you <code>style.css</code> theme file:<br /> 
     323            <ul><code>.avatar { float:left; padding: 2px; margin: 0; border: 1px solid #ddd; background: white; }</code></ul></p> 
    321324            <p>Examples for your theme's template files:<br /> 
    322325            <ul> 
    323                   <li>In <code>single.php</code> use <code>&lt;?php get_avatar($post->post_author); ?&gt;</code> to show the post author’s avatar.</li> 
     326                  <li>In <code>single.php</code> declare <code>&lt;?php global $post; ?&gt;</code> if not already declared and then use <code>&lt;?php get_avatar($post->post_author); ?&gt;</code> to show the post author’s avatar.</li> 
    324327                  <li>Inside the comment loop of <code>comments.php</code> use <code>&lt;?php get_avatar($comment); ?&gt;</code> to show the comment author’s avatar.</li> 
    325328            </ul></p>