Opened 2 years ago
Closed 2 years ago
#3404 closed Defect (fixed)
River items use an extension-less module
| Reported by: | ewinslow | Owned by: | ewinslow |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.8 Beta 2 |
| Component: | Core | Version: | Github Master |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: | moderate |
Description
Two options:
- Add another module specifically for the river called elgg-module-river or elgg-module-activity.
- Come up with another component entirely (non-module) that could be used as the river entry. I think I prefer this option. Activity entries seem to have the following parts (in no particular order):
- avatar of main actor/target
- representative icon for type of activity
- header/summary
- primary + secondary content
- primary + secondary menus
- timestamp
- related activity (likes, comments)
I checked facebook, twitter, github, buzz, all seem to incorporate these aspects, plus or minus.
Change History (5)
comment:1 Changed 2 years ago by ewinslow
comment:2 Changed 2 years ago by ewinslow
- Owner set to ewinslow
- Status changed from new to assigned
comment:3 Changed 2 years ago by cash
- Milestone changed from Needs Review to Elgg 1.8 Beta 2
This needs to be done soon if we're going to do it for 1.8 as plugin authors are starting to update plugins.
comment:4 Changed 2 years ago by cash
- Difficulty set to moderate
See https://github.com/Elgg/Elgg/pull/35 for some great progress on this
comment:5 Changed 2 years ago by Cash Costello
- Resolution set to fixed
- Status changed from assigned to closed
Merge pull request #35 - Fixes #3404, #3490
Changeset: 9edc8c6004d1236a21e03fb1c820a6e749f1ee3b
Note: See
TracTickets for help on using
tickets.

During the creation of my facebook theme, I found that most river views in bundled plugins manually insert some html:
This kind of coding pattern is crying out for a template view that any river entry can use. I found it was much cleaner to do something like this:
//File: .../river/type/subtype/action.php //build parts of river... //insert parts into template: echo elgg_view('<template view>', array( 'summary' => "Evan did something", 'message' => "Accompanying message from poster, if applicable", 'attachment' => ..., //"attachment" view of activity's object 'item' => $vars['item'], 'icon' => ..., ));The template view then takes care of the layout of the river entry, so themes only have to override one view to get a consistent change across the board. That's really what I'm looking for -- there's no reason that themes should have to "know" so much about all the different content plugins out there.