Hi there,
I'm trying to make a modification on river, and i need to know on which file the data-timestamp is set.
Ive been trying to find it for hours, and i couldn't find it. Any help?
Thanks,
Ramuf
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
views/river/elements/body.php i believe
On river, this is the code for the first item.
<li id="item-river-7" class="elgg-item" data-timestamp="1345501490">
I know that the data-timestamp is from the field "posted" from river table. I'm trying a modification. I added a new field to the river table called "updated" and I want the data-timestamp to be this new field rather than the "posted". But i can't find the place to set the data-timestamp.
// river item header
$timestamp = elgg_view_friendly_time($item->getPostedTime());
<div class="elgg-river-summary">$summary $group_string <span class="elgg-river-timestamp">$timestamp</span></div>
Thanks for the your answer @costakisc but that's not what i'm looking for. What that code does is to show you the posted time on the item. It doesn't set the data-timestamp.
Exactly but in a friendly way like this "2 hours ago". That's not what i'm looking for.
i follow you.....
"I added a new field to the river table called "updated"..."
O_O
Hmm. From your comment, I guess that's a bad thing. I'm not doing it on a production site. This is on my localhost.
Any ideas where to change the data-timestamp value?
I can change the data-timestamp, after the river has been displayed, with Ajax, but I can't find the place to change it when the river is first called.
you " added a new field to the river table called 'updated' " ?? you can ' change it with ajax but ' and you want to know how to change your view when the "river is first called " ?? ' go somewhere - deep into the elgg core code, that's where..
- Previous
- 1
- 2
- Next
You must log in to post replies.