PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Stylee
New Member
New Member


Joined: Aug 15, 2003
Posts: 18

PostPosted: Tue Oct 21, 2003 1:32 pm Reply with quote Back to top

I am looking for information on how to add an icon to the address bar of my site.
(the little image that sits to the left of the URL on some websites)

I believe that this is the code
Code:
<LINK REL="SHORTCUT ICON"
<ahref="http://yoururl.com/youricon.ico">


I just do not know what file to put it in.
I tried the /includes/meta.php file, but this does not seem to be correct.

Thanx in advance.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Oct 21, 2003 5:51 pm Reply with quote Back to top

Here is something I picked up along the way. Don't know who to give the credit to. It's not anything proprietary so it's public domain anyway. If you use method two, which you are, try placing it in the header.php file or the includes/my_header.php file.

Quote:
============================================================
Script: Adding An Icon With Your URL - Two Methods

Functions: Whenever anyone bookmarks your site, an icon
will subsequently show up on their Favorites
list. When your site is visited, the icon
will also show in the URL box of the browser.

Browsers: IE5 and Later (ignored by other browsers)

Author: etLux - after Microsoft
============================================================

===========
Method One
===========

Select any standard Windows icon file. The .ico file *must*
be in standard Windows icon file format, or it will be
ignored.

Rename the icon file *exactly* to: favicon.ico -- all
lowercase. No deviation from this is allowed.

Place the favicon.ico file in the 'root' directory on your
web server (where your main index page is).

Whenever your site is bookmarked, the icon will subsequently
show up on the visitor's Favorites list. When they visit
your site, the icon will also show in the URL window of the
browser.

That's all there is to it -- it's automatically picked up by
IE5 and later browsers.

===========
Method Two
===========

Insert the following LINK tag in the <head>...</head> of
your pages.

<LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">

Change the path and icon filename to correspond to the
location of the icon file on your site. The icon graphic
filename should be lowercase, no more than eight characters,
and the extension must be .ico.

As above, the file *must* be in standard Windows icon file
format or it will be ignored.

When you use this method as opposed to Method One above, the
LINK REL code should appear on any page that might be
bookmarked.

Don't forget to confirm that the icon file is actually where
you say it is in the LINK REL path!

==================================
More Information - Creating Icons
==================================

The following is an exact quote from Microsoft®:

"For Internet Explorer 5, the required size of a shortcut
icon is 16x16 pixels. To create the icon, use an icon
editor, such as the one included in Microsoft® Visual
Studio® or one of the many other icon editors available.
Regardless of the program you use, make sure you set the
editor to create an icon that is 16x16 pixels. Otherwise,
the icon will be ignored by Internet Explorer."

================
Troubleshooting
================

We've noticed occasionally quirky behavior with this IE5
feature on several systems.

In many cases the icon will not appear on your machine until
*after* you perform the following steps:

- close *all* programs but the browser
- navigate to a neutral site, off your own url
- remove any and all bookmarks (favorites) to your
site that you may currently have
- clear the History and the Cache of the browser
- reboot, clear the Recycle Bin
- reboot again, bookmark your site
- reboot [sigh] again...

============================================================
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Stylee
New Member
New Member


Joined: Aug 15, 2003
Posts: 18

PostPosted: Tue Oct 21, 2003 9:29 pm Reply with quote Back to top

Thank you very much! Very Happy
View user's profile Send private message
sqzdog
Involved
Involved


Joined: Sep 22, 2003
Posts: 252

PostPosted: Wed Oct 22, 2003 8:23 pm Reply with quote Back to top

Hey, this was a great idea! Thanks so much!
View user's profile Send private message Send e-mail
blith
Client


Joined: Jul 18, 2003
Posts: 977

PostPosted: Thu Oct 23, 2003 1:54 pm Reply with quote Back to top

Raven I added the code exactly as you have it except for changing it my stuff ofcourse and I received the following
Code:
Parse error: parse error in /home/gamers/public_html/includes/my_header.php on line 23
can you help me out with this? thanks
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Oct 23, 2003 1:58 pm Reply with quote Back to top

This is NOT my code. I just responded to the original post. This line of code should not produce any errors though, if that's what you used
Code:
<LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
blith
Client


Joined: Jul 18, 2003
Posts: 977

PostPosted: Thu Oct 23, 2003 2:01 pm Reply with quote Back to top

right not your code... Very Happy I added this in the includes/my_header.php before the closing. The only thing different is that mine is named favicon.ico Is this a problem?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Oct 23, 2003 2:05 pm Reply with quote Back to top

That is correct. If you are sending it as PHP code, then remember you have to echo it.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
blith
Client


Joined: Jul 18, 2003
Posts: 977

PostPosted: Thu Oct 23, 2003 2:07 pm Reply with quote Back to top

thank you Raven. I found my problem Embarassed my .ico file was not really an .ico file. It was a .jpg file masquerading... as one Embarassed
View user's profile Send private message Visit poster's website
Stylee
New Member
New Member


Joined: Aug 15, 2003
Posts: 18

PostPosted: Thu Oct 23, 2003 2:43 pm Reply with quote Back to top

Raven wrote:
That is correct. If you are sending it as PHP code, then remember you have to echo it.


lol, ok, I got mine working with the provided code on the 1st try...YAY!
But now I read something about Echoing....do I need to do that, and if so, what should I add to the code.
View user's profile Send private message
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Tue Nov 11, 2003 1:21 am Reply with quote Back to top

Or you could just put the file 'favicon.ico' file in your theme/images directory as this code from header.php says it will look for it.

Code:
if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
   echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum