[theme-reviewers] Distilled Review

randall randall at ano-hosting.nl
Thu Jun 17 06:39:06 UTC 2010


yes,

in my single.php i use <?php echo get_avatar(the_author_meta(), '100'); ?>
it adds a single gravatar for that single author, as you can see on the 
bottom of this page.
http://test.pinksterbeer.nl/?p=452


the difference with page-authors.php on this page
http://test.pinksterbeer.nl/?page_id=470
is that it lists ALL authors with their avatars

this could be done using wp_list_authors as described in 
http://codex.wordpress.org/Template_Tags/wp_list_authors
but this does NOT include any option for avatars.
All examples on the web, including an existing plugin, use the wpdb call 
for this functionality.

again, if it is not desirable for themes in the WordPress repository to 
include themes that have a direct query i would be more than willing to 
remove it and have it replaced with the wp_list_authors function without 
the avatar displayed next to the authors.

thanks again for the feedback Tom, its extremely valuable

Randall



On 06/16/2010 10:38 PM, Tom Lany wrote:
> Have you tried <?php echo get_avatar( get_the_author_meta( 
> 'user_email' )); ?> , or something similar for pulling the Avatar?  
> Look on line 37 of 
> http://core.trac.wordpress.org/browser/trunk/wp-content/themes/twentyten/single.php, 
> as I suggested below for the code used in the default  (in 3.0) 
> WordPress theme.  They add a gravatar to single.php without a DB query.
>
> Tom Lany
> http://tomlany.net
>
> On 6/16/10 1:42 AM, randall wrote:
>> On 06/15/2010 11:37 PM, Tom Lany wrote:
>>> Hi Randall,
>>>
>>> Thanks for taking a look at some of these issues.
>>>
>>> Regarding the DB query, you should be able to pull an avatar without 
>>> a direct database query.  See line 37 of: 
>>> http://core.trac.wordpress.org/browser/trunk/wp-content/themes/twentyten/single.php 
>>> for an example of how this is done in Twentyten (the new default 
>>> theme).
>>>
>>> Regarding the "image is displayed twice" issue, when I tested the 
>>> theme, I saw two copies of the same image on an attachment image 
>>> page.  To reproduce, upload an image on a post page.  For the link 
>>> option in the image option dialog that appears once the image has 
>>> been uploaded, choose "Post URL", and then insert the image into the 
>>> post.  Click on the link, and you should see the double inserted image.
>>>
>>> Thanks!
>>>
>>> Tom Lany
>>> http://tomlany.net
>> thanks Tom,
>>
>> have added an attachment.php and this seems to fix the issue of the 
>> double images.
>>
>> leaves the db query, pulling an avatar like on line 37 of the link is 
>> what i have in my single.php as well, this pulls the data + avatar of 
>> the post author,
>> but, what i cant figure out is to have a list of all the blogs 
>> authors with there avatars, when hitting the search engines for this 
>> it seems to confirm that it is not possible without a direct query as 
>> described here http://codex.wordpress.org/Function_Reference/wpdb_Class.
>> but maybe i'm overlooking something here....would love to be proven 
>> wrong.
>>
>> in case anybody knows some objection regards to safety/performance 
>> etc.. , it would be simple to remove the query and have it replaced 
>> with a list without any avatars, most bloggers are ugly anyway ;)
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers


-- 
web design&  hosting
http://www.ano-hosting.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/mailman/private/theme-reviewers/attachments/20100617/5347c459/attachment.htm>


More information about the theme-reviewers mailing list