suport Posted January 6, 2010 Report Share Posted January 6, 2010 function format_avatar($id){ $avatar = $this->cache->avatars[$id]; if(empty($avatar->avatar_location)){ return '<img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif"/>'; } list($width, $height) = explode("x", $avatar->avatar_size); if($avatar->avatar_type == 'local'){ return sprintf('<img src="%sstyle_avatars/%s" alt="" width="%d" height="%d" />', self::$url, $avatar->avatar_location, $width, $height); } if($avatar->avatar_type == 'upload'){ return sprintf('<img src="%suploads/%s" alt="" width="%d" height="%d" />', self::$url, $avatar->avatar_location, $width, $height); } if($avatar->avatar_type == 'url'){ return sprintf('<img src="%s" alt="" width="%d" height="%d" />', $avatar->avatar_location, $width, $height); } } kas tur nav pareizi ka nerada lietotji kuriem nav avatara to bili ? ;/ Quote Link to comment Share on other sites More sharing options...
2easy Posted January 6, 2010 Report Share Posted January 6, 2010 tu prasi par šo? <img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif"/> sazin, varbūt tas bildites.lv serveris bija off uz kādu brīdi. labāk liec to bildi uz sava servera :D Quote Link to comment Share on other sites More sharing options...
suport Posted January 7, 2010 Author Report Share Posted January 7, 2010 uzliekot uz servera ari nejiet :/ Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted January 7, 2010 Report Share Posted January 7, 2010 Kāds izskatās neejošais HTMLs? Quote Link to comment Share on other sites More sharing options...
false Posted January 9, 2010 Report Share Posted January 9, 2010 Nomaini if(empty($avatar->avatar_location)){ return '<img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif"/>'; } uz if(mysql_num_rows($avatar->avatar_location) == 0){ return '<img src="http://bildites.lv/images/flxtehgw6jjlcxnw17lz.gif"/>'; } Quote Link to comment Share on other sites More sharing options...
marcis Posted January 10, 2010 Report Share Posted January 10, 2010 false, kas tev liek domāt, ka šis objekta elements ir resource? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.