Forums / Templates, Stylesheets, Page Layout / Alternate Favicon for the Admin?

Alternate Favicon for the Admin?

Views: 615

Results 1 to 6 of 6
28 Jun 2015, 8:12 PM
#1
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Alternate Favicon for the Admin?

Hi!

Is there a way to provide an alternate favicon for Admin pages?

I often have a zillion tabs open, looking for a quick way to distinguish between tabs containing site pages and tabs containing Admin pages.

My guess is I could provide an alternate favicon path in the admin index somehow? Or maybe I could simply drop a dif favicon into the folder where the admin index lives (so I didn't have to alter any core)?

Dunno. Anybody done this?

Thanks!

28 Jun 2015, 8:31 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Alternate Favicon for the Admin?

What you're requesting is "difficult" because of the way that the admin-level tools/pages work. Each page/tool controls its own <head> information, so there would need to be a way to inject that updated favicon's name into all.

29 Jun 2015, 4:03 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Alternate Favicon for the Admin?

Exactly. lat9 is right. It's ugly:
You'd need to edit (nearly) all of your /admin/*.php files (but not likely the files in any admin subdirs) and search for this:

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

and add this on a new line below it:

<link rel="icon" href="admin_favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="admin_favicon.ico" type="image/x-icon" />

... or some variation of that.
Remember, every browser handles favicons with its own quirks, so you might need to flush cache, make bookmarks, delete history for old admin pages in your browser history, and experiment with various .ico file formats.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jun 2015, 4:17 PM
#4
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Alternate Favicon for the Admin?

Yuck, what a pain.

As convenient as it would be, looks like it's not worth the effort.

If I end up doing it, I'll come back and list off the steps and files to edit.

Thanks for the input you guys!

29 Jun 2015, 4:31 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Alternate Favicon for the Admin?

FYI, it'll be a breeze in v160 ... as we've already centralized that part of the code. (Introduced here: https://github.com/zencart/zencart/commit/cf7d123f97201ace31ef35f04c695feef6af70f4 )

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jun 2015, 5:27 PM
#6
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Alternate Favicon for the Admin?

sweeeet