[thelist] MySQL as CMS

Koen Depoorter koen at skynet.be
Wed Nov 6 08:18:01 CST 2002


hi,

recently i made something similar with mysql, had no problems with that.

Only thing you (maybe) have to keep in mind is markup. Sometimes
journalists/editors want to put text/sentences in italic or bold (and
come up with that idea when you're finished).

You can learn them the HTML-tags, but you might run into problems if
you have special characters that need to be converted into entities
(I normaly take the results of my query and convert everything at
once during the output (in php with htmlentities()), it's stored in
it's original form in the database).
So I give the customer custom tags, like %%word%% to put "word"
italic. with a function i replace everything at output (example in
php):

	function addmarkup($content){
		$content = preg_replace("/(__)(.*)(__)/smU",
"<b>\\2</b>", $content);
		$content = preg_replace("/(%%)(.*)(%%)/smU",
"<i>\\2</i>", $content);
		return $content;
	}

This way of formatting isn't new, it's generally used in Wiki's
<http://c2.com/cgi-bin/wiki?WikiWikiWeb> (I used the textformating
rules as basic principle)

hope it helps,

koen
>
>I imagine a simple administrative tool allowing the client, or myself to
>update the content of the site without managing a bunch of scattered HTML
>files.
>
>Are there any faults in this approach that I am not seeing?
>

--
koen depoorter - koen at keytrade.com

#RandomTag



More information about the thelist mailing list