Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] detect field updates

  • kbotnen
  • kbotnen
  • OFFLINE
  • Posts: 24
  • Thanks: 0
  • Karma: 0
13 years 9 months ago #149871 by kbotnen
[SOLVED] detect field updates was created by kbotnen
Hi,

Im working with a history module that should be able to show the latest status changes / profile updates.

Like:
1: J.Bond updated his fieldA to busy
2: J.Bond updated his fieldA to away
3: Dr.Evil updated his fieldA to idle
4: Dr.Evil updated his fieldA to busy
5: J.Bond updated his fieldA to idle

But how can I best track the changes? I want to be able to release the module on JED, so I dont want to do any core / cb hacks.

Im aware of the field "lastupdatedate" in comprofiler table, but it doesnt tell me anything about which field that is updated, and the values.

So far I have thought about 2 possible ways to go:

1: Is there any way to "hook / add" a listener to the "onAfterUpdateUser" trigger?

2: Write some sort of CB plugin that goes with the module. The CB plugin then have to detect the update, write to a own storage solution (db, ajax or cookie), which the module then can read out and display.

I hope for solution 1, since I have no experience of writing CB plugins. I cant find any form of documentation on it either, so its hard to get started :/

Any suggestion will be appreciated :)

Happy new 2011

-K-

Post edited by: krileon, at: 2011/01/03 17:23

Please Log in or Create an account to join the conversation.

  • kbotnen
  • kbotnen
  • OFFLINE
  • Posts: 24
  • Thanks: 0
  • Karma: 0
13 years 9 months ago #149897 by kbotnen
Replied by kbotnen on topic Re:detect field updates
Edit / Update

I went with solution 2, writing a Community Builder plugin. I guess I will use a db table to share information from the CB plugin to the Joomla module.

After a while of searching I found the API documentation, the example plugin at Krileons site (it was next to hidden, but found it after a while at the very bottom of the page), and a "Hello world" example.

So if you stumble upon this thread:

- Trigger list + trigger example plugin-
www.allmysocials.com/tutorials/item/228-event-triggers

- How to write a CB plugin + CB API documentation-
www.joomlapolis.com/component/option,com_docman/task,cat_view/gid,50/Itemid,36/

-K-

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum