|
-
Feb 11th, 2008, 06:51 PM
#1
Thread Starter
Hyperactive Member
Text parsing and replacement. php5
Totally lost on how to do this but figure it's via one or more of the string functions.
Am adding in bbcode tags to an articles management system and so far pretty easy to do bold, underline, strike out, etc.
Having problems getting an article link thing to work.
What I would like to do is tag up titles appearing in articles, then when the article is parsed the software will check if another article exists in the datebase and replace the bbcode with a link to the other article.
Something like
Considering the similarities to Miike's [ m ] Imprint [ /m ] one is left with the only conclusion being ....
So "Imprint" is seen as an article title, due to the [ m ] tag (spaces inserted just in case vB's parser does something with them), when it comes time to display this article, the software takes "Imprint" checks if an article of that name exists in the db, if it does then the software replaces the "[ m ] Imprint [ /m ]" with a link to the "Imprint" article, if it doesn't the [ m ] tags are simply removed. Oh and articles can of course have multiple words in their title.
Hopefully that all make's some sort of sense
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|