I need my writers to quickly be able to add tags to articles for links.? If they are discussing something we want to be a link then I want them to be able to type something like, the articles are pulled from a database and we can handle that part, I just need the code to parse the links in.
?
I'm looking for a script that will probably be something like
linkstart=instr(newsfeed,"{!")
linkstop=instr(newsfeed,"}",linkstart)
code to figure out what is in the middle maybe
for x=linstart to linkstop
linkword = linkword +
next
If I have to think any more I've written it myself already ;)
BUT I do need the ability to have a variable, so I need the code to look for a " | " between {! and } so the link text and the link word don't have to be the same... ie.
{!Britney | Britney Spears} was in the news today
would parse as
<a href="/news/stories/Britney Spears/">Britney was in the news today
---and if they are the same than this would work ---
{!Britney Spears} was in the news today
would parse as
<a href="/news/stories/Britney Spears/">Britney Spears was in the news today