Loading...
 

Tikiwiki-devel (mailman list mirror)


Displaying integers as Roman numerals (was RE : list-style-type in PHP)

posts: 1855

btw, all custom Tiki Smarty modifiers (besides of the default Smarty
ones) we have available are located in lib/smarty_tiki/modifier.*.php

also remember, they are meant to be used in Smarty tpl files (templates/)

luci


On 17.2.2017 10:05, Dr. Sassafras wrote:
> Great. I will do that. My first step I was going to take was to try
> and find a good example, so thanks.
>
> Brendan
>
> On Feb 17, 2017, at 11:43 AM, Cloutier, Philippe (RESSOURCE EXTERNE)

> <Philippe.Cloutier.externe@mern.gouv.qc.ca

> <mailto:Philippe.Cloutier.externe@mern.gouv.qc.ca>> wrote:
>
>> Hi Brendan,
>> The Smarty part should be trivial. You could see truncate for an
>> example Smarty modifier.
>> ------------------------------------------------------------------------
>> *De :* Brendan Ferguson drsassafras@gmail.com
>> <mailto:drsassafras@gmail.com>

>> *Envoy? :* 16 f?vrier 2017 20:42
>> *? :* Tiki developers
>> *Objet :* Re: Tiki-devel list-style-type in PHP
>>
>> hmm. ok. I will think about that. Obviously its best to let CSS take
>> care of stuff like that.... but the way in which css does take care
>> of things like that is EXTREMELY limited. For example, it will only
>> do it in a ordered list, which is always list type, (similar to block
>> style) so no inline styling can be accomplished in this way. The
>> numbers are never clickable and additional styling can not be
>> applied, they can not be selected-copied-pasted and there are a
>> number of other restrictions as well, but I think you get the point.
>>
>> A smarty modifier sounds interesting. I still don’t have my head
>> totally around smarty. Let me see if I can figure out how to do
>> something like that. (at this point I dont have a clue)
>>
>> I did a quick search within the tiki code for something like this,
>> but couldn’t find anything. So if its there, someone will need to
>> point out to me where it might be.
>>
>> Unfortunately, I wont be able to make the meeting, but I do plan on
>> reviewing the recording so I can keep up to date. If i have
>> questions-comments I will bring them up on the dev list.
>>
>> Thanks for all your help, and for the idea of the smarty modifier. Im
>> looking forward to expressing integers in what ever form suites my fancy.
>>
>> Brendan
>>
>>
>>
>> On Thu, Feb 16, 2017 at 11:23 PM, luciash <luci@tiki.org
>> <mailto:luci@tiki.org>> wrote:
>>
>> Ah, right, Smarty modifier sounds good too... I do not remember but
>> maybe there already exists one?
>>
>> luci
>>
>>
>> On 16.2.2017 15:19, Jonny Bradley wrote:
>> > Again i think it would be better to let CSS do this, then the
>> browser will do all the locale stuff and work better (maybe) in
>> RTL languages etc...
>> >
>> > But if that’s not an option i think this should be a smarty
>> thing, maybe a modifier? So you would use it in the template like
>> >
>> > \{$the_number|convertnum:’upper-roman’\}
>> > or
>> > \{‘3’|convertnum:’upper-roman’\}
>> >
>> > Then to use it in php directly you would call something
>> smarty_modifier_convertnum() (having asked smarty where it is
>> using loadPlugin).
>> >
>> > Sounds suitable?
>> >
>> > Maybe come along to the meeting
>> (https://tiki.org/Roundtable+Meeting+2017+02
>> <https://tiki.org/Roundtable+Meeting+2017+02>) and we could
>> discuss it in the second hour?
>> >
>> > jonny
>> >
>> >
>> >
>> >
>> >> On 16 Feb 2017, at 14:06, Brendan Ferguson
>> <drsassafras@gmail.com <mailto:drsassafras@gmail.com>> wrote:
>> >>
>> >> ya, I guess I wasnt very clear. Its a php series of php
>> functions (bundeled into a class) that converts integers into
>> strings that represent that integer, using the same scheme as the
>> CSS attribute list-style-type. So ConvertNum(3,’upper-roman’)
>> returns ‘III’ etc. Sorry for the confusion.
>> >>
>> >> Brendan
>> >>
>> >> On Thu, Feb 16, 2017 at 10:55 PM, luciash <luci@tiki.org
>> <mailto:luci@tiki.org>> wrote:
>> >> I don’t think CSS styling a numbered list belongs to the lib/
>> but maybe we just misunderstood your question - a PHP class (or
>> is it a library?) definitely goes to lib/ or vendor/ if it is
>> part of third party lib... but if it is just a class, a
>> tikilib.php sounds good?
>> >>
>> >> luci
>> >>
>> >> On 16.2.2017 14:42, Brendan Ferguson wrote:
>> >>> I don’t think php libraries belong in the less folder.
>> >>>
>> >>> On Thu, Feb 16, 2017 at 9:34 PM, luciash <luci@tiki.org
>> <mailto:luci@tiki.org>> wrote:
>> >>> Hi!
>> >>>
>> >>> Nowhere in the lib/ folder please. Add it to the
>> themes/base_files/less/tiki-wikipages_and_plugins.less and
>> recompile the CSS using php console.php (see php console.php
>> --help for the command params available)
>> >>>
>> >>> luci
>> >>>
>> >>> On 16.2.2017 2:31, Brendan Ferguson wrote:
>> >>>> Ive got a php class I am created for the footnotes that
>> styles a number as if one used list-style-type in CSS.
>> >>>>
>> >>>> I was wondering if people had an idea where the best place
>> in the lib folder would be the best place to house it.
>> >>>>
>> >>>> Brendan
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------
>> >>>> ------------------
>> >>>> Check out the vibrant tech community on one of the world’s most
>> >>>> engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> >>>> http://sdm.link/slashdot
>> >>>>
>> >>>> __
>> >>>> _
>> >>>> TikiWiki-devel mailing list
>> >>>>
>> >>>> TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> >>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> <https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel>
>> >>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world’s most
>> engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> http://sdm.link/slashdot
>> ___ TikiWiki-devel
>> mailing list TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> <https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel>
>> >>>
>> >>> ------------------------------------------------------------
>> >>> ------------------
>> >>> Check out the vibrant tech community on one of the world’s most
>> >>> engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> >>> http://sdm.link/slashdot
>> >>>
>> >>> __
>> >>> _
>> >>> TikiWiki-devel mailing list
>> >>>
>> >>> TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> >>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> <https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel>
>> >>
>> ------------------------------------------------------------------------------
>> >> Check out the vibrant tech community on one of the world’s most
>> >> engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> http://sdm.link/slashdot <http://sdm.link/slashdot>
>> >> ___
>> >> TikiWiki-devel mailing list
>> >> TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> >> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> <https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel>
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> Check out the vibrant tech community on one of the world’s most
>> >> engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> http://sdm.link/slashdot_
>> <http://sdm.link/slashdot___>
>> >> TikiWiki-devel mailing list
>> >> TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> >> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> <https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel>
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world’s most
>> > engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> http://sdm.link/slashdot <http://sdm.link/slashdot>
>> > ___
>> > TikiWiki-devel mailing list
>> > TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> <https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world’s most
>> engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> http://sdm.link/slashdot <http://sdm.link/slashdot>
>> ___
>> TikiWiki-devel mailing list
>> TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>> <https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world’s most
>> engaging tech sites, SlashDot.org <http://SlashDot.org>!
>> http://sdm.link/slashdot
>> ___
>> TikiWiki-devel mailing list
>> TikiWiki-devel at lists.sourceforge.net
>> <mailto:TikiWiki-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world’s most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
> ___
> TikiWiki-devel mailing list
> TikiWiki-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.