Creating a New Page Level Event for Composer Publishing
Permalink
I've setup a 'blog' on my site that uses Composer to generate the posts. I'm really pleased with how well it works.
What I'd like to do is send out a tweet the first time the post is 'Published'. The 'Tweeter' addon is installed, but doesn't seem to play well with Composer. I believe the issue lies in the auto-save functionality of Composer.
This got me thinking about creating a new site event, 'ON_COMPOSER_PUBLISH'. The current 'ON_PAGE_VERSION_APPROVE' is fired each time a composer post is auto-saved. The new event that I propose would only be triggered when the 'Publish' button is clicked.
Along the same lines, perhaps there could be an 'ON_COMPOSER_SAVE_DRAFT' event that would be triggered each time the post is auto-saved or the 'Save as Draft' button is clicked.
What issues do you see with this new event? Any other suggestions for making it work better or different?
What I'd like to do is send out a tweet the first time the post is 'Published'. The 'Tweeter' addon is installed, but doesn't seem to play well with Composer. I believe the issue lies in the auto-save functionality of Composer.
This got me thinking about creating a new site event, 'ON_COMPOSER_PUBLISH'. The current 'ON_PAGE_VERSION_APPROVE' is fired each time a composer post is auto-saved. The new event that I propose would only be triggered when the 'Publish' button is clicked.
Along the same lines, perhaps there could be an 'ON_COMPOSER_SAVE_DRAFT' event that would be triggered each time the post is auto-saved or the 'Save as Draft' button is clicked.
What issues do you see with this new event? Any other suggestions for making it work better or different?
I have submitted these changes and they are approved. They will probably go out with the next version of c5.
I'm also working on an update to the 'Social Share' addon that will use these new events to send out both tweets and facebook posts when a new page is added via composer. This new functionality is in beta now. All I really have to do is to get the instructions written up.
I'm also working on an update to the 'Social Share' addon that will use these new events to send out both tweets and facebook posts when a new page is added via composer. This new functionality is in beta now. All I really have to do is to get the instructions written up.
If I write a new post with Composer and hit publish, nothing happens on twitter. However if I go in and edit the page and then publish a tweet goes out.
Also for the site I'm currently working on I would only want the tweets to go out if there's a new post from within composer, not every time a new page is published.