[horde] How to set quota format
Mauricio Jose T. Tecles
mtecles at biof.ufrj.br
Tue Aug 20 13:10:46 UTC 2013
----- Mensagem de jan at horde.org ---------
>
> Zitat von Lukas Engler <engler at rz.uni-frankfurt.de>:
>
>> Zitat von Jan Schneider <jan at horde.org>:
>>
>>> Zitat von Lukas Engler <engler at rz.uni-frankfurt.de>:
>>>
>>>> Hi,
>>>> I would like to change the quota format from the default short to
>>>> the long format. This is a snippet of my backends.local.php but
>>>> so far nothing changed, it still shows the short format. What am
>>>> I doing wrong?
>>>
>>> The format name are the *keys*. Read the docs in backends.php again.
>>
>> I did as you said, but using 'long' as a key followed by a string
>> value like 'Quota status: %.2f [UNIT] / %.2f [UNIT] (%.2f%%)'
>> doesn't change anything. If I use 'sort' as a key it is working
>> more or less.
>
> Of course. Those are different formats for different locations of
> the quota notifications. An occurrence of a quota message will only
> change if you change the related setting in the configuration.
>
>> 'format' => array(
>> 'short' => 'Quota status: %.2f [UNIT] / %.2f [UNIT]
>> (%.2f%%)'),
>>
>> Unit is not being replaced and it shows only the percentage of the
>> used quota and not the actual used amount of size.
>
> You cannot arbitrarily add new values to those strings. These are
> just sprintf formatting strings, i.e. you can change how the
> *existing* values are displayed.
>
>>>
>>>> Using imp 6.1.2
>>>>
>>>> 'quota' => array(
>>>> 'driver' => 'imap',
>>>> 'params' => array(
>>>> 'hide_when_unlimited' => false,
>>>> 'format' => array('long'),
>>>> 'unit' => 'GB'
>>>> )
>>>> ),
>
> --
> Jan Schneider
> The Horde Project
> http://www.horde.org/
>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
I didn't have time to analize the code for the current version. In
general I modify it to the way I use quota, and when I do I use to
create a new Wiki entry. You might have a hint at the link below (or
not, if the code is different), the last time I did it.
http://wiki.horde.org/AltH5Imp6Quota
Mauricio
Instituto de Biofisica C. C. F. - UFRJ
----- Final da mensagem de jan at horde.org -----
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the horde
mailing list