Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

favicon

lukoielukoie New
edited June 2010 in Vanilla 2.0 - 2.8
how come that favicon.PNG link is mentioned just in the class/php files?
i can see the way you implemented it - instead of coding every time in the theme file, you just put favicon in the folder and its done, but what if i want to use animated favicon?
is it not better way to let favicon.ICO to be found in the theme root folder along with the png file, or something like that? and if its there - just use it instead of favicon.png?
anyway, i need to use ICO, but i think its not a good idea to edit core files for that!

Comments

  • TimTim Operations Vanilla Staff
    edited June 2010
    Hi @lukoie,

    You can simply change the favicon in the config file.
    The code in class.controller.php looks like this:
    // Add the favicon
    $this->Head->SetFavIcon(C('Garden.FavIcon', Asset('themes/'.$this->Theme.'/design/favicon.png')));
    That means: "Try to get the path to the favicon from the config variable 'Garden.FavIcon', but if that can't be found, just use 'themes/'.$this->Theme.'/design/favicon.png'."

    So if you want to use your own favicon, just set the Garden.FavIcon config variable... something like:

    $Configuration['Garden']['FavIcon'] = 'themes/lukoie/design/favicon.ico';

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • TimTim Operations Vanilla Staff
    Forgot to mention: do this change in your conf/config.php, not conf/config-defaults.php

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • lukoielukoie New
    edited June 2010
    thanx a lot
    is it undocumented feature then?

    @Tim, could you please react on my post here: http://vanillaforums.org/discussion/11248/localization-team/#Item_7
  • TimTim Operations Vanilla Staff
    It is undocumented insofar as there is no specific help tutorial on "How to change your favicon" but since this is an open source project, all those functions are available to your for review. If you see C() or Gdn::Config(), it means we're checking the config file.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • oliverraduneroliverraduner Contributing to Vanilla since 2010 Switzerland ✭✭
    edited June 2010
    @Tim It would be nice, if one can access/extend the Head inside the Theme using
    $this->Head->...
    However, I did not yet got something similiar working. Is there a special "tweak" to use when you want to modify the HeadModule inside a Theme view?

    Here's an example: I wanted to add the apple-touch-icon tag to the Header of my page. I tried first using
    $this->Head->AddTag(...)
    But because this did not work (error), I ended up adding the code manually before the following render-command was called in default.master.php of my theme:
    $this->RenderAsset('Head');
    ?
  • @Tim, why do you have a wiki then?
    why not add those "undocumented" features as the article, "config file features" or something?
    why not giving us full list of possible strings in the config-sample file?
  • TimTim Operations Vanilla Staff
    edited June 2010
    It would be pretty cool if we had unlimited time to implement all the features and perfectly document everything we do and still release code sometime this century, unfortunately our Quantum Levitating Supercooled Plasmadrive Time Machine© is presently in the shop for repairs.

    image

    As a result of this terrible catastrophe, we're having to make hard choices about where we spend our limited amount of development time. The current primary goal is to get Vanilla 2 STABLE released, with as few bugs as possible (for you!), at which point we will have some breathing room to work on new themes, better documentation, some of your feature requests, etc.

    On the other hand, if you really feel that strongly about the state of our documentation right now, you could always help out and contribute!

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • lukoielukoie New
    edited June 2010
    @Tim THATS what i've been asking for a long time, mate
    yes, i would like to contribute, but how am i suppose to do that?
    firs of all i've been asking for a localization team
    i'd like not to spread my time to localize my forum separately, and someone localizes their, but to coordinate our work
    at the moment localization of vanilla is not efficient enough. i'd say not at all.
    as for documentation you could at least describe in the wiki itseft who could edit it, and how that permissions are granted.
    first of all 'd like to work around localization, and then to write that all in the wiki.
  • @Tim
    would be also great to have "Theming" category please
  • @lukoie, stupid question here, since I've not looked into it at all, but could you not collaboratively work on localization using GitHub? Just fork off Vanilla2 and start creating your localization and then when you're happy for it to be included, send the main fork a pull request?
  • ; )
    its not the easiest way to do. look at this project: http://translate.dokuwiki.org/
    this is the best way to collaboratively translate applications.

    but now we've came that a lot of string cannot be translated
    and even translated ones are not rendered correct on the actual forum.
    so basically better to wait for release date, and then do something, as they suggested
  • I would like to throw my vote in on this subject.

    The favicon, to me, is a theme item. Shouldn't this be something is set by theme, not by site configuration? I'd like to see this moved to theme powered, not site powered.
  • This method only seems to show the favicon at the root domain. If I go even a page deep, no favicon shows up at all (and I did make the change in conf/config.php.) URL: http://social.kingraven.com. Can someone tell me what change I need to make so my favicon shows up on all pages?
    Hi @lukoie,

    You can simply change the favicon in the config file.
    The code in class.controller.php looks like this:
    // Add the favicon
    $this->Head->SetFavIcon(C('Garden.FavIcon', Asset('themes/'.$this->Theme.'/design/favicon.png')));
    That means: "Try to get the path to the favicon from the config variable 'Garden.FavIcon', but if that can't be found, just use 'themes/'.$this->Theme.'/design/favicon.png'."

    So if you want to use your own favicon, just set the Garden.FavIcon config variable... something like:

    $Configuration['Garden']['FavIcon'] = 'themes/lukoie/design/favicon.ico';
  • LincLinc Detroit Admin
    There should be a preceding slash in the configuation value. '/themes/...' not 'themes/...'
  • Nothing works for me. I uploaded my favicon.ico file and renamed it favicon.png. I DELETED all the ones that came with it. And the default one still shows up even though it no longer exists on the server!

    Then I tried making all the code changes that were suggested here - and none of that helped either.

    I've even checked it in a different browser that I had never looked at the site with until after making these changes and the default one shows up there too!

    How in the world could it keep showing up if I've deleted every instance of it that I could find?

  • @jcncnc said:
    Nothing works for me. I uploaded my favicon.ico file and renamed it favicon.png. I DELETED all the ones that came with it. And the default one still shows up even though it no longer exists on the server!

    Then I tried making all the code changes that were suggested here - and none of that helped either.

    I've even checked it in a different browser that I had never looked at the site with until after making these changes and the default one shows up there too!

    How in the world could it keep showing up if I've deleted every instance of it that I could find?

    @jcncnc

    try this in your duplicated question

    http://vanillaforums.org/discussion/comment/200344/#Comment_200344

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.