From: Joel U. <uck...@no...> - 2005-10-16 17:12:26
|
Thus spake Matt Brown: > > I'm still vaguely uncomfortable with the idea of allowing users to add > arbitrary classes to objects. I can't pinpoint exactly why though. I > guess it's the whole trade off between flexibility and correctness. If > you let users define arbitrary classes/ids you can bet it's going to be > misused quicker than you can blink your eye. I'm not sure that that is a > strong argument against your proposal though... just thinking aloud > here. That was my initial response as well, but I'm not convinced that it's warranted. Even in the case where users can define arbitrary classes and ids, it's still all style information. It's not like it's executable code. On the other hand, we'd have to be careful about users stepping on ids and classes used by the Wiki itself. > Could it be split into two parts? > - Some extra syntactical features to define some commonly used page > elements > > - An extra plugin that when included allows precise specification of > class names / ids for attributes. > Splitting is good. I think that what we're facing here is the intersection of two useful features, viz.: 1. the ability of the user to specify style information in the wiki text 2. the ability to the admin to extend the wiki markup on a per-site basis What Reini was talking about was the second, what I was initially thinking of is the first, and what John was talking about is a combination of these two. So, what I'm suggesting is: 1. Extending the markup syntax to permit classes and ids, perhaps like this: markupelement{class1 class2... #id} so that you could do this with any markup element you wanted, say !!!{enormous orangebox #title} A Gigantic Orange-Boxed Title 2. Providing an easy interface for adding new markup, as Reini suggested in his response higher up in this thread. 3. Making a div and span markup plugin which uses 2 and can be turned on from the config.ini. 4. Making a plugin which reads wiki pages for user-generated css, which can be turned on from the config.ini and used in conjunction with 1-3. Comments? -- J. |