Favicons

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Favicons

Harvey
Would it be possible to add functionality to the CMS that allows us to upload our own favicons?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

Pedro
Hi,
since your app is embedded, you have to put the favicon code in the head tag of the main site.

If you want  to change the app's favicon, you have to edit the html macro. Just add this code, line 4:
<override_macro name="html" parameters="head,body">
    <n.html_impl>
        <head>
            <link rel="shortcut icon" href="http://yourIcon.jpg" type="image/x-icon" />
            <n.head/>
        </head>
        <body>
            <n.top_bar/>
            <n.body/>
            <n.nabble_footer/>
        </body>
    </n.html_impl>
</override_macro> 
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

Harvey
Pedro - so the current line 4 would come after this code?

On Wed, May 30, 2012 at 2:46 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
Hi,
since your app is embedded, you have to put the favicon code in the head tag of the main site.

If you want  to change the app's favicon, you have to edit the html macro. Just add this code, line 4:
<override_macro name="html" parameters="head,body">
    <n.html_impl>
        <head>
            <link rel="shortcut icon" href="http://yourIcon.jpg" type="image/x-icon" />
            <n.head/>
        </head>
        <body>
            <n.top_bar/>
            <n.body/>
            <n.nabble_footer/>
        </body>
    </n.html_impl>
</override_macro> 



If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/Favicons-tp7579941p7580031.html
To unsubscribe from Favicons, click here.
NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: www.NYSkiBlog.com
NY Ski Forum: forum.NYSkiBlog.com
NY Ski Magazine: mag.NYSkiBlog.com
NY Ski Directory: directory.NYSkiBlog.com

HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

Pedro
This is your default html macro code:
<macro name="html" parameters="head,body">
    <n.html_impl>
        <head>
            <n.head/>
        </head>
        <body>
            <n.top_bar/>
            <n.body/>
            <n.nabble_footer/>
        </body>
    </n.html_impl>
</macro>
  So, you have to edit this macro adding that line. The final code will be like this:
<override_macro name="html" parameters="head,body">
    <n.html_impl>
        <head>
            <link rel="shortcut icon" href="http://yourIcon.jpg" type="image/x-icon" />
            <n.head/>
        </head>
        <body>
            <n.top_bar/>
            <n.body/>
            <n.nabble_footer/>
        </body>
    </n.html_impl>
</override_macro> 
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

mark
In reply to this post by Pedro
Awesome! It worked great. Just find the macro called html and put that line of code in (I left the domain out).
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

mark
After further analysis, it's working great on my desktop with Firefox (except Firefox still hasn't updated it from the cached one in my bookmarks toolbar). It's not working on Chromium, though (Chromium is a lot like Google Chrome). It's only partially working on my Kindle Fire's Silk browser (only the very main page has the favicon for it).

I notice there are no html5 macros. So, I don't know how to follow GregChapman's post about it, which says to add a line of code to the macro called html5_impl.
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

GregChapman
This post was updated on .
It looks as if the various Nabble servers are set up differently.

Yours is set up the same way as Nabble Support:

Macro Search

But GregHelp looks like this:

Macro Search
Note the difference in source files. I'll edit my article on the subject accordingly.

Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

mark
This post was updated on .
Okay, I figured out how to fix it. It wasn't Nabble's fault! :) I just needed to make an ico file with multiple sizes packed into it. I was using an svg (which I guess works with Firefox's tabs, but not all other browsers).

I used Rob W.'s answer here: https://superuser.com/questions/491180/how-do-i-embed-multiple-sizes-in-an-ico-file

And Matt's answer here: https://stackoverflow.com/questions/4014823/does-a-favicon-have-to-be-32x32-or-16x16

And made the following bash script on Xubuntu Linux from that to get the appropriate ico from my svg:

#!/bin/bash
for size in 16 24 32 48 57 60 64 70 72 76 96 114 120 128 144 150 152 196 256 310; do
    inkscape -z -e $size.png -w $size -h $size mySvgFile.svg >/dev/null 2>/dev/null
done
convert 16.png 24.png 32.png 48.png 57.png 60.png 64.png 70.png 72.png 76.png 96.png 114.png 120.png 128.png 144.png 150.png 152.png 196.png 256.png 310.png -colors 256 icon.ico

I also changed the rel attribute in the link tag in my macro from "shortcut icon" to just "icon".

So, now it shows up on my Kindle Fire, and my Firefox bookmark's toolbar even updated it after a minute or so.

It works on Chromium, too, but the background isn't transparent there for some reason. It is transparent on Firefox, but it's not on my Kindle Fire. Close enough, for now, but hopefully I'll figure out how to fix that.

Edit: I tried adding -y 0.0 to the inkscape call, but it's still not transparent on Chromium and my Kindle Fire. Alas. I also added an additional size, which I saw someone using: 180x180.

This tool may be insightful: https://realfavicongenerator.net/

Edit: I decided just to use a different image that looks less strange without a transparent background.
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

GregChapman
It's never occurred to me to try anything other than .ico files for favicon files.

GIMP makes it easy to create multi-layered images with, if required, an utterly different icon for different resolutions and save them as .ico files.

I have forums on the following Nabble servers. n3, n4, n5, n6, n7, n8 and x6. Of these only n8 matches your forum.

It seems that Nabble Support and the n2 server also match your forum (You learn a little something every day! )
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Favicons

mark
Heh, heh. Another forum I use is n2 (so that I explains why I didn't see a different macro setup there either when I looked!)