This topic is locked
[SOLVED]

 favicon.png Web Page Icon

1/3/2019 11:14:34 AM
PHPRunner General questions
A
aalekizoglou author

Clearly put where should we insert the


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


in order to specify the icon display on the web browser tab?
In previous version I used to modify templates/layout pages to add it but this is NOT upgrade safe


<head>

<meta http-equiv="X-UA-Compatible" content="IE=Edge">

<title>{$pagetitle}</title>

....

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

</head>
Admin 1/3/2019

You can just place file named favicon.ico in the root folder of your website and there is no need to specify anything in HTML.

A
aalekizoglou author 1/3/2019



You can just place file named favicon.ico in the root folder of your website and there is no need to specify anything in HTML.


Thank you Sergey, but there are times I need to put two or more applications under the same web root inside different folders for a single client. So in that case the favicon might be different and putting it inside the app folder does not work. That is why I use <link rel...> in <head> section, which means i need to alter the template pages. Is there any other way I can accomplish this?

HJB 1/3/2019



Thank you Sergey, but there are times I need to put two or more applications under the same web root inside different folders for a single client. So in that case the favicon might be different and putting it inside the app folder does not work. That is why I use <link rel...> in <head> section, which means i need to alter the template pages. Is there any other way I can accomplish this?


<script>

//to change out default site Favicon

var anchors = document.querySelectorAll('link[href*="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=86706&image=1&table=forumreplies"]';);

Array.prototype.forEach.call(anchors, function (element, index) {

element.href = "https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=86706&image=2&table=forumreplies";;

});

</script>
A
aalekizoglou author 1/4/2019


<script>

//to change out default site Favicon

var anchors = document.querySelectorAll('link[href*="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=86709&image=1&table=forumreplies"]';);

Array.prototype.forEach.call(anchors, function (element, index) {

element.href = "https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=86709&image=2&table=forumreplies";;

});

</script>



Thank you,
I am currently using this


$(window).load(function () {

$('head').append('<link href="path_to_my_favicon/favicon.ico" rel="shortcut icon" type="image/x-icon" />');

});