By JDev on Tuesday, 19 January 2016
Posted in Technical Issues
Replies 7
Likes 0
Views 400
Votes 0
We're using Shika (LMS) from techjoomla. I want to improve stream output and it seems that the features for that is via apps, using this documentation section http://stackideas.com/docs/easysocial/developers/stream/stream-output correct?

Do I have to make an app per item I want to create output for there are courses, lessons, etc. or can I just make one app and handle it all there?

I need to improve how these render on the stream on our site as their team already handles creating the stream content and putting it on the site, but it doesn't appear as nicely as other stream items do that are built in and shipped with easy social.

Just trying to understand the documentation and how I can achieve what I want. Basically when a new course is added I want to use the course picture, description, and etc. and show a nice stream item instead of just plain text.
You can use a single app to process / format contents for multiple types of stream You should take a look at the onPrepareStream method for most of the apps to get an idea of how this works.
·
Tuesday, 19 January 2016 10:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks.

Any app specifically I can reference to see nice formatted HTML for stream content? And also, can I just leave everything else blank or do I need empty files in each respective area/folder and empty classes?

I'm still not 100% sure how to mock up a stream enhancing only app...I got the sample app but I don't need the widget or the views or anything...so what do I do with them?
·
Tuesday, 19 January 2016 21:22
·
0 Likes
·
0 Votes
·
0 Comments
·
There are a few apps which we released and you should take a look at the blog (easyblog), discuss (easydiscuss) as well as the tasks app
·
Tuesday, 19 January 2016 22:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you please provide me exact files to reference? There's many files and folders, and several locations for "tasks".

I'm looking for a good example to do stream improvements on content only. Also, does that mean that every stream item that get's rendered could result in a query if i'm doing DB work so that could be 100 stream items = 100 extra queries....?

All I want to do is add a nice graphic and description when Techjoomla Shika adds stream items for courses.
·
Wednesday, 20 January 2016 07:03
·
0 Likes
·
0 Votes
·
0 Comments
·
The main file is in /media/com_easysocial/apps/user/tasks/tasks.php . From there, you should do your own code forensics
·
Wednesday, 20 January 2016 10:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Sure.

But I'm still trying to understand this logic,

When a stream item is created, we can't include the custom HTML content. We have to do this when the "app" processes the stream item, but at this stage if I have to do a DB query to get DB data that puts we at a disadvantage if my 100 stream items now require 100 queries to render....right?

I want to show image+description in my stream item for another component, but I don't want to add crazy overhead to rendering my stream. Can you clarify the above?
·
Thursday, 21 January 2016 02:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Well, this is where you need to consider the following:

1. When an item action occurs in your custom extension.
2. Call EasySocial's library to save an item into the stream.
3. In step #2, pass in the parameters of your object.
4. In your app, get these items from the params before generating the html for the stream.

P/S: If you are going to do this, there is a lot of other things that you need to cater for especially when an object is modified. You need to alter the properties in the stream and that adds an extra overhead.

We realized that by caching objects this way, it doesn't really give any extra benefits apart from running lesser queries. Running more queries does not mean it's an overhead to the server. Running complex queries are overheads
·
Thursday, 21 January 2016 12:25
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post