Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Make something after public a post
I was wondering how to do this to develop a plugin for textpattern. How can I do something after someone publish a post into textpattern? For instance, when I public a post, send a message to some people.
Can anybody help me?
Thanks in advance
What doesn’t kill you, makes you stronger
Offline
Offline
Re: Make something after public a post
That was just what I was looking for, but now I have some problem. Once the user has posted something, I want to retrieve the ID of the new post, but I don’t know how to get it. So that’s what I’m doing:
register_callback(“my_function”, ‘article’ , ‘create’);
function my_function($event, $step){
//Here I want to do something, but I need the ID of the new post created.
}
Has anybody any idea how to do this?
What doesn’t kill you, makes you stronger
Offline
Re: Make something after public a post
Thanks guys for your help. I’ve already finished a plugin called txp_twitter. Everytime you create or edit a post, a messages is sent to twitter. You can see more information at http://textpattern.org/plugins/804/txp_twitter
I wait for your suggestions!
What doesn’t kill you, makes you stronger
Offline