Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Adding title to all links
I’m migrating from Movable Type where I developed a plugin that added a title attribute to all links. Is there a way to develop such plugin in textpattern to
When the user saves the article I want to scan through the body text and find all links. Then if the link doesn’t contain a title attribute I want to add it. I’m using a simple file cache to look up the titles.
So I the user posts a body with:
Hello <a href=“http://gemal.dk/”>gemal</a>
I want to change that to:
Hello <a href=“http://gemal.dk/” title=“Gemal’s site”>gemal</a>
Where do I need to hook into textpattern to do this?
Offline
Re: Adding title to all links
I’d suggest catching the “article” event, at least for the “save” and “publish” steps, or even at the “preview” step, too.
Last edited by wet (2007-07-17 10:56:27)
Offline
Pages: 1