Avatar don’t Work

I’ve installed reading readme.txt file avatar plugin but it does not work. i can’t see in any place any avatar. i think the problem is the rule of rewrite in .htaccess . sorry for my bad english, i’m italian.

  • Immacolata
    • WPMU DEV Initiate

    I followed the directions exactly, so to be sure I uninstalled and reinstalled, twice. Nothing. Then I uninstalled and did it again using the plugins directory instead of the mu-plugins. The plugin installed fine, but I still do not see another page under the Users tab.

    Any ideas?

  • Immacolata
    • WPMU DEV Initiate

    When did it go up? It did say “coming soon….” last time I looked, which was recently (I thought…:wink:

    I probably did something stupid and obvious, but I did it 3 times so I guess it wasn’t meant to be! I’ll try the new one, thanks!

  • Immacolata
    • WPMU DEV Initiate

    I actually spoke too soon – while it did install, and it lets me upload avatars for blog and user, the avatar does not show anywhere, including under “Your current avatar”. Did I miss something? Should I CHMOD the new directories 777?

  • Immacolata
    • WPMU DEV Initiate

    Here’s what’s in my .htaccess, right after #uploaded files:

    Here is my .htaccess file; it may be that something is interfering with the avatar code?

    RewriteEngine On

    RewriteBase /

    RewriteRule ^sitemap.xml$ /files/sitemap.xml

    RewriteRule ^robots.txt$ /files/robots.txt [L]

    #uploaded files

    RewriteRule ^(.*/)?avatar/(.*) wp-content/avatars.php?file=$2 [L]

    RewriteRule ^(.*/)?files/$ index.php [L]

    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule . - [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]

    RewriteRule . index.php [L]

    # BEGIN FAlbum

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteRule ^gallery/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-content/plugins/falbum/wp/album.php?$1=$2&$3=$4&$5=$6&$7=$8 [QSA,L]

    </IfModule>

    # END FAlbum

    #Falbum

    RewriteRule ^gallery/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-inst/wp-content/plugins/falbum/wp/album.php?$1=$2&$3=$4&$5=$6&$7=$8 [QSA,L]

    ###

    #### blogs

    ###

    Here’s the code in avatars.php, under “Your Current Avatar”:

    <img src="<?php echo get_option('siteurl'); ?>/avatar/blog-<?php echo $wpdb->blogid ?>-128.png?ver=<?php echo md5(rand()); ?>" id="upload" width="128" height="128" />

    Shouldn’t that be /wp-content/avatars/blog/? Although even if it were, the avatar I uploaded is not in either directory.

  • Andrew
    • Champion of Loops
      the Friends plugin says it requires the Avatar plugin – will this one work with it?

    Nope, the friends plugin only works with the older avatar plugin.

      Should I CHMOD the new directories 777?

    Yep.

    Avatars should be uploaded to “/wp-content/avatars/blog/” and “/wp-content/avatars/user/”.

    Also, your htaccess rule listed above is not correct. It needs to be:

    RewriteRule ^(.*/)?avatar/(.*) wp-content/avatar.php?file=$2 [L]

    Thanks,

    Andrew

  • Immacolata
    • WPMU DEV Initiate

    I wish I knew what was wrong, then, because I still can’t make it work. If I give you my login info could you look and see what I’ve done wrong?

    When I view source on the avatar page, this is the image tag that’s there:

    <img src="http://chickpress.com/avatar/user-1-128.png?ver=0c8912c0bc561c81cdc2455bc36464f0" id="upload" width="128" height="128" />`

    So I see two problems – one, it’s not uploading to the proper directory, and two, it’s getting the URL wrong. I don’t speak enough PHP (barely any) to know where and what to change.

  • trent
    • Site Builder, Child of Zeus

    I have put the new avatar plugin into my installation and it is working really great! I am playing (without much success) to get a check to see if users have a gravatar before serving up the default plugin avatar. Anyone have any ideas? The reason I wanted that was there are many visitors that comment that are not members.

    Trent

  • Immacolata
    • WPMU DEV Initiate

    One step at a time! Andrew was a great help with getting them to upload. Next problem – the widget. When I view source, this is the URL of the avatar in the sidebar:

    <img src="http:///avatars/blog/blog-1-128.png?ver=1c5f4cd6041b6daa081317367b510796"/>

    This is the PHP code:

    <img src="http://<?php echo $current_site->domain . $current_site->path; ?>/avatars/blog-<?php echo $wpdb->blogid; ?>-128.png?ver=<?php echo md5(rand()); ?>"/>

    So I gather (duh) that $current_site->domain and $current_site->path are not being defined – where do I do this? Sorry I’m so ignorant…

  • Andrew
    • Champion of Loops
      to see if users have a gravatar before serving up the default plugin avatar

    I’ll see about adding that in.

      So I gather (duh) that $current_site->domain and $current_site->path are not being defined – where do I do this? Sorry I’m so ignorant…

    No worries, i’ll get it fixed and upload a new package.

    Thanks,

    Andrew

  • drmike
    • DEV MAN’s Mascot

    I’ve got to say I’m torn on that idea. Not for any “tin hat” reason. I for one would rather see the default avatar in there to encourage endusers to upload their avatar to the server.

    Maybe just for the users’ avatar if needbe. Of if the poster isn’t a signed in enduser.

  • Andrew
    • Champion of Loops
      I for one would rather see the default avatar in there to encourage endusers to upload their avatar to the server.

    Oh it would definitely be an option.

    Btw, i’m closing this thread because there are about four different things being discussed. Please feel free to open a new thread regarding gravatars.

    Thanks,

    Andrew