Loading...
 

Tikiwiki-devel (mailman list mirror)


You are viewing a reply to list-style-type in PHP  

list-style-type in PHP

posts: 2859 United Kingdom

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 <drsassafras@gmail.com> 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 <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) and we could discuss it in the second hour?
>>> >
>>> > jonny
>>> >
>>> >
>>> >
>>> >
>>> >> On 16 Feb 2017, at 14:06, Brendan Ferguson <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> 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> 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
>>> >>>>
>>> >>>> TikiWiki-devel at 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
>>> >>>
>>> >>> ------------------------------------------------------------
>>> >>> ------------------
>>> >>> 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
>>> >> ------------------------------------------------------------------------------
>>> >> 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
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> 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
>>> >
>>> > ------------------------------------------------------------------------------
>>> > 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
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>
> ------------------------------------------------------------------------------
> 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


------------------------------------------------------------------------------
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 it 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.