Custom favicon

20 views
Skip to first unread message

Dmitry Klimkin

unread,
Nov 23, 2013, 9:33:44 AM11/23/13
to koala-fra...@googlegroups.com
Hi Niko,


I saw a config setting in kwf-lib:

ext.faviconFx = adminIcon

; ext.favicon = false ; custom favicon for ext based (backend) pages

kwc.favicon = /assets/web/images/favicon.ico

I put favicon.ico file into root of the app and into /images/ folder of the app and tried to play around it but could not set custom favicon.  But your kwf-newsletter-demo app somehow sets it correctly.

Is it possible to set custom favicon?

Thanks.

Niko Sams

unread,
Nov 23, 2013, 1:08:49 PM11/23/13
to Koala Framework Dev
hi,

faviconFx = adminIcon creates a modified favicon based on kwc.favicon
by coloring it red. We use it to easily distinguish between frontend
and backend.
But you can also manually set a backend favicon by using ext.favicon setting.
And as you only have a backend that is what you probably should use.

this aminIcon coloring doesn't probably work correctly for you as it
needs some special imagick methods...

Niko
> --
> You received this message because you are subscribed to the Google Groups
> "Koala Framework Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to koala-framework...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Artyom M

unread,
Oct 30, 2014, 11:15:20 PM10/30/14
to koala-fra...@googlegroups.com
A add this line to my config:
ext.favicon = favicon.ico

favicon in root folder.

also wrote:
ext.favicon = /images/favicon.ico

In my master.tpl I see $this->favicon value and it correct.
But favicon not shown (clear-cache in KWF and clear all in browser).

How to fix? 

Artyom M

unread,
Oct 31, 2014, 12:47:43 AM10/31/14
to koala-fra...@googlegroups.com
By default this->favicon has value: 
/assets/fx_adminIcon/web/images/favicon.ico

I tried to create a directories on this path and put favicon there - nothing happens.

p.s. Kwf-app-demo also not showing favicon, only kwf-cms-demo do it.

Niko Sams

unread,
Oct 31, 2014, 12:04:08 PM10/31/14
to Koala Framework Dev
correct path would be:
/assets/web/images/favicon.ico

*all* requests go to bootstrap.php, none access the filesystem directly.

in this case the assets loader translates /assets/web/ to the web itself.

Niko

--
You received this message because you are subscribed to the Google Groups "Koala Framework Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to koala-framework...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Niko Sams

unread,
Oct 31, 2014, 12:06:10 PM10/31/14
to Koala Framework Dev
On Fri, Oct 31, 2014 at 5:47 AM, Artyom M <psycho...@gmail.com> wrote:
By default this->favicon has value: 
/assets/fx_adminIcon/web/images/favicon.ico


yeah, that fx thing is something very clever: we try to colorize the favicon red when opening the /admin of a website.
The outcome isn't always the best so you can still override it in config.

you have in config:
- ext.favicon: for extjs based backend sites
- kwc.favicon: for frontend (kwf-cms-demo)

Niko

Artyom M

unread,
Oct 31, 2014, 11:39:04 PM10/31/14
to koala-fra...@googlegroups.com
I did it.

1. Favicon in \images folder.

In config.local.ini:
ext.faviconFx = false

2. Favicon in root folder.

In config.local.ini:
ext.faviconFx = false
ext.favicon = /assets/web/favicon.ico

Small favicon refresh hack for browsers in \views\master.tpl:
<link rel="shortcut icon" href="<?=htmlspecialchars($this->favicon)?>?v=4"  type="image/x-icon" />

>*all* requests go to bootstrap.php, none access the filesystem directly.
>in this case the assets loader translates /assets/web/ to the web itself.
Why not make the string concatenation in KWF? I spent a lot of time until you told me that the part "/assets/web" is required, but is not a folder. I think many people have a habit of writing the path from the root =)

Niko Sams

unread,
Nov 4, 2014, 2:34:04 AM11/4/14
to Koala Framework Dev
In config.local.ini:
note that everything you change in config.local.ini also can be changed in config.ini.
the only thing that you need config.local.ini for is to set passwords that you don't want end up in your git repository. (config.local.ini is in .gitignore)
 

>*all* requests go to bootstrap.php, none access the filesystem directly.
>in this case the assets loader translates /assets/web/ to the web itself.
Why not make the string concatenation in KWF? I spent a lot of time until you told me that the part "/assets/web" is required, but is not a folder. I think many people have a habit of writing the path from the root =)
Yes, that can be a bit confusing.
But what exactly do you mean by string concatenation - where should that happen?


Niko

Artyom M

unread,
Nov 4, 2014, 5:12:55 AM11/4/14
to koala-fra...@googlegroups.com
>the only thing that you need config.local.ini for is to set passwords that you don't want end up in your git repository. (config.local.ini is in .gitignore)
Do you mean that all changes must be in config.ini and only static values (db and other settings) must be in config.local.ini?

>But what exactly do you mean by string concatenation - where should that happen?
I mean that for user is more convenient to write config lines from root folder. String concatination can be made in the core of kwf-lib.

eg.:
$fullpath = '/assets/web' . config.ini->ext.favicon;
// system var =   core part + user path from config.ini (from the root directory) <---- concatenation

It's clear now? =)

Niko Sams

unread,
Nov 5, 2014, 3:25:06 AM11/5/14
to Koala Framework Dev
On Tue, Nov 4, 2014 at 11:12 AM, Artyom M <psycho...@gmail.com> wrote:
>the only thing that you need config.local.ini for is to set passwords that you don't want end up in your git repository. (config.local.ini is in .gitignore)
Do you mean that all changes must be in config.ini and only static values (db and other settings) must be in config.local.ini?
well, you *can* put your config values whereever you want, see here:

but it makes most sense to have everything it config.ini so it is under version control - except that parts that should not be under version control as dabase config (if you don't want passwords in git)
you can hovever put yout database config also into config.ini.

 

>But what exactly do you mean by string concatenation - where should that happen?
I mean that for user is more convenient to write config lines from root folder. String concatination can be made in the core of kwf-lib.

eg.:
$fullpath = '/assets/web' . config.ini->ext.favicon;
// system var =   core part + user path from config.ini (from the root directory) <---- concatenation

It's clear now? =)
hm, yes we could do that...
or we add better docs for that :D


Niko 
Reply all
Reply to author
Forward
0 new messages