Extending discussions functionality

I'm not necessarily looking for someone to develop the plugin(s) (that would be nice though), but rather for some pointers from experienced coders, developers, and other Elgg-savvy folks.

I would like the following additional functionality for discussions:

  • Ability to "watchlist" discussions (probably as an extension of the bookmark function).
  • Ability to see two lists for "my discussions", one for topics the user started and another for all topics that a user has commented within.
  • Ability to organize discussions into additional categories. I think the simplest, if hacky, way to do would be to permit groups to share items.

Any advice, suggestions, pointers, warning, or so on?



  • Bump.

    Any suggestions? Pointers?


  • For a watchlist, I would use a relationship between the user and the entity. You would have to extend or override a view in the groups forum plugin so that a "watch this" button is available. The button is backed by an action in Elgg to create the "watch" relationship. You could then create a page that lists all of a user's watched discussions. You could also hook into the notification system so that people receive emails when new comments are made on that discussion.

  • Thanks Cash! The pointers are very helpful and exactly what I'm looking for. I'm still working around tweaking and discovering hacky solutions with the Elgg code. I enjoy exploring how things work. Pointing me in the right direction is perfect. I really appreciate it.

    To be clear, I would need a security token on the watch and page creation actions, correct? (For 1.7 compatibility and 1.6.1 good practice.) If I understand Elgg properly, I would not need a token for notifications. Is that also correct? I am unclear if a token would be needed for populating the page or not. On one hand, it seems like it shouldn't be needed (as the page is already "made" and just filling it with the appropriate db fields). On the other, it is a user-specific db lookup, which would indicate a need for a token. 

    I'm sorry if the question seem a little obvious. I'm still getting a grasp of things with Elgg. Modding and hacky solutions are more comprehensible to me than core development. Since I have that potential, I'd really like to put it to use and help add plugins, code bits, and so on to the community. Please just bear with me as I ask my green questions. :-)



  • Tokens are only needed for actions. Actions (usually) change the database so you want extra security on them. Any time you give people a link or button to click and it ends up saving or deleting data in the database, it should be protected with a token. 

    The "watch this" link would need a token since you would save this relationship in the database. When you send a notification to someone that contains a link to a page, you don't need a token included with the link because clicking on the link does not change the database.

  • Casey, the functionalities you listed are all included in newest version of vazco_forum plugin in one way or another. You can look at the free version of this plugin to check how watching was implemented. vazco_forum will be extended to groups probably in the next 10 days, and fee version (as well as update of the current free version) will be released to the community.