Announcement

#1 2021-03-26 17:40:59

Nigel-Aves
Member
2015-09-22
63

Stop PIWIGO from using "favicon.ico

Hello/Hi/Greetings,

I'm using the "great" plugin Add Headers to use best practices for "favicons" (different sizes depending on client). But this means I no longer need or want the favicon.ico

I think I found were I could stop that from happening but it would mean locally editing a .php file, which I would rather not do. Is there a way of stopping the favicon.ico being written into the header?

I tried experimenting with local files editor but that no longer "saves" the added information, and errors out.

Many Thanks - Nigel.

Piwigo 11.4.0
Operating system: Linux
PHP: 7.4.16 (Show info) [2021-03-26 10:35:35]
MySQL: 8.0.23-0ubuntu0.20.04.1 [2021-03-26 10:35:35]
Graphics Library: External ImageMagick 6.9.10-23

Offline

 

#2 2021-03-26 17:46:05

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7224

Re: Stop PIWIGO from using "favicon.ico

Hi :-)

What theme you are choose ?


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2021-03-26 17:50:44

Nigel-Aves
Member
2015-09-22
63

Re: Stop PIWIGO from using "favicon.ico

I'm currently using the Elegant Theme ...

Offline

 

#4 2021-03-26 20:44:25

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7224

Re: Stop PIWIGO from using "favicon.ico

Hi :-)

personal plugin

add_event_handler('loc_begin_page_header', 'del_Favicon', 65 );

function del_Favicon(){
    global $template;
    $template->set_prefilter('header', 'del_FaviconF');
}

function del_FaviconF($content, &$smarty){
  $search = '#<link rel="shortcut icon".*?favicon.ico">#';
    $replacement = '';
  return preg_replace($search, $replacement, $content);
}


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#5 2021-03-26 22:51:59

Nigel-Aves
Member
2015-09-22
63

Re: Stop PIWIGO from using "favicon.ico

ddtddt,

Many thanks, that worked perfectly straight out of the box, well, cut and pasted out of a forum, but it doesn't sound so good!

What was strange was that I had no issues "saving" this time, just did as it was supposed to do.

Once Again, Many Thanks ....

Nigel.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact