We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Minimize the content in newsfeed | Forum

Saiju43
Saiju43 Apr 10 '14
Hi guys,

How can I Minimize the content in newsfeed, some gamers are playing in my site like adding very large content in status update. any one help me to put readmore button in newsfeed. or any suggestion please

Alia Team
Alia Apr 15 '14
Saiju, you can limit number of characters to be displayed within the feed item in : ow_plugins/newsfeed/components/feed_item.php

$result = str_replace($search, $values, $content);
$result = preg_replace('/\[ph\:\w+\]/', '', $result);
$result =substr($result, 0, 200);

Where 200 is amount of characters to be displayed. Changes will effect ALL feed items.

Please note that this will effect item view pages as well . Item view page is the page that opens up when you click on date next to newsfeed item.


To show limited number of character on main feed BUT to show FULL text on item view page you will need to add special condition within the same feed_item.php file telling not to strip the $result for item view pages.

Saiju43
Saiju43 Apr 15 '14
Aliia, Thank you very much for the reply,

limiting the characters working fine for me... 


I am not clear about this part

"within the same feed_item.php file telling not to strip the $result for item view pages." can you please explain me how to do it.

I dont have any knowledge in php.


Is there any way to add view more button there.