JomSocial 1.6 Powerful New API: Controller Creation Override

Posted by: azrul

Tagged in: development , API

I want to talk about 1 particular trigger point that we added to JomSocial 1.6, that is so simple, yet massively powerful.

We are talking about "onBeforeControllerCreate" trigger point. This trigger allows any plugins to override the controller object creation with any other object type. To put it simply, plugins now have the ability to redraw or control access to any JomSocial page easily, without hacking any of our core files.

Let me perhaps paint a picture of what is possible.

  1. A plugin easily block access to any page, for example, it might want to block certain user with a particular custom profile data from using the photo gallery.

  2. A plugin can introduce new 'task' for any existing view. It might want to introduce a new "random" photo layout within the current photo gallery by using "option=com_community&view=photos&task=random" . This is now possible!.

  3. You can write a plugin that can intercept group creation. It might allow each user to create 1 plugin, and it can request for payment (via paypal pehaps?) for each additional group to be created.

  4. If you are not happy with the "invite members" page for example, a plugin can be written to completely override the invite page. A 3rd party invite tools for example, can now completely replace the built-in invite tools while maintaining the existing URL.

  5. Some of you might want to re-implement our advance search feature. By overriding the controller, you no longer have to reapply your hack to the core files whenever a new version of JomSocial is available.

This could go on and on... With 1.6, we can expect some pretty powerful plugin created to take advantage of this new API.

For website developers, you can now create a reusable plugin that you can simply install for your various clients. This will allow you to offer a customized JomSocial experience for your client while still allowing you to upgrade to any new version of JomSocial easily with minimal work.

 

8 Response(s)

You must be logged in to post a comment. Please register if you do not have an account yet.
ffxiv
ffxiv
April 15, 2010
sound great!
http://www.itemgarden.com
Jeff Freeman
Jeff Freeman
January 19, 2010
yep real nice... now how do *I* make a blog entry? I see no way to do it from my blog page.
clarinet
February 01, 2010
Lo que más me gustan de estas noticias es el sistema de comentarios, jaja. Espero que esté pronto disponible.
Aspartacus
February 07, 2010
Should be great to get it in English
Jeff Freeman
Jeff Freeman
January 19, 2010
Also, does JomSocial not import my Avatar to my blog post?
fuqaha
fuqaha
January 20, 2010
We have set this avatar to use Gravatar. You can set it to be integrated with JomSocial / CB though.
GameFriend
January 18, 2010
Great. This sounds very exciting... I'm looking forward to it.

One question, that perhaps I can get answered here is about the onProfileCreate Trigger page at: http://www.jomsocial.com/docs/Event:_onProfileCreate it has nothing on the page. Does this trigger require parameters? I've tried asking in the forums, but I have gotten no response. Looking forward to all future enhancements and mods.

Thanks Guys
ajmal
January 18, 2010
I was trying to retweet this right from Bookmark function, and found out that it appears twice like this:

http://img.skitch.com/20100118-b5q1mihhmsyiw1edj3yqywgex2.jpg

Just a heads up. Nice new comment design. Love it!
busy