The idea is create a notification center like iOS for Joomla!, but
first we need to start with basic.
Register activity from extensions.
I´ve thinked in 2 ways of doing this:
a) Create a activity definition for every extension.
1) Build a XML with definition of activites
2) Create a "notification" plugin that map/register actions in
current scope
b) Dispatch a plugin beforeExecute a task in JController, execute
method. (change in JController)
1) Here we can build a genericly notification using "Application
name", "current user", "date time", "task". But if we need specific
information from task we need to "map" this data and register bofore
save
Ex.: Júlio has created a new banner "title of banner here" 20 secs ago
For create this notification we need a little bit more information.
Before save this information we need to recover specify some arguments
that can be used on your string.
In my example, I´ve decided to use this notation:
PLG_NOTIFICATION_BANNER_SAVE="{myinfo} has created a new banner:
{title}"
in pt-BR we can change use {VAR} in diff case that is better for
understand.
PLG_NOTIFICATION_BANNER_SAVE="o baner {title} foi criado por {myinfo}"
I guess using {VAR} is better because in others languages people can
decide where the var goes in.
Ps.: In my extension I´ve implented 1st idea. If anyone has interrest
to see the project its on github. But I´ll refectoring using J!
codestyle. https://github.com/juliopontes/joomla-notification-center
Waiting for feedback.
Cheers,
On Dec 8, 9:22 pm, "Nicholas K. Dionysopoulos" <nikosd...@gmail.com>
wrote:
> > codestyle.https://github.com/juliopontes/joomla-notification-center
>
> > Waiting for feedback.
>
> > Cheers,
On Dec 9, 1:05 am, brian teeman <jooml...@googlemail.com> wrote:>
Actually they both do have support for extensions just not many. /me
doesnt> like to re-invent the wheel unless it is rounder
My thoughts are we can already achieve this with by using JLog. See
http://developer.joomla.org/manual/ch01s04.html
Going a bit further, you could craft an activity logger for JLog which
has a bit more information and store key metrics in a JSON string.
Anyway, that's how I've solved it so far. There's already an
onBeforeExecute and onAfterExecute in JWeb as well.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers
Hannes
The reason of refactoring is to use JLog, when I made first version, I
just started to think a solution to works. Maybe now its not the best
solution. I'll start to think on refactoring using JLog and if we need
a component to display historical activities, in my opinion we can
extend com_messages. I like the idea of creat a growl box like
http://www.coldfiredesigns.com/2010/?p=1
I agreed with you guys, my extension has lot of unecessary code, we
can clean a lot and use JLog. I'll plan a refactoring and take a look
on JWeb like Andrew told.
On 9 dez, 08:09, Hannes Papenberg <hackwa...@googlemail.com> wrote:
> I, too, would rather see this being part of JLog, maybe a logging level
> or something. Purely in terms of style: I'd like to see us use growl
> style notifications in the backend for all sorts of messages. That would
> be especially usefull when making stuff like publishing an item
> ajaxified. You click the icon, the item is published, and the response
> is parsed into a growl box that shortly after disappears. It would solve
> the problem of notifying the user when writing an ajaxified extension.
>
> Hannes
>
> Am 09.12.2011 04:27, schrieb Andrew Eddie:
>
>
>
>
>
>
>
> > The way I've done this at work is using "push" instead of "pull". The
> > code pushes activities to a stream, rather than the application trying
> > to guess what's going on. It's much more efficient.
>
> > My thoughts are we can already achieve this with by using JLog. See
> >http://developer.joomla.org/manual/ch01s04.html
>
> > Going a bit further, you could craft an activity logger for JLog which
> > has a bit more information and store key metrics in a JSON string.
>
> > Anyway, that's how I've solved it so far. There's already an
> > onBeforeExecute and onAfterExecute in JWeb as well.
>
> > Regards,
> > Andrew Eddie
> >http://learn.theartofjoomla.com- training videos for Joomla 1.7 developers
just another point. I guess will need a way to "disable/enable"
notification. Will use JLog, its easy to implement in any extension,
but need a control of logging. So, I´ve thinked some like ACL does.
All extensions implement ACL só in component parameters we have a
"permissions" tab. We need to think in same way and create a
"Notifications" tab, to people can disable, enable notifications types
like: new items, edit items, etc.
What do you think?
On Dec 9, 10:01 am, Júlio Pontes <juliopfn...@gmail.com> wrote:
> Hi guys,
>
> The reason of refactoring is to use JLog, when I made first version, I
> just started to think a solution to works. Maybe now its not the best
> solution. I'll start to think on refactoring using JLog and if we need
> a component to display historical activities, in my opinion we can
> extend com_messages. I like the idea of creat a growl box likehttp://www.coldfiredesigns.com/2010/?p=1
>
> I agreed with you guys, my extension has lot of unecessary code, we
> can clean a lot and use JLog. I'll plan a refactoring and take a look
> on JWeb like Andrew told.
>
> On 9 dez, 08:09, Hannes Papenberg <hackwa...@googlemail.com> wrote:
>
>
>
>
>
>
>
> > I, too, would rather see this being part of JLog, maybe a logging level
> > or something. Purely in terms of style: I'd like to see us use growl
> > style notifications in the backend for all sorts of messages. That would
> > be especially usefull when making stuff like publishing an item
> > ajaxified. You click the icon, the item is published, and the response
> > is parsed into a growl box that shortly after disappears. It would solve
> > the problem of notifying the user when writing an ajaxified extension.
>
> > Hannes
>
> > Am 09.12.2011 04:27, schrieb Andrew Eddie:
>
> > > The way I've done this at work is using "push" instead of "pull". The
> > > code pushes activities to a stream, rather than the application trying
> > > to guess what's going on. It's much more efficient.
>
> > > My thoughts are we can already achieve this with by using JLog. See
> > >http://developer.joomla.org/manual/ch01s04.html
>
> > > Going a bit further, you could craft an activity logger for JLog which
> > > has a bit more information and store key metrics in a JSON string.
>
> > > Anyway, that's how I've solved it so far. There's already an
> > > onBeforeExecute and onAfterExecute in JWeb as well.
>
> > > Regards,
> > > Andrew Eddie
> > >http://learn.theartofjoomla.com-training videos for Joomla 1.7 developers
You get all kinds of notifications on Joomla! CMS. With this new
feature, you can keep track of them all in one convenient location.
ACL Notification Permissions
People need to know who can have permissions to be notified. So I´ve
start to think on default settings for 3rd extensions dev. that need
to implement notifications in your extension.
<?xml version="1.0" encoding="utf-8" ?>
<access component="com_content">
<section name="component">
<!-- enable notification -->
<action name="core.notify" title="JACTION_NOTIFY_COMPONENT"
description="JACTION_NOTIFY_COMPONENT_DESC" />
<!-- default notification enable -->
<action name="core.notify.unpublish"
title="JACTION_NOTIFY_UNPUBLISH"
description="JACTION_NOTIFY_UNPUBLISH_DESC" />
<!-- default notification enable -->
<action name="core.notify.publish" title="JACTION_NOTIFY_PUBLISH"
description="JACTION_NOTIFY_PUBLISH_DESC" />
<!-- default notification enable -->
<action name="core.notify.delete" title="JACTION_NOTIFY_DELETE"
description="JACTION_NOTIFY_DELETE_DESC" />
</section>
<section name="category">
<!-- enable notification for categories -->
<action name="core.notify" title="COM_CATEGORIES_NOTIFY"
description="COM_CATEGORIES_NOTIFY_DESC" />
<!-- notify when save category -->
<action name="core.notify.save" title="COM_CATEGORIES_NOTIFY_SAVE"
description="COM_CATEGORIES_NOTIFY_SAVE_DESC" />
<!-- notify when unpublish category -->
<action name="core.notify.unpublish"
title="COM_CATEGORIES_NOTIFY_UNPUBLISH"
description="COM_CATEGORIES_NOTIFY_DELETE" />
<!-- notify when publish category -->
<action name="core.notify.publish"
title="COM_CATEGORIES_NOTIFY_PUBLISH"
description="COM_CATEGORIES_NOTIFY_DELETE" />
<!-- notify when delete category -->
<action name="core.notify.delete"
title="COM_CATEGORIES_NOTIFY_DELETE"
description="COM_CATEGORIES_NOTIFY_DELETE" />
</section>
<section name="article">
<!-- enable notification -->
<action name="core.notify" title="COM_CONTENT_NOTIFY_ARTICLE"
description="COM_CONTENT_NOTIFY_ARTICLE_DESC" />
<!-- notify when save article -->
<action name="core.notify.save"
title="COM_CONTENT_NOTIFY_SAVE_ARTICLE"
description="COM_CONTENT_NOTIFY_SAVE_ARTICLE_DESC" />
</section>
</access>
I found a great example in jquery, but when you have lot of "growl"
messages, its better to display like TweetDeck alert does.
http://www.plumtheory.com/demos/notification-center/light/
Realtime Notifications
This is a important decision we have 2 ways that I know for doing
this. We can use http://nodejs.org or http://www.ape-project.org/ in
my opinion nodejs its better.
> > > >http://learn.theartofjoomla.com-trainingvideos for Joomla 1.7 developers
I'm working on extension but I've some questions. I've think on create
another xml file like access.xml but for notification config.
- Notifications will have custom options by controller/actions. Ex.:
Articles.publish, Article.save, articles.delete, etc.
- Notification can be viewed for custom groups
- Notification can have custom config for extension necessities (Some
fields: Sound, Alert Style, Show items)
To made this I decide to have a "notification.xml" on your extension
folder. if this file not exists I can get default form on
com_notificationcenter extension.
What do you think about this?
iOS Examples photos:
http://gigaom2.files.wordpress.com/2011/10/ios-5-notification-settings-cropped.png
howto.cnet.com/i/tim/
2011/09/27/5_iOS_5_Notification_Center_362x272.png