Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

River items use an extension-less module (Trac #3404) #3404

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 5 comments
Closed

River items use an extension-less module (Trac #3404) #3404

elgg-gitbot opened this issue Feb 16, 2013 · 5 comments

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/3404 on 41320618-12-30 by ewinslow, assigned to ewinslow.

Elgg version: Github Master

Two options:

  1. Add another module specifically for the river called elgg-module-river or elgg-module-activity.
  2. 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.

@elgg-gitbot
Copy link
Author

ewinslow wrote on 41395952-02-27

During the creation of my facebook theme, I found that most river views in bundled plugins manually insert some html:

$content = '<div class="elgg-river-content">';
$content .= $stuff;
$content .= '</div>';

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.

@elgg-gitbot
Copy link
Author

cash wrote on 41415450-09-06

This needs to be done soon if we're going to do it for 1.8 as plugin authors are starting to update plugins.

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.8 Beta 2 by cash on 41415450-09-06

@elgg-gitbot
Copy link
Author

cash wrote on 41436282-10-17

See #35 for some great progress on this

@elgg-gitbot
Copy link
Author

trac user Cash Costello wrote on 41479842-12-16

Merge pull request #35 - Fixes #3404, #3490
Changeset: 9edc8c6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant