Background
I have been using the site on the blogger platform for the past 5 years. I used the option of hosting the site on my own server, publishing via FTP. ColdFusion runs on my server, so I decided to take advantage of this. I created custom Coldfusion tags that provided additional features, and included those that were on many messages with messages - to be clear, the body of my messages. Google decided to disable access to this FTP publishing option. I took this news as an excuse for switching to WordPress. Now I have to figure out what to do with all of these ColdFusion tags in my posts.
Problem
I would not lose the functionality provided by custom tags that I have embedded in my posts. My main question is the best way to add functionality to a PHP site using custom tags? My initial plan was to try to parse the page to find tags, and then write a PHP class to basically mimic the functionality provided by the Coldfusion file. I don't know much about PHP, so I'm not sure what tools or libraries exist to facilitate this. Or if it's just a dumb idea. These are not well-formed XML files, so I need something pretty reliable.
An example :
I am using the following tag:
<cf_taglinks>Tag1, Tag2, Tag3</cf_taglinks>
to generate a series of <a ..> <a..>Tag#</a> elements that reference technorati or something else that I decide (thus, the advantage of having my own tag is very easy to change the behavior). The solution to this problem can really handle any link, so if I have the <stackoverflowLink post="3944091"/> , I have to translate this into
<a href="http://stackoverflow.com/posts/3944091/" target="_blank">Stackoverflow Question: 3944091</a>
coldfusion php parsing wordpress
Snekse
source share