Re: PHP, Smarty, and Text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux