Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Easy install of favicon.ico for Postnuke
  • Posted: 31.05.2005, 21:37
     
    Gericht
    rank:
    Helper Helper
    registered:
     May 2002
    Status:
    offline
    last visit:
    13.10.06
    Posts:
    274
    I recognize that Mozilla browsers have made it infinitely easier and more dynamic for using the favicons, but not everyone uses a Mozilla browser (yet :) )

    In the meantime, here's a simple solution to getting your favicon up there.

    Please note that the standard way of using a favicon is to just put it in your site's root folder and hope for the best, but browsers don't necessarily notice it's there.

    In your PN root folder (ie, yoursite.com/html/) upload the favicon.ico file (to make one: create a 16x 16 px file, save it as a gif and then rename it to favicon.ico - simple? simple.)

    In your header.php file (ie, yoursite.com/html/header.php) find the lines:

    Code

    echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
        echo "<html>\n<head>\n";


    They should be on lines 85 - 86 (on PN 7.50)

    and replace with:

    Code

    echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
            echo "<html>\n<head>\n<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\" />\n ";



    A Few Things:

    1) This was done for PN 7.50; there's no reason it shouldn't work on other versions as it's only HTML code, but who knows?

    2) This will keep the same favicon regardless of your theme because it's written into the header that is called by all themes.

    Enjoy :)

    --
    the china diaries
  • Posted: 01.06.2005, 00:09
     
    alarconcepts
    rank:
    Professional Professional
    registered:
     April 2004
    Status:
    offline
    last visit:
    21.01.08
    Posts:
    2723
    Just a quick addition...

    The way favicon works in say IE for instance, is that you include favicon.ico in the root of your site. The favicon will ONLY display if they bookmark/favoritize your page.

    --
    Photography | PHP | Other
  • Posted: 11.04.2006, 00:54
     
    lehaug
    rank:
    Registered User Registered User
    registered:
     April 2006
    Status:
    offline
    last visit:
    03.04.06
    Posts:
    1
    so, anyone knows how to do this on .761? the header.php is kindof reduced, so no lines to edit..
  • Posted: 11.04.2006, 00:59
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    09.11.08
    Posts:
    13413
    modules/Header_Footer/pntemplates

    contains the templates for the header for non-Xanthia themes. In Xanthia themes, you modify the theme's templates in themes/yourtheme/templates/

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide
  • Posted: 11.04.2006, 08:29
     
    Slugger
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    13.08.06
    Posts:
    1185
    Assuming your favicon is named "favicon.ico, add the following between and

    Code

    <link rel="shortcut icon" href="<!--[$imagepath]-->/favicon.ico" />
    Plenty of info. Just Google.

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula