> > Robert Cummings wrote: > >> On Tue, 2009-01-13 at 18:18 -1000, Daniel Kolbo wrote: >> >> >>> Phpster wrote: >>> >>> >>>> What about stripping out all the 'nuances' and just reducing it to just >>>> the text where you then control the display and using your templates and >>>> css? >>>> >>>> Bastien >>>> >>>> Sent from my iPod >>>> >>>> On Jan 13, 2009, at 9:49 PM, Daniel Kolbo <kolb0057@xxxxxxx> wrote: >>>> >>>> >>>> >>>>> Hello, >>>>> >>>>> I've been using PHP and Smarty for several years now and I am happy >>>>> with this "division" of data from presentation. With this philosophy in >>>>> mind, i am a bit perplexed as to how to handle the text on my sites. That >>>>> is, the text is data, so i am motivated to store the text in a database, >>>>> files, or the like, but then text is loaded with little markup nuances >>>>> (random italics/weight/colors, etc...) that make template design rather >>>>> ugly. This motivates me to put markup (maybe even my own brand of markup) >>>>> around the text, and to store this markup-text combination in a database. >>>>> But I don't like this either, because a lot of the people writing the >>>>> content/text know word/writer not markup. So i am motivated to have them >>>>> save their text as .html, and I parse this file and modify accordingly. >>>>> However, i don't like this either as not all word/writer styles are 1-to-1 >>>>> with CSS. Without any options I am back to thinking "hard code" the text >>>>> with markup in included templates, but it hurts just thinking of >>>>> updating/modifying. >>>>> >>>>> I have looked (briefly) at Web Content Management Systems, but this >>>>> seems like overkill really, maybe i'm ignorant. >>>>> >>>>> What would the community suggest? The text can take on many forms, >>>>> introduction text, about text, product information, articles, blurbs, (some >>>>> changes daily, some doesn't) etc...where does all this text live in >>>>> 'properly' designed site. >>>>> >>>>> Thanks in advance, >>>>> dK >>>>> >>>>> >>>>> >>>> Hello Bastien, >>> The difficulty with implementing your suggestions is that say in a >>> paragraph of text that has random bold or italics (etc...) (as determined by >>> the one drafting the text), how would i recover these bold/italics if i >>> remove them? >>> >>> >> >> Strip all tags except bold and italics. Then replace <b> with <strong> >> and <i> with <em> since the former tags are deprecated. If semantic >> meaning is not intended by <b> and <i> then replace with <span >> class="bold"> and <span class="italic"> and create those CSS styles. >> >> Cheers, >> Rob. >> >> > Yes, okay, but who is putting the tags there in the first place? The > writers who are drafting these in word/writer are not marking them up...So > say I put tags around the required items, then when the writer goes to edit, > they are going to say "what is all this", it is not a 'seamless' division. > I am really looking for a three fold division, 1) Logic/data, 2) > presentation, and 3) text. Just like the logic side doesn't concern itself > with presentation, I'd like the writers to not be concerned with > presentation/markup either (except for using the styles available in > word/writer). > > It seems a bit tricky...the writer is providing the data without PHP > knowledge and some styles without Smarty knowledge. The question is how > does one bridge this strange gap in a manageable and easily scalable way? > dK What about using a WYSIWYG Editor? http://tinymce.moxiecode.com/ Data created by the editor can then be parsed to change elements or add classes (and then should also be parsed back when again "editing" the data)