[Solved] I need help with adding a favicon

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
awesomebean
Registered User
Posts: 10
Joined: Thu Mar 23, 2023 12:13 pm

[Solved] I need help with adding a favicon

Post by awesomebean »

Hello, I have been struggling with adding favicon to my forum.
Any help would be appreciated.

My website is hosted with docker image provided by bitnami.
https://hub.docker.com/r/bitnami/phpbb

Operating System: OpenMediaVault 6 (basically Debian)
phpBB version: 3.3.10
PHP version 8.1.16

https://forum.fractalcoffee.duckdns.org

I followed instructions from an article from knowledge base.
https://www.phpbb.com/support/docs/en/3 ... a-favicon/

Here's what I tried:

1. Loading other image files from my phpbb

I added favicon.ico into the root of my phpbb which has config.php and bunch of directories named ext, images, styles and so on.
When I try to access access https://forum.fractalcoffee.duckdns.org/favicon.ico, my phpbb says "The requested page could not be found."
However when I try to access https://forum.fractalcoffee.duckdns.org ... c/fire.gif, the gif image show perfectly fine.
I added favicon.ico into images/favicon.ico and load it there using https://forum.fractalcoffee.duckdns.org ... avicon.ico, favicon loads fine.

EDIT: removed https://forum.fractalcoffee.duckdns.org ... avicon.ico after solving the problem

2. Checking file permission

I suspected permission issue with favicon.ico and changed it to what bitnami phpbb container requires(1001) but I had no success.

Code: Select all

sudo chown 1001:users /path/to/phpbb/favicon.ico
3. Refreshing web browser cache

Check with Firefox, Chrome and Safari. Refreshed multipled times with Shift + Command + R.

Thanks in advance :)
Last edited by awesomebean on Thu Mar 23, 2023 2:52 pm, edited 1 time in total.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26551
Joined: Fri Aug 29, 2008 9:49 am

Re: I need help with adding a favicon

Post by Mick »

I suggest, first of all, that you use a known good favicon.ico image, like the one here: https://www.phpbb.com/favicon.ico. Many that are generated online aren’t true ico images and won’t work.

Just drop it in to the root of your board, purge the phpBB and browser caches, you may have to do it a couple of times to get it to show. If that doesn’t work try the same ico image with your code snippets. Once you have it working try your own images.

Edit: Wait a minute, it is working: https://forum.fractalcoffee.duckdns.org

8FCC4968-842C-4FAB-B8E5-7010CD009E8C.jpeg
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
awesomebean
Registered User
Posts: 10
Joined: Thu Mar 23, 2023 12:13 pm

Re: I need help with adding a favicon

Post by awesomebean »

I downloaded https://www.phpbb.com/favicon.ico and added to my website. Renamed my intended favicon into favicon-coffee.ico.

Are you using Safari? I see the F in the square in my Safari too, but not in Firefox and Chrome.
And that is not the favicon.ico that I downloaded from https://www.phpbb.com/favicon.ico

I tried purging phpbb caches from ACP > General but no avail.

By the way, my intended favicon is generated from https://realfavicongenerator.net

I'll keep updating when I make changes.
Last edited by awesomebean on Thu Mar 23, 2023 1:13 pm, edited 1 time in total.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26551
Joined: Fri Aug 29, 2008 9:49 am

Re: I need help with adding a favicon

Post by Mick »

I was using Safari but switched to FF to try it and it doesn’t show, I have no idea why that should be, my test board is ok whatever browser I use. Have you tried searching the web for an answer?

There are a few that might help like https://stackoverflow.com/questions/861 ... by-firefox and https://www.seoptimer.com/blog/favicon- ... %20browser etc.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
awesomebean
Registered User
Posts: 10
Joined: Thu Mar 23, 2023 12:13 pm

Re: I need help with adding a favicon

Post by awesomebean »

Yes I've been searching the web for answers before starting a topic here.

Some alternatives I found are:
I had some success with Metainformation and Favicon extension but configurating it was hard for me and I wanted to do it with phpbb native feature.

I added following line to my style's overall_header.html (right before </head>) and it didn't work.

Code: Select all

<link rel="shortcut icon" href="https://example.com/any/directory/favicon.ico" />
UPDATE after reading through provided links:

I added following line to my style's overall_header.html but still doesn't work.

Code: Select all

<link rel="shortcut icon" href="/favicon.ico?" />
also tried

Code: Select all

<link rel="shortcut icon" href="/favicon.ico" />
I suspect the problem resides in the bitnami/phpbb docker image. Maybe there's a permission issue with docker container. Sadly I cannot ask phpbb community to provide support for it.
Last edited by awesomebean on Thu Mar 23, 2023 1:39 pm, edited 1 time in total.
awesomebean
Registered User
Posts: 10
Joined: Thu Mar 23, 2023 12:13 pm

Re: I need help with adding a favicon

Post by awesomebean »

I got it working.

The image exposes /bitnami/php which links to directories residing in /opt/bitnami/phpbb inside the container.
I had to map favicon.ico to /opt/bitnami/phpbb/favicon.ico
I feel kind of dumb not recognizing it sooner.

Thank you Mick for helping me out with your precious time.
Last edited by awesomebean on Thu Mar 23, 2023 2:52 pm, edited 1 time in total.
User avatar
Sniper_E
Registered User
Posts: 1144
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [Solved] I need help with adding a favicon

Post by Sniper_E »

Hey awesome, you can also have an animated .gif favicon, for those browsers that support it.

Code: Select all

<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="favicon.gif" type="image/vnd.microsoft.icon" />
Like this: (the favicon.gif is this beer image)

Image ColdBrew - Index page
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
Post Reply

Return to “[3.3.x] Support Forum”