Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi BongoUser

    I can’t see that error anywhere else! You must be doing something wrong I think…

    Cheers,
    Pete.

    Thread Starter bongouser

    (@bongouser)

    Hi,

    i can’t see what users can make wrong?
    They only upload there ava’s ….

    I have test it with new 6.3 release … same error.
    Value in Local Avatar is: “/images/avatars/bongo_avatar.jpg.”
    I have to remove the dot before it works.

    Very strange. Perhaps another plug-in is clashing?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Check your functions.php file for any filters you may have put in for other things.

    I just installed this plugin today and am getting the same error as BongoUser. The extra dot appears after the file extension, this is added right to corresponding meta_value entry in the database.

    I found this error only occurs when I check the “Resize uploads” box. if the avatar isn’t re-sized then it works fine, but i’d definitely like them resized if possible.

    I’ve tried deactiviating all plugins and dumping the contents of my functions.php file, no luck yet though.

    Okay, I found the error in the plugin’s avatars.php file:

    In the “// Resize required?” section change this line:

    $file = basename($resized_file, '.' . $parts['extension']) . '.' . $parts['extension'];

    to this instead:

    $file = basename($resized_file, '.' . $parts['extension']) . $parts['extension'];

    Also, to make the plugin’s output code validate I had to make these other changes.

    Changed these lines:

    $avatar = "<img alt='' src='{$src}' class='{$class} avatar-{$size} avatar-default' height='{$size}' width='{$size}' />";
    
    	// If not in admin pages and there is a URL, wrap the avatar markup with an anchor.
    	if(!empty($url) && $url != 'https://' && !is_admin()) $avatar = "<a alt='Avatar' href='" . attribute_escape($url) . "' rel='nofollow' title='" . (empty($name) ? '' : "Visit $name&rsquo;s website.") . "' " . ($avatar_options['snapshots'] == 'on' ? '>' : "class='snap_noshots'>") . $avatar . "</a>";

    to this:

    $avatar = "<img alt='{$name}' src='{$src}' class='{$class} avatar-{$size} avatar-default' height='{$size}' width='{$size}' />";
    
    	// If not in admin pages and there is a URL, wrap the avatar markup with an anchor.
    	if(!empty($url) && $url != 'https://' && !is_admin()) $avatar = "<a href='" . attribute_escape($url) . "' rel='nofollow' title='" . (empty($name) ? '' : "Visit $name&rsquo;s website.") . "' " . ($avatar_options['snapshots'] == 'on' ? '>' : "class='snap_noshots'>") . $avatar . "</a>";

    Which added the user name as the alt text in the image tag, and i deleted the alt reference that was in the anchor tag.

    sorry, double post

    Thread Starter bongouser

    (@bongouser)

    $file = basename($resized_file, ‘.’ . $parts[‘extension’]) . $parts[‘extension’];

    Great, it works ??
    Thanks !!

    Ah ha!

    Well spotted, but not quite the real problem. But thanks for the pointer… ??
    I have now fixed and will release a new version tonight.

    With respect to the alt tag; yeah fine. Have fixed that too.

    Thread Starter bongouser

    (@bongouser)

    Thanks.
    Peter, how can i make a german translation of your project?
    It’s a lot of work to translate all strings after updates.

    German; yes a proper internationalisation would be useful, but a lot of work. Something I might look into… Do you wanna translate and send to me (contact details on my site)?

    Thread Starter bongouser

    (@bongouser)

    Ok, i send you the translatet file after weekend ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Add Local Avatar] Problems with upload Avatars’ is closed to new replies.