Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
pdoobepd
Worker
Worker



Joined: May 07, 2005
Posts: 129

PostPosted: Thu Jun 02, 2005 9:33 am Reply with quote

I used to have an Icon like you do on this site for my site before switching to Nuke...I have been looking for the "where to put the info. I am guessing it's in the header but either I'm really Bleary eyed or just plain Blind ? Smack

How Do I get .ico to Show in Address Bar & Top tabs in Browser like above on your site ?
 
View user's profile Send private message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Jun 02, 2005 12:34 pm Reply with quote

I my header.php is the code:
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";
    }


and the favicon.ico is in the folder:

themes/DeepBlue/images/favicon.ico


I use irfan view it´s a great tool for icons also Laughing

Download:

http://irfanview.tuwien.ac.at/
 
View user's profile Send private message
rickleigh
Worker
Worker



Joined: Jan 06, 2009
Posts: 183

PostPosted: Mon Apr 13, 2009 1:12 pm Reply with quote

I have a weird issue with the favicon. I transferred ownership of a domain that used to be my primary. Now I have switched the primary to a different one. I went through the nuke config and changed the domain everywhere I can think of to the new one.

The transfer to the new owner was completed lastnight and now when I open my site in firefox the favicon shows the new domain owner's favicon next to my url when you go to my site. I'm at work which uses the old IE Sad still so I had someone else test IE and they tell me that they see the correct icon on their screen. So, it looks like firefox is the only one having this issue of some how picking up the new domain owner's icon.

What puzzles me is that all my other content on my site is showing up correctly. What the heck would make the icon change if I don't even have the guys favicon file in my Dir?

_________________
Thanks,
Rick Leigh 
View user's profile Send private message
horrorcode
Involved
Involved



Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Mon Apr 13, 2009 3:40 pm Reply with quote

Do you have your favicon in the themes/your_theme/images folder?

Not sure it matters but I have mine there and also in mysite/root as well as theme/theme/

It could be a cache issue, maybe delete temp files?
 
View user's profile Send private message
rickleigh







PostPosted: Mon Apr 13, 2009 3:57 pm Reply with quote

horrorcode,

Thanks for the reply,

I found what it was, I had the following code in my header.php
Code:
echo '<link rel="shortcut icon" HREF="http://www.mysite.com/favicon.ico" type="image/x-icon">'."\n";


It was still set to the old domain.

Thank you for your ideas though Wink
 
bluerace
Regular
Regular



Joined: Apr 04, 2009
Posts: 85
Location: Behind you

PostPosted: Mon Apr 13, 2009 4:09 pm Reply with quote

As long as you have your own favicon in your theme folder (target folder), no problem at all.

For IE, it keeps heavy caches in your local machine. Therefore, try to clean out all caches from "Internet Option --> Delete All."

I experience this from time to time because always I move the folder for my developments.

By the way, for your favicon, most phpnuke employes the following code which is not recommended:

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";
   }


This code is found in your <nuke-root>/header.php
Unfortunately, it might be wrong. Why?
reason 1: when you move, add, or delete your themes, your favicon will be gone together.
reason 2: to change your favicon, you should copy the same favicon to every theme/images folders. Think about you are running 20 mulitple themes in your site? It sounds like stupid.

So, the best place to save favicon and to read in your header.php, In my opinion, it is <nuke-root>/images/ folder.

For instance, make favicon folder under that directory as follows:

<nuke-root>/images/favicon

then change the code slightly.

Code:


   if (file_exists("images/favicons/YOUR-favicon.ico")) {
      echo "<link REL=\"shortcut icon\" HREF=\"images/favicons/YOUR-favicon.ico\" TYPE=\"image/x-icon\">\n";
   }


From this, you will make multiple favicons and you may change this code while inserting random display and selection. Then, your site will may have random favicons. But this is really bad trick because you know what the primary purpose of favicon.

Oh, by the way, handy favicon editor in web is here. You don't have to use indenpendently running favicon editor in your local machines.

http://www.rw-designer.com/online_icon_maker.php

http://www.favicon.cc/

the second one is my favorite.

_________________
Make stupid PHP-NUKE Smart, that's my favorite chore in Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
horrorcode







PostPosted: Mon Apr 13, 2009 6:53 pm Reply with quote

I agree with alot of that, but, I like being able to have multiple favicons, one for each theme Smile

Better yet, we can satisfy both parties:

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";
      } elseif (file_exists('images/favicons/favicon.ico')) {
            echo '<link rel="shortcut icon" href="images/favicons/favicon.ico" type="image/x-icon" />', "\n";
      }

Edit: changed elseif to else...and back again..cant be else

So if its in the themes folder, display it, if not look for it in the images/favicon folder...
 
bluerace







PostPosted: Mon Apr 13, 2009 8:24 pm Reply with quote

That's what I expected you to do.
 
horrorcode







PostPosted: Mon Apr 13, 2009 8:52 pm Reply with quote

I must admit, you did give me the idea Smile

What do you think about it though, is it worth the time to look for both?
 
bluerace







PostPosted: Mon Apr 13, 2009 9:06 pm Reply with quote

Absolutely, that is worth!
Actually, I had used my favicon in that way.

80
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©