Quantcast

[Tiki-devel] list-style-type in PHP

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Tiki-devel] list-style-type in PHP

Brendan Ferguson
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://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

luciash d' being

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://sdm.link/slashdot


_______________________________________________
TikiWiki-devel mailing list
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Jonny Bradley-4
Hi all

Sorry Luci, i think PHP classes should be in lib, not in themes, but i'm wondering why you are doing something that CSS/LESS will do with PHP?

Surely render out the list using a class for the container (e.g. <ol class="footnotes-list">...) and then add some CSS (via LESS and compile as Luci says) to define the list style, which then others can override as needed...

Like this sort of thing maybe? http://stackoverflow.com/questions/24230990/ddg#34145218

Or did we miss something? ;)

jb



> On 16 Feb 2017, at 12:34, luciash <[hidden email]> 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://sdm.link/slashdot
>>
>>
>> _______________________________________________
>> TikiWiki-devel mailing list
>>
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Torsten Fabricius-4
Shouldn`t style selectors be defined in Smarty templates?

T.

On 16.02.2017 13:49, Jonny Bradley wrote:

> Hi all
>
> Sorry Luci, i think PHP classes should be in lib, not in themes, but i'm wondering why you are doing something that CSS/LESS will do with PHP?
>
> Surely render out the list using a class for the container (e.g. <ol class="footnotes-list">...) and then add some CSS (via LESS and compile as Luci says) to define the list style, which then others can override as needed...
>
> Like this sort of thing maybe? http://stackoverflow.com/questions/24230990/ddg#34145218
>
> Or did we miss something? ;)
>
> jb
>
>
>
>> On 16 Feb 2017, at 12:34, luciash <[hidden email]> 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://sdm.link/slashdot
>>>
>>>
>>> _______________________________________________
>>> TikiWiki-devel mailing list
>>>
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

luciash d' being
In reply to this post by Jonny Bradley-4
Hi Jonny,


On 16.2.2017 13:49, Jonny Bradley wrote:
> Hi all
>
> Sorry Luci, i think PHP classes should be in lib, not in themes, but i'm wondering why you are doing something that CSS/LESS will do with PHP?

Exactly what I thought. Why not to add the class="" HTML attribute in
the PHP (or Smarty template) code and do that using LESS/CSS?

luci


> Surely render out the list using a class for the container (e.g. <ol class="footnotes-list">...) and then add some CSS (via LESS and compile as Luci says) to define the list style, which then others can override as needed...
>
> Like this sort of thing maybe? http://stackoverflow.com/questions/24230990/ddg#34145218
>
> Or did we miss something? ;)
>
> jb
>
>
>
>> On 16 Feb 2017, at 12:34, luciash <[hidden email]> 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://sdm.link/slashdot
>>>
>>>
>>> _______________________________________________
>>> TikiWiki-devel mailing list
>>>
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Brendan Ferguson
In reply to this post by luciash d' being
I don't think php libraries belong in the less folder.

On Thu, Feb 16, 2017 at 9:34 PM, luciash <[hidden email]> 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://sdm.link/slashdot


_______________________________________________
TikiWiki-devel mailing list
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

luciash d' being

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 <[hidden email]> 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://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
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 [hidden email] 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Brendan Ferguson
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 <[hidden email]> 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 <[hidden email]> 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://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
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 [hidden email] 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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Jonny Bradley-4

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) and we could discuss it in the second hour?

jonny




> On 16 Feb 2017, at 14:06, Brendan Ferguson <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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://sdm.link/slashdot
>>>
>>> ______________________________
>>> _________________
>>> TikiWiki-devel mailing list
>>>
>>> [hidden email]
>>> 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 [hidden email] 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
>>
>> [hidden email]
>> 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
> [hidden email]
> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

luciash d' being
In reply to this post by Brendan Ferguson

ah, I see, it is to convert integers in general, not just in lists? then I would probably add it to lib/tikilib.php or somewhere in lib/core/Tiki/Convert/... if it's Tiki specific ?

luci


On 16.2.2017 15:06, Brendan Ferguson 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 <[hidden email]> 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 <[hidden email]> 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://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
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 [hidden email] 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
[hidden email]
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 [hidden email] 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

luciash d' being
In reply to this post by Jonny Bradley-4
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) and we could discuss it in the second hour?
>
> jonny
>
>
>
>
>> On 16 Feb 2017, at 14:06, Brendan Ferguson <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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://sdm.link/slashdot
>>>>
>>>> ______________________________
>>>> _________________
>>>> TikiWiki-devel mailing list
>>>>
>>>> [hidden email]
>>>> 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 [hidden email] 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
>>>
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Brendan Ferguson
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 <[hidden email]> 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) and we could discuss it in the second hour?
>
> jonny
>
>
>
>
>> On 16 Feb 2017, at 14:06, Brendan Ferguson <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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://sdm.link/slashdot
>>>>
>>>> ______________________________
>>>> _________________
>>>> TikiWiki-devel mailing list
>>>>
>>>> [hidden email]
>>>> 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 [hidden email] 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
>>>
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Gary Cunningham-Lee
If I'm understanding correctly, you can make an ordered list display
inline (horizontally) with CSS. See http://jsfiddle.net/CMKzK/ . It's
true that the numbers aren't clickable or selectable, though, as they're
not considered part of the list item content.

-- Gary

On 2/17/2017 10:42 AM, Brendan Ferguson wrote:

> 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 <[hidden email]
> <mailto:[hidden email]>> 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 <[hidden email]
>     <mailto:[hidden email]>> 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 <[hidden email]
>     <mailto:[hidden email]>> 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 <[hidden email]
>     <mailto:[hidden email]>> 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://sdm.link/slashdot
>     >>>>
>     >>>> ______________________________
>     >>>> _________________
>     >>>> TikiWiki-devel mailing list
>     >>>>
>     >>>> [hidden email]
>     <mailto:[hidden email]>
>     >>>> 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://sdm.link/slashdot
>     _______________________________________________ TikiWiki-devel
>     mailing list [hidden email]
>     <mailto:[hidden email]>
>     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://sdm.link/slashdot
>     >>>
>     >>> ______________________________
>     >>> _________________
>     >>> TikiWiki-devel mailing list
>     >>>
>     >>> [hidden email]
>     <mailto:[hidden email]>
>     >>> 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://sdm.link/slashdot
>     >> _______________________________________________
>     >> TikiWiki-devel mailing list
>     >> [hidden email]
>     <mailto:[hidden email]>
>     >> 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://sdm.link/slashdot_______________________________________________
>     <http://sdm.link/slashdot_______________________________________________>
>     >> TikiWiki-devel mailing list
>     >> [hidden email]
>     <mailto:[hidden email]>
>     >> 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://sdm.link/slashdot
>     > _______________________________________________
>     > TikiWiki-devel mailing list
>     > [hidden email]
>     <mailto:[hidden email]>
>     > 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://sdm.link/slashdot
>     _______________________________________________
>     TikiWiki-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     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://sdm.link/slashdot
>
>
>
> _______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Brendan Ferguson
That is a neat trick, I did not think of floating them. It's something I might use in the future, but right now I need to apply styling to the numbers, and expect that previous styling will be applied to there inline placement. I'm also hesitant to use a CSS trick like that unless I have control over the surroundings.... It might break the page under some custom CSS conditions, but thanks for that.

Brendan

> On Feb 17, 2017, at 12:28 PM, Gary Cunningham-Lee <[hidden email]> wrote:
>
> If I'm understanding correctly, you can make an ordered list display
> inline (horizontally) with CSS. See http://jsfiddle.net/CMKzK/ . It's
> true that the numbers aren't clickable or selectable, though, as they're
> not considered part of the list item content.
>
> -- Gary
>
>> On 2/17/2017 10:42 AM, Brendan Ferguson wrote:
>> 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 <[hidden email]
>> <mailto:[hidden email]>> 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 <[hidden email]
>>    <mailto:[hidden email]>> 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 <[hidden email]
>>    <mailto:[hidden email]>> 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 <[hidden email]
>>    <mailto:[hidden email]>> 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://sdm.link/slashdot
>>>>>>
>>>>>> ______________________________
>>>>>> _________________
>>>>>> TikiWiki-devel mailing list
>>>>>>
>>>>>> [hidden email]
>>    <mailto:[hidden email]>
>>>>>> 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://sdm.link/slashdot
>>    _______________________________________________ TikiWiki-devel
>>    mailing list [hidden email]
>>    <mailto:[hidden email]>
>>    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://sdm.link/slashdot
>>>>>
>>>>> ______________________________
>>>>> _________________
>>>>> TikiWiki-devel mailing list
>>>>>
>>>>> [hidden email]
>>    <mailto:[hidden email]>
>>>>> 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://sdm.link/slashdot
>>>> _______________________________________________
>>>> TikiWiki-devel mailing list
>>>> [hidden email]
>>    <mailto:[hidden email]>
>>>> 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://sdm.link/slashdot_______________________________________________
>>    <http://sdm.link/slashdot_______________________________________________>
>>>> TikiWiki-devel mailing list
>>>> [hidden email]
>>    <mailto:[hidden email]>
>>>> 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://sdm.link/slashdot
>>> _______________________________________________
>>> TikiWiki-devel mailing list
>>> [hidden email]
>>    <mailto:[hidden email]>
>>> 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://sdm.link/slashdot
>>    _______________________________________________
>>    TikiWiki-devel mailing list
>>    [hidden email]
>>    <mailto:[hidden email]>
>>    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://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> TikiWiki-devel mailing list
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] list-style-type in PHP

Jonny Bradley-4
In reply to this post by Brendan Ferguson
Hi Brendan again,

If the thing you are displaying is really an "ordered list" (which it sounds very much like) then really you should use the relevant html tag if possible imho. Any styling issues can be overcome with CSS (see http://getbootstrap.com/css/#type-lists) but a correct semantic representation in the page i think is more important.

Regarding making the numbers clickable i expect there will be a way... http://stackoverflow.com/a/5694578/2459703 maybe?

The smarty modifier still sounds quite useful though ;)

jb

p.s. This article is quite interesting https://css-tricks.com/numbering-in-style/


> On 17 Feb 2017, at 01:42, Brendan Ferguson <[hidden email]> wrote:
>
> 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 <[hidden email]> 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) and we could discuss it in the second hour?
>>> >
>>> > jonny
>>> >
>>> >
>>> >
>>> >
>>> >> On 16 Feb 2017, at 14:06, Brendan Ferguson <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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://sdm.link/slashdot
>>> >>>>
>>> >>>> ______________________________
>>> >>>> _________________
>>> >>>> TikiWiki-devel mailing list
>>> >>>>
>>> >>>> [hidden email]
>>> >>>> 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 [hidden email] 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
>>> >>>
>>> >>> [hidden email]
>>> >>> 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
>>> >> [hidden email]
>>> >> 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
>>> >> [hidden email]
>>> >> 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
>>> > [hidden email]
>>> > 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Loading...