From 51ad41293df3c685d2bf677005240f6493593d79 Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Wed, 20 Aug 2014 16:07:04 +0200 Subject: [PATCH 1/5] Add favicon capability into admin and catalog side --- catalog/admin/store_logo.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/catalog/admin/store_logo.php b/catalog/admin/store_logo.php index 009ff4833..ec3006861 100644 --- a/catalog/admin/store_logo.php +++ b/catalog/admin/store_logo.php @@ -23,6 +23,10 @@ $store_logo->set_extensions('png'); $store_logo->set_destination(DIR_FS_CATALOG_IMAGES); + $store_favicon = new upload('store_favicon'); + $store_favicon->set_extensions('ico'); + $store_favicon->set_destination(DIR_FS_CATALOG); + if ($store_logo->parse()) { $store_logo->set_filename('store_logo.png'); @@ -34,6 +38,18 @@ } else { $error = true; } + + if ($store_favicon->parse()) { + $store_favicon->set_filename('favicon.ico'); + + if ($store_favicon->save()) { + $messageStack->add_session(SUCCESS_FAVICON_UPDATED, 'success'); + } else { + $error = true; + } + } else { + $error = true; + } if ($error == false) { tep_redirect(tep_href_link(FILENAME_STORE_LOGO)); @@ -72,6 +88,11 @@ + + + + + @@ -87,6 +108,18 @@ + + + + + + + + + + + + Date: Wed, 20 Aug 2014 16:07:55 +0200 Subject: [PATCH 2/5] Added favicon text and info --- catalog/admin/includes/languages/english/store_logo.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/catalog/admin/includes/languages/english/store_logo.php b/catalog/admin/includes/languages/english/store_logo.php index 9c4771562..ca0f7cca6 100644 --- a/catalog/admin/includes/languages/english/store_logo.php +++ b/catalog/admin/includes/languages/english/store_logo.php @@ -15,7 +15,11 @@ define('TEXT_LOGO_IMAGE', 'New Logo:'); define('TEXT_FORMAT_AND_LOCATION', 'The store logo must be in PNG format and will be saved as:'); +define('TEXT_FAVICON_IMAGE', 'New Favicon:'); +define('TEXT_FAVICON_FORMAT_AND_LOCATION', 'The store favicon must be in ICO format with size 16x16px and will be saved as:'); + define('SUCCESS_LOGO_UPDATED', 'Success: The store logo has successfully been updated!'); +define('SUCCESS_FAVICON_UPDATED', 'Success: The favicon image has successfully been updated!'); define('ERROR_IMAGES_DIRECTORY_NOT_WRITEABLE', 'Error: The images directory cannot be uploaded to. (click here to review the directory permissions)'); -?> \ No newline at end of file +?> From f4ce4bfae381dae6e862f8e16dc578698d23c596 Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Wed, 20 Aug 2014 16:09:52 +0200 Subject: [PATCH 3/5] Add favicon to catalog side --- catalog/includes/template_top.php | 1 + 1 file changed, 1 insertion(+) diff --git a/catalog/includes/template_top.php b/catalog/includes/template_top.php index 2e9ac9cf1..da0271805 100644 --- a/catalog/includes/template_top.php +++ b/catalog/includes/template_top.php @@ -28,6 +28,7 @@ <?php echo tep_output_string_protected($oscTemplate->getTitle()); ?> + From f6176ed3d23d55427c4ad2d1fa66dca88dea30dd Mon Sep 17 00:00:00 2001 From: acidvertigo Date: Wed, 20 Aug 2014 16:29:54 +0200 Subject: [PATCH 4/5] Add favicon link --- catalog/admin/includes/template_top.php | 1 + 1 file changed, 1 insertion(+) diff --git a/catalog/admin/includes/template_top.php b/catalog/admin/includes/template_top.php index ca0ac3f05..a06f0ad77 100644 --- a/catalog/admin/includes/template_top.php +++ b/catalog/admin/includes/template_top.php @@ -17,6 +17,7 @@ <?php echo TITLE; ?> + From ae2495c0dd91d0c6f7a07b59aa177bca96299f5e Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 20 Aug 2014 16:35:40 +0200 Subject: [PATCH 5/5] Add favicon image --- catalog/favicon.ico | Bin 0 -> 824 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 catalog/favicon.ico diff --git a/catalog/favicon.ico b/catalog/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..b916be67b75eae6c7c1bea01f021d4af98739f59 GIT binary patch literal 824 zcmb7?KWoB37{=3f>{2@QBlHuL&K>gyR~=n~dj{iR$dt?>qqwMpAQA{R5RzbDk}5BksR!@nd4JCXce%SC?)!x*#uv<=P;YD`Es;cLCQ51z?Xcz{|vbwI5(cA5KJl1Np z?RHC8S(XWc(ChUGF3YlISp+QG>-Ea>JgkV_R;vY@#{}!)a7ZlCZntrus(s(@_xo`i zmzJU^m&>IZBgk|*J)KSfUDq{DlW?o;ZntwBr{v@Dcs`$3GnfQHVB7YCESF2TuQW{` zgb=gYY`tD%2zlIM4XdwKD@@>*CzA;#pyA3!qY)ek91&qbt7%%E=a|DLyWK7(ST7a} nNs`Xza|vM&jYi{eIN%JS;n3h^!i_hZO;Hr#;SquVwiNXX7_hhc literal 0 HcmV?d00001