View Single Post
Old 06-05-2008, 04:42 PM   #5 (permalink)
ciprianmp
The Wanderer
 
ciprianmp's Avatar
 
Join Date: Jun 2008
Location: Bucharest, Romania
Posts: 14
Thanks: 6
ciprianmp is on a distinguished road
Default

The object operator of that line is "->" - as described in php manual - so it doesn't make it to the function itself.
Anyway, there are other operators/constants used in a format unsupported in early php versions. That's why I asked if it can be released for php<5 as well... I like the cache function, that's why I'd stick to your class approach, but I have to make it widely work... otherwise it will break my own app layout - which is not my purpose.
I just want to give users an extra-option of gravatars, besides the included or remote avatars already implemented in phpmychat.

Some feedback so far:
1. I also noticed the cache created file doesn't take the right specified size or rating (neither default) - it always take "80".
2. You defined:
PHP Code:
const GRAVATAR_SITE_URL 'http://www.gravatar.com/avatar.php?gravatar_id=%ssize=%sdefault=%srating=%s'
Notice there is no ampersand separator between the link's vars. The fix should be this:
PHP Code:
const GRAVATAR_SITE_URL 'http://www.gravatar.com/avatar.php?gravatar_id=%s&size=%s&default=%s&rating=%s'
< deprecated>But it still gets the regular gravatar of that email, so the vars are not well working in the class functions...
Tested again and the new link format above does fix it
3.Gravatar v3.0 improved/simplified/extended the link to this format:
PHP Code:
const GRAVATAR_SITE_URL 'http://www.gravatar.com/avatar/%s?s=%s&d=%s&r=%s'
(Gravatar - Globally Recognized Avatars)

I am not used to classes too much, so I'd need your expertize to update, fix & extend this class...

Last edited by ciprianmp : 06-14-2008 at 11:18 PM. Reason: Fixed the version 3 link format - tested!
ciprianmp is offline  
Reply With Quote