I'm re-writing a CMS system for my site and one of the features we were
very pleased with in the old *Nuke system was the Autolinks module.
Basically, the table for autolinks contained this sort of data:
text: BBC
url: http://www.bbc.co.uk
Simple stuff; every time we entered the term BBC into our news posts,
it would autolink it like <a href="$url">$text">. I want to replicate
this function myself.
I first considered storing the values in a text file seperated by | and
then exploding out the results, but this is a bit clumsy. I was then
wondering if it would be better to simply approach this as a search and
replace when processing News submissions, meaning the server load would
effectively be lessened if the replace function only occurs once rather
than each time the page is loaded. Am I right in thinking this?
If I was to proceed with the above method, would I be able to have php
look up all the values for $text and replace $text with the code above
when processing news submissions?
Thanks,
Matt