Hi all..
Is there any way I can add a small icon next to an entry on the Activity River?
for example:
(tiny image of Question mark etc) Chuck Norris posted a new question
I've been searching for examples but can't seem to figure it out
thanks
Martin
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.
- MartinMagi@MartinMagi
MartinMagi - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
file/views/default/river/object/file/create.php ==> if want river to say viz. ~ ~ ~> options are
(b) in file/views/default/river/object/file/create.php
to find and display 'small icon' ▒♣▒ in the river..
method (b) := every plugin's' entity/object XXX/views/default/river/object/XXX/create.php
will need the new special coding; method (b) := slightly more 'complex' (of sorts;) pieces of logic
to find, extract for display, the icon for the @then current entity/object;
but the gain will be that *all such icons are handled centrally.
both the methods will need some not trivial, not newbie,
not elgg-beginning-developers level of coding expertise.
- MartinMagi@MartinMagi
MartinMagi - 0 likes
- MartinMagi@MartinMagi
MartinMagi - 0 likes
- ura soul@tunist
ura soul - 0 likes
You must log in to post replies.Can anybody point me in the right direction how to do this? :S.. I've tried all sorts but just cant seem to do it.
like on the facebook theme, when a user creates a new page, a little page icon (pages.gif) is displayed next to where it says "user created a page etc".. I want that feature but on my own theme sort of thing..
gonna be a bit little involved, winding road.
working backwards -->
echo elgg_view ('river/elements/layout' . . .
displays the river item;
UserABC uploaded the file FileTest1 just now
File Test 1 blah.. blah.. blah.. blah..
which is called from
file/views/default/river/object/file/create.php
specified in file/actions/file/upload.php ->
add_to_river('river/object/file/create', 'create', elgg_get_logged_in_user_guid(), $file->guid);
$object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);
echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'message' => $excerpt,
));
UserABC uploaded the file ▒♣▒ FileTest1 just now
(a) via proper override @ river/elements/layout; or
oh My!
I'm sorry what I really meant was, is it possible to re route the database output via a sub space time continuem and run it parrallel to a dmenionsal hyper phase shifter to allow for the alteration of time itself and morph physical reality with a plugin?..
all that just to display some little icons...oh my!...
I thought it would be something pretty simpe.. eek!..
did you just write all that? :O wow.. and on that basis I am going to try it :) Thank You for the code and for this, even if I don't manage to get it working at least I can use the snippet to try and understand how it works and disect it. I'm supprised there isnt' a plugin to do this already
but my idea was basically
such and such created a new page (page icon)
such and such asked a new question (question icon)
such and such posted a new project (project icon)
etc, that way the different types of activity are easily recognisabale on the river wall by their icon associations as well sort of thing.
I'm going to go and have a play around now with the code you posted and see what I can create... Thanks for posting this Dhrup... VERY much appreciated.
M
on testing I managed to acheive "A result" by using the river folder from the facebook theme (thank you it's only for testing purposes etc) and just seeing how it affected, what it was doing etc..
it displays now, pages, and icons of things which have been uploaded.. but still want to figure out how to add particular items to all the various different types of activity.. soo, going to go and play with the code you wrote now and keep popping back to re read etc..
Thanks again
M
i did this with elgg 1.7 using only CSS.. but 1.8 has no unique CSS classes for river entries per type of activity.. so you could easily add 1 icon for all entries with CSS.. but not successfuly add different ones for videos, photos etc.
so an alternate /similar way of doing this is to just add a css class to each of the entries and then add the icons via CSS. at least that way you can change the appearance later from just one CSS file.