Joomla Trigger a Event after Article is Saved - joomla

I want to create a simple event after a article is posted, e.q when admin post a article with category sale I want to fire a event and send SMS to subscribed users.
Is it possible
Regards

Try this,
Its sample content plugin for Joomla,
In this plugin I used onContentPrepare() instead of this you have to use onContentAfterSave.
Hope its helps..

Related

Open/Create blog post page on OctoberCMS

I used this link:
Hide content of blog posts when displaying blog post list in OctoberCMS?
as a tutorial to create a new plugin and show my blog posts by my own style (just post title, date, etc)
But now I need to show the full content of the post. I've migrated from wordpress, where each post creates a new page automaticaly. Does OctoberCMS do the same thing? If yes, how can I relate the post title to the post page. (if not I'll create a "read more" link and show the content on the same page, but, if the users get redirect to the post page, it would be great!)
thanks!
Regards
October CMS is not like word-press, To make posts you need actual plugin and with in that plugin you can add models/tables for you post data
Then you need to create components which can show your records to front-end.
If you are not using rainlab-blog plugin then you need to do this stuff
So basically you need to create this things :
Page where you want to list all post and then add listposts component which will show list of posts (you need to make it manually) then for that component you need to pass single post detail page
For single post again you create new page add another component which can read slug and show respective post data
For redirection from post list to single post you need to create link as you are passing single post detail page to component you can create link with slug and redirect to single post page
For better reference check out https://octobercms.com/plugin/rainlab-blog plugin and read its documentation and code
Then you understand how things works.
Its kind of pain to do thing manually as you are coming from wordpress, But it will give you more control and more flexiblity
Once you made your plugin you can fully Extend it and reuse it as you want.
if any doubt please comment.

Joomla execute function on user login

I need to execute a internal php function to insert a record in database when user login in joomla. How can I do this creating on component, plugin or extensior?
the event onUserLogin works on joomla 2.5? thank you.
You would need to create a plugin and use the event hooks in joomla. So trigger the event and it will talk to your plugin and do w/e it is you want in this case take some user details.
I don't know how to help you code it out if you don't post code so here are some good links to take a look at
Documentation on user events ---> http://docs.joomla.org/J1.5:Plugin/Events/User
Documentation on events ---> http://docs.joomla.org/Plugin/Events
Notice a lot are being "moved" so click through the links to get to the new pages and notice the name changes in the deprecated events.
Hope this helps and post back some code for more feed back.

Trouble with Google Tag Manager (GTM) New Event Listener Tags

I'm very excited about GTM introducing the Event Listener tag options, and have used them with success on some websites. With several of my company's clients, however, I am having this strange issue.
I can see, using the debugger software that the Link Click Listener tag is firing, and I can see that the Record Event tag is firing. However the Events never show up in Analytics.
Any advice?
Thanks in advance!
Becky
Even with the Link Click Listener and the Event Listener firing, you still need to add an additional Google Analytics tag OR Universal Analytics tag to utilize them within GTM. Remember, the only thing the listeners do is create new dataLayers for you to use.
To make events work in Analytics, add a NEW Google Analytics (or UA) tag to GTM.
Select the Track type as 'Event'
Category: Whatever you'd like the category to be (you can use macros here as well)
Action: Whatever the action is, download, click, etc. (macros are helpful here too!)
Label: Whatever you'd like it to be.
The key here is how you setup the rules. Your {{event}} needs to utilize the dataLayer - gtm.click, then you need to specify an element you'd like to track.
For a fantastic tutorial, I recommend - http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-google-tag-manager/

Ajax Hover Question

I am brand new to AJAX but I feel AJAX is what I need to get this requirement finished. When the user hovers over a link, I need a box to show where they can input their email and name for a newsletter signup. Can someone kindly provide me with what this technique is called in AJAX so I can try to find some tutorials? Any help is greatly appreciated.
I would suggest using a JQuery plugin such as clueTip. You can find demos and documentation on clueTip here: http://plugins.learningjquery.com/cluetip/demo/
Try looking at example number 4 on that page, entitled sticky, with arrows

How to play a sound when <div> is updated

I'm writing a simple chat module that will be embedded in a website. It will allow website visitors to chat with the website owner.
The website is ruby/rails and I'm using AJAX.
One thing I can't figure out how to do is how to play a 'bling' sound when a new message arrives (don't worry, this sound is switchable, and the default is 'off'.)
I want the "bling" to play when the message arrives... i.e., when the div that holds the message list is updated by the Server via Ajax.
I'm thinking I need an Event.observe('myDiv', someEvent, callback) function, but I can't figure out what I should use for 'someEvent'...
Any help, much appreciated.
-- John
have you tried 'load' or 'change'? for listeners the event has to be of a certain type described here http://www.w3.org/TR/DOM-Level-2-Events/events.html
another option would be to attach the sound to the AJAX callback function which populates the div.
hope that helps,
Josh

Resources