By Sunny on Tuesday, 17 November 2015
Posted in Technical Issues
Replies 5
Likes 0
Views 613
Votes 0
Hi,

In Easysocial Stream module in default.php the complete stream is echoed, the code is:

<?php echo $stream->html();?>

Now i'm trying to echo only the title (as stream module is appearing on home page in a small module, i dont want to show the whole stream content)

So i tried
<?php echo $stream->title;?>

But its not working, Can anyone please guide me on this.

regards
Also wanted to know that is mini stream?
as i noticed that it has been mentioned in stream (wireframe)
$stream->display == SOCIAL_STREAM_DISPLAY_MINI
regards
·
Wednesday, 18 November 2015 15:58
·
0 Likes
·
0 Votes
·
0 Comments
·
The main reasons for having a title only stream module is two fold:

1. People keep sharing pictures and it appears in home page stream module, which increases the page size & loading time (My home page is a teaser page with collection of modules e.g latest blogs, latest stream items, latest discussions, latest reviews etc..)
Currently i'm hiding with css, but as the images are still loaded the page size becomes very large
.mod-es-stream .es-stream-meta-footer{display:none;}
div#fd.mod-es-stream.es .es-stream-content{display:none;}
.mod-es-stream .stream-badges{display:none;}
.mod-es-stream .es-action-wrap{display:none;}


2. The space available on home page is limited, by having content the stream module become too long.

hope i'm making some sense
·
Wednesday, 18 November 2015 16:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Sunny,

I am really sorry for the delay of this reply. Please find my answers from your inquiries below.

How To Echo Only Stream Title In ES Stream Module

$stream->html() is actually rendering the following file here, /components/com_easysocial/themes/wireframe/stream/default.php where it will then use foreach method to echo individual stream inside /components/com_easysocial/themes/wireframe/stream/default.item.php. From there you can find the title of the stream being generated there, $stream->title at line 146. In order for you to echo only stream title you need to get each stream item and only after that you will be able to echo the title.

For more info you can refer to the stream library at /administrator/components/com_easysocial/includes/stream/stream.php at method @html.

Also wanted to know that is mini stream?

Mini stream is a stream where it will only display certain information such as user A joined the group B and other user will not have the ability to like or comment on the stream, http://screencast.com/t/jGWfppwe .

Hope these help.
·
Wednesday, 18 November 2015 17:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,
$stream->html() is actually rendering the following file here, /components/com_easysocial/themes/wireframe/stream/default.php where it will then use foreach method to echo individual stream inside /components/com_easysocial/themes/wireframe/stream/default.item.php. From there you can find the title of the stream being generated there, $stream->title at line 146. In order for you to echo only stream title you need to get each stream item and only after that you will be able to echo the title.

For more info you can refer to the stream library at /administrator/components/com_easysocial/includes/stream/stream.php at method @html.


Its complicated i guess, way above my skill level, by any chance that you can give additional controls in the stream module administrator page.
Although i know you answer, but in harm in asking
·
Wednesday, 18 November 2015 17:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sunny,

I'm sorry but it is not possible to echo only the title. This is because we can't control the output of $stream->html() since this is used to display all the stream items.
·
Wednesday, 18 November 2015 17:37
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post