Changing the default favicon

Use this board to ask questions or have discussions with other Rich Displays users.
LauraG
New User
Posts: 3
Joined: Mon Nov 05, 2012 10:53 am
First Name: Laura
Last Name: Gardiner
Company Name: Cigna
Contact:

Changing the default favicon

Post by LauraG »

We would like to change the default profound ui shortcut favicon to our own one, is there any way to do this?

Thanks for your help
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Changing the default favicon

Post by David »

Yes. The best way is to specify this with a link tag in the "start.html" page, like this:

Code: Select all


<link rel="shortcut icon" href="/yourpath/yourfile.ico" />

Profound UI adds a default icon by shipping a "favicon.ico" in the HTTP server document root, but you won't want to replace this, as it will get overwritten on each update to the product.
LauraG
New User
Posts: 3
Joined: Mon Nov 05, 2012 10:53 am
First Name: Laura
Last Name: Gardiner
Company Name: Cigna
Contact:

Re: Changing the default favicon

Post by LauraG »

Thanks, that worked perfectly.
Bruno97
Profound User
Posts: 61
Joined: Wed Jul 16, 2014 8:35 am
First Name: BRUNO
Last Name: HAJJAR
Company Name: APLUS INFORMATIQUE
Phone: 0664771058
Address 1: 9 AVENUE HENRI MATISSE
Address 2: IMMEUBLE MATISSE
City: NICE
Zip / Postal Code: 06200
Country: France
Contact:

Re: Changing the default favicon

Post by Bruno97 »

Hi,

Actually, it does not work in Atrium.
Customizing the start.html file makes the customized favicon appear only when a Rich Display File is open in a new browser tab (outside the Atrium context).

Does it work the same way with you ?

Bruno
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Changing the default favicon

Post by Scott Klement »

Right, not everyone uses Atrium. The original question was not about how to do this in Atrium, it was about the Rich Display module... (Which at the time was confusingly called "Profound UI" -- the same name as the suite of products.)
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Changing the default favicon

Post by Scott Klement »

If you did want to change the default favicon within Atrium only (and not other Profound UI pages) you could do so by adding some JavaScript that runs when the Atrium menu screen has loaded. You can do that by declaring an Atrium.onload function in a JavaScript file. If you place the JavaScript file in the /www/YOUR-INSTANCE/htdocs/profoundui/userdata/extension/atrium directory of the IFS, Atrium will run it automatically.

For example, I created a file named "scott.js" and put it in the /www/profoundui/htdocs/profoundui/userdata/extension/atrium directory, containing the following code:

Code: Select all

Atrium.onload = function() {
   var oldIcon = document.getElementById("atrium-favicon");
   if (oldIcon) {
     document.head.removeChild(oldIcon);
   }
   var newIcon = document.createElement("link");
   newIcon.id = "atrium-favicon";
   newIcon.rel = "shortcut icon";
   newIcon.href = "/scott.ico";
   document.head.appendChild(newIcon);
}
When this runs, it changes the icon to "scott.ico". So, whenever the Atrium menu page is displayed, I get "scott.ico" instead of the default (which is /favicon.ico)
Bruno97
Profound User
Posts: 61
Joined: Wed Jul 16, 2014 8:35 am
First Name: BRUNO
Last Name: HAJJAR
Company Name: APLUS INFORMATIQUE
Phone: 0664771058
Address 1: 9 AVENUE HENRI MATISSE
Address 2: IMMEUBLE MATISSE
City: NICE
Zip / Postal Code: 06200
Country: France
Contact:

Re: Changing the default favicon

Post by Bruno97 »

Thanks a ton Scott !

It works very well. However, I can see the Profound icon (during the load of the "Atrium Web Portal Sign On" page) at first and then it's replaced in a blink of an eye by mine.

Bruno
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Changing the default favicon

Post by Scott Klement »

The Atrium login page is an HTML file that you can change (to use the <link> tag as discussed earlier in this thread.) You can change it here:
/www/YOUR-INSTANCE/htdocs/profoundui/userdata/html/atrium_login.html

The other technique (with Atrium.onload) was for the menu screen (which doesn't have an HTML file that you can edit.)
Bruno97
Profound User
Posts: 61
Joined: Wed Jul 16, 2014 8:35 am
First Name: BRUNO
Last Name: HAJJAR
Company Name: APLUS INFORMATIQUE
Phone: 0664771058
Address 1: 9 AVENUE HENRI MATISSE
Address 2: IMMEUBLE MATISSE
City: NICE
Zip / Postal Code: 06200
Country: France
Contact:

Re: Changing the default favicon

Post by Bruno97 »

Scott,

That's exactly what I have done.
But I still first see my icon, then the Profound Logic's, then mine again.
I must say I am at home right now on a remote PC connection, which surely slows down things enough... to let me see what I would probably not see if I was at the office.
I will see tomorrow...

Bruno
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Changing the default favicon

Post by Scott Klement »

Oh, I see.. because the default one will show until the onload() code runs.

Well, you could always replace /www/YOUR-INSTANCE/htdocs/favicon.ico with your icon...
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest