Wrapper for images support a parameter cache=1 to increase speed for some pages.

This commit is contained in:
Laurent Destailleur 2011-04-09 17:15:18 +00:00
parent 8850343ff6
commit c331ccfff8
6 changed files with 23 additions and 23 deletions

View File

@ -197,7 +197,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after)
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini); $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini);
print "\n".'<!-- Show logo on menu -->'."\n"; print "\n".'<!-- Show logo on menu -->'."\n";
print '<div class="blockvmenuimpair">'."\n"; print '<div class="blockvmenuimpair">'."\n";
print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n"; print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n";

View File

@ -589,7 +589,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini); $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini);
print "\n".'<!-- Show logo on menu -->'."\n"; print "\n".'<!-- Show logo on menu -->'."\n";
print '<div class="blockvmenuimpair">'."\n"; print '<div class="blockvmenuimpair">'."\n";
print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n"; print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n";

View File

@ -190,11 +190,11 @@ function dol_loginfunction($langs,$conf,$mysoc)
if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small); $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
} }
elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($mysoc->logo); $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
$width=128; $width=128;
} }
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))

View File

@ -101,9 +101,9 @@ FCKConfig.ToolbarLocation = 'In' ;
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */ /* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
FCKConfig.ToolbarSets["dolibarr_mailings"] = [ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
['FitWindow','Source'], ['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'], ['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'], ['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], ['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','BGColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'], ['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor','Image','Table','Rule','SpecialChar'], ['Link','Unlink','Anchor','Image','Table','Rule','SpecialChar'],
@ -112,9 +112,9 @@ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
FCKConfig.ToolbarSets["dolibarr_notes"] = [ FCKConfig.ToolbarSets["dolibarr_notes"] = [
['FitWindow','Source'], ['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'], ['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'], ['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], ['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','BGColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'], ['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Image','Table','Rule','SpecialChar'], ['Link','Unlink','Image','Table','Rule','SpecialChar'],
@ -123,13 +123,13 @@ FCKConfig.ToolbarSets["dolibarr_notes"] = [
FCKConfig.ToolbarSets["dolibarr_details"] = [ FCKConfig.ToolbarSets["dolibarr_details"] = [
['FitWindow','Source'], ['FitWindow','Source'],
['Cut','Copy','Paste','-','Preview'], ['Cut','Copy','Paste'],
['Undo','Redo'], ['Undo','Redo'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], ['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'], ['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['SpecialChar'], ['SpecialChar'],
['FontName','FontSize'] ['FontSize']
] ; ] ;
FCKConfig.ToolbarSets["Default"] = [ FCKConfig.ToolbarSets["Default"] = [

View File

@ -101,9 +101,9 @@ FCKConfig.ToolbarLocation = 'In' ;
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */ /* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
FCKConfig.ToolbarSets["dolibarr_mailings"] = [ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
['FitWindow','Source'], ['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'], ['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'], ['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], ['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'], ['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor','Image','Table','Rule','SpecialChar'], ['Link','Unlink','Anchor','Image','Table','Rule','SpecialChar'],
@ -112,9 +112,9 @@ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
FCKConfig.ToolbarSets["dolibarr_notes"] = [ FCKConfig.ToolbarSets["dolibarr_notes"] = [
['FitWindow','Source'], ['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'], ['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'], ['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], ['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'], ['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Image','Table','Rule','SpecialChar'], ['Link','Unlink','Image','Table','Rule','SpecialChar'],
@ -123,13 +123,13 @@ FCKConfig.ToolbarSets["dolibarr_notes"] = [
FCKConfig.ToolbarSets["dolibarr_details"] = [ FCKConfig.ToolbarSets["dolibarr_details"] = [
['FitWindow','Source'], ['FitWindow','Source'],
['Cut','Copy','Paste','-','Preview'], ['Cut','Copy','Paste'],
['Undo','Redo'], ['Undo','Redo'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], ['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'], ['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['SpecialChar'], ['SpecialChar'],
['FontName','FontSize'] ['FontSize']
] ; ] ;
FCKConfig.ToolbarSets["Default"] = [ FCKConfig.ToolbarSets["Default"] = [

View File

@ -194,11 +194,11 @@ $urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small); $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
} }
elseif (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) elseif (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($mysoc->logo); $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
$width=128; $width=128;
} }
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))