1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-27 00:05:46 +02:00

New avatar paths: avatars/default and avatars/uploaded . Paths need to be checked throughout the core.

This commit is contained in:
Cameron
2013-04-19 14:00:19 -07:00
parent c1393a3569
commit a7b3a3e6f1
4 changed files with 40 additions and 11 deletions

View File

@@ -397,7 +397,7 @@ class e_form
$previnput = $idinput."-preview";
$optioni = $idinput."-options";
$img = (strpos($curVal,"://")!==false) ? $curVal : $tp->thumbUrl(e_MEDIA."avatars/".$curVal,"aw=".vartrue($width)."&ah=".vartrue($height));
$img = (strpos($curVal,"://")!==false) ? $curVal : $tp->thumbUrl(e_MEDIA."avatars/default/".$curVal,"aw=".vartrue($width)."&ah=".vartrue($height));
if(!$curVal)
{
@@ -416,7 +416,7 @@ class e_form
$text .= "<input class='btn button e-expandit' type ='button' style='cursor:pointer' size='30' value=\"Choose Avatar\" />"; //TODO Common LAN.
}
$avFiles = e107::getFile()->get_files(e_MEDIA."avatars/",".jpg|.png|.gif|.jpeg|.JPG|.GIF|.PNG");
$avFiles = e107::getFile()->get_files(e_MEDIA."avatars/default/",".jpg|.png|.gif|.jpeg|.JPG|.GIF|.PNG");
$text .= "\n<div id='{$optioni}' style='display:none' >\n"; //TODO unique id.
@@ -433,7 +433,7 @@ class e_form
foreach($avFiles as $fi)
{
$img_path = $tp->thumbUrl(e_MEDIA_ABS."avatars/".$fi['fname'],$attr);
$img_path = $tp->thumbUrl(e_MEDIA_ABS."avatars/default/".$fi['fname'],$attr);
$text .= "\n<a class='e-expandit' title='Choose this avatar' href='#{$optioni}'><img src='".$img_path."' alt='' onclick=\"insertext('".$fi['fname']."', '".$idinput."');document.getElementById('".$previnput."').src = this.src;\" /></a> ";
//TODO javascript CSS selector
}