[SOLVED] Help on where to install my favicon.ico

Simpsoid

Joined: 2009-09-30
Posts: 4
Posted: Wed, 2009-09-30 01:53

Hi,
So I am relatively new to Gallery but have created a favicon.ico for my site.
I have tried placing it in the root folder (../gallery2/), the images folder (../gallery2/images/) and even sub-theme folders (../gallery2/themes/matrix/ and /matrix/images).
However after each of these it doesn't load on the site.
I even used a working favicon.ico that I know works (in case mine was corrupted on creation. I used http://en.wikipedia.org/favicon.ico) in all of these locations but it still won't load in FF and IE.
Can someone please help? I'm not sure if I have to edit some PHP file to say where the icon is located.
Running on my Mythbuntu site. Other MythTV sites have favicons (MythWeb, TorrentFlux etc.) so it's nothing to do with how PHP/Apache2 is set up (I would assume).
Everything runs on port 80.


Gallery version (not just "2"): 2.3
PHP version (e.g. 5.1.6): 5.2.6-3ubuntu4.2
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33): Apache/2.2.11
Database (e.g. MySql 5.0.32): MySQL (latest version. Not sure what that is).
Activated toolkits (e.g. NetPbm, GD): NetPbm, Gd, ImageMajick (all of them that came with the Gallery 2.3 full install)
Operating system (e.g. Linux): Mythbuntu 9.04
Browser (e.g. Firefox 2.0): FF 3.5.3 / IE 7/8

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22892
Posted: Wed, 2009-09-30 02:46

From the wikipedia page:
Most web browsers do not require any HTML to retrieve a favicon that conforms to the de facto file name and type (favicon.ico) located in the web site's docroot. If no favicon link is detected upon HTML page load completion and no previous site visits are recorded in the browser's history, a favicon.ico is requested automatically

So you should be able to place the image in the puplic_html direcotry.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Simpsoid

Joined: 2009-09-30
Posts: 4
Posted: Wed, 2009-09-30 03:42

But where the public_html located?
My gallery2 website is at /usr/shares/gallery2/.
I use the gallery2.conf file in the apache2 directory to point to it.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22892
Posted: Wed, 2009-09-30 03:54
Quote:
But where the public_html located?

You should know that or your host should know.
where is the 'home page' located?

Remember, every host is different. Yours is quite likely to have a completely different set of folders. It might even have none.
The document root is the "www" directory, but of course your host may well use a different folder. Some of the more common alternatives are:

* htdocs
* httpdocs
* html
* public_html
* web

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Simpsoid

Joined: 2009-09-30
Posts: 4
Posted: Wed, 2009-09-30 23:02

Well it's my site on my MythTV box.
It would seem that the document root is /var/www/ as I created some symbolic links there to the gallery website (and MythTV had it set so the MythWeb site was symbolic linked from there too).
Following that /var/www/gallery2 link obviously goes to my /usr/share/gallery2 folder like I mentioned.
And that is where I have already put the favicon.ico.
The other websites each have their own icon (as I want them too).
I just want Gallery to have it's own.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22892
Posted: Thu, 2009-10-01 00:30
Quote:
I just want Gallery to have it's own.

Then i think you have to edit the theme you are using theme.tpl
add
<link rel="SHORTCUT ICON" href="/somepath/myicon.ico"/> to the <head> section of the page.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Simpsoid

Joined: 2009-09-30
Posts: 4
Posted: Thu, 2009-10-01 02:28

Hi floridave,

Thanks for all your help with my troubles.
I got it sorted. I know I didn't reinvent the wheel with my revelations but hopefully I'll clarify some stuff with others that run into this.
Just to confirm with others that may have these troubles here's what I did:

1) Made a favicon.ico and put it in the root of my gallery2 directory (/usr/share/gallery2/).
2) Went to the particular theme folder that I'm using (/usr/share/gallery2/themes/matrix/templates/).
3) Edited the theme.tpl file (/usr/share/gallery2/themes/matrix/templates/theme.tpl).
4) Added the following 2 lines (one for XHTML browsers and the other for IE browsers) in between the <head> and </head> sections:
a) <link rel="SHORTCUT ICON" href="http://****.net/gallery2/favicon.ico"/> - this is for IE.
b) <link rel="icon" type="image/vnd.microsoft.icon" href="http://***.net/gallery2/favicon.ico"/> - this was for FF.
5) Saved the file.

Unfortunately this will need to be done for each theme that your gallery2 site uses (I forced my site to only use Matrix and not allow users to change it).

Once again thanks to floridave for these suggestions.
You can also check out the Wikipedia article on favicon's for the proper format to enter in: http://en.wikipedia.org/wiki/Favicon

- Simpsoid