Work on image for "no photo" with better resolution

This commit is contained in:
Laurent Destailleur 2015-10-08 23:50:17 +02:00
parent 68d4a9fc63
commit 0d799402d0
7 changed files with 2054 additions and 5 deletions

2049
dev/cliparts/commons.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -380,7 +380,7 @@ if ($action == 'edit' || $action == 'updateedit')
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
}
} else {
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.jpg">';
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
}
print '</td></tr></table>';
print '</td></tr>';
@ -769,7 +769,7 @@ else
}
else
{
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.jpg">';
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
}
print '</td></tr></table>';

View File

@ -5197,7 +5197,7 @@ class Form
}
else
{
$nophoto='/public/theme/common/nophoto.jpg';
$nophoto='/public/theme/common/nophoto.png';
if (in_array($modulepart,array('userphoto','contact'))) // For module thar are "physical" users
{
$nophoto='/public/theme/common/user_anonymous.png';

View File

@ -355,7 +355,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
$file=$dirtheme."/".$subdir."/thumb.png";
$url=$urltheme."/".$subdir."/thumb.png";
if (! file_exists($file)) $url=$urltheme."/common/nophoto.jpg";
if (! file_exists($file)) $url=DOL_URL_ROOT.'/public/theme/common/nophoto.png';
print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.(GETPOST("optioncss")?'&optioncss='.GETPOST("optioncss",'alpha',1):'').($fuser?'&id='.$fuser->id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -173,7 +173,7 @@ else // Open and return file
// This test is to avoid error images when image is not available (for example thumbs).
if (! dol_is_file($original_file))
{
$original_file=DOL_DOCUMENT_ROOT.'/public/theme/common/nophoto.jpg';
$original_file=DOL_DOCUMENT_ROOT.'/public/theme/common/nophoto.png';
/*$error='Error: File '.$_GET["file"].' does not exists or filesystems permissions are not allowed';
dol_print_error(0,$error);
print $error;