Where exactly you want to show this? In activity feed or user widgets?
You can set the limit by passing limit parameter as 5 in elgg_list_river() API
<?php function myplugin_set_river_limit($hook, $type, $value, $params) { // like adding ?limit=6 to the URL set_input('limit', 6); } // execute just before the river page resource view is rendered. elgg_register_plugin_hook_handler('view_vars', 'resources/river', 'myplugin_set_river_limit');
Try this out. For Elgg 2.0+
extend the sidebar view:
elgg_extend_view('page/elements/sidebar', 'myplugin/suggested_friends');
Then in your myplugin/suggested_friends view you can output the suggested friends stuff. If you're using my suggested friends plugin I believe there are some convenience functions (possibly even just a view you can call, I can't remember, it's been a while).
We need something more.
Your page is showing a white page, and to me that means you sever config is not displaying error messages to the screen, but it could be 'a lot'. Check your error log and post the error to see what's going wrong.
[Fri Mar 11 05:13:06 2016] [error] [client 94.23.204.183] File does not exist: /home/dacari/public_html/404.shtml
[Fri Mar 11 05:13:06 2016] [error] [client 94.23.204.183] File does not exist: /home/dacari/public_html/feeds
[Fri Mar 11 05:06:43 2016] [error] [client 178.150.15.220] File does not exist: /home/dacari/public_html/404.shtml, referer: http://dacari.net/index.php
[Fri Mar 11 05:06:43 2016] [error] [client 178.150.15.220] File does not exist: /home/dacari/public_html/index.php, referer: http://dacari.net/index.php
[Fri Mar 11 05:06:42 2016] [error] [client 178.150.15.220] File does not exist: /home/dacari/public_html/404.shtml, referer: http://dacari.net/forum/index.php
[Fri Mar 11 05:06:42 2016] [error] [client 178.150.15.220] File does not exist: /home/dacari/public_html/forum, referer: http://dacari.net/forum/index.php
[Fri Mar 11 05:06:42 2016] [error] [client 178.150.15.220] File does not exist: /home/dacari/public_html/404.shtml, referer: http://dacari.net/forum/index.php
[Fri Mar 11 05:06:42 2016] [error] [client 178.150.15.220] File does not exist: /home/dacari/public_html/forum, referer: http://dacari.net/forum/index.php
[Fri Mar 11 05:05:36 2016] [error] [client 157.55.39.149] File does not exist: /home/dacari/public_html/404.shtml
[Fri Mar 11 05:05:36 2016] [error] [client 157.55.39.149] File does not exist: /home/dacari/public_html/robots.txt
[Fri Mar 11 04:57:28 2016] [error] [client 198.252.64.168] File does not exist: /home/dacari/public_html/ucuconnection.com/404.shtml
[Fri Mar 11 04:57:28 2016] [error] [client 198.252.64.168] File does not exist: /home/dacari/public_html/ucuconnection.com/rewrite.php
[Fri Mar 11 04:57:23 2016] [error] [client 23.229.34.151] File does not exist: /home/dacari/public_html/ucuconnection.com/404.shtml, referer: http://ucuconnection.com/
[Fri Mar 11 04:57:23 2016] [error] [client 23.229.34.151] File does not exist: /home/dacari/public_html/ucuconnection.com/uservalidationbyemail, referer: http://ucuconnection.com/
[Fri Mar 11 04:57:13 2016] [error] [client 158.222.10.174] File does not exist: /home/dacari/public_html/ucuconnection.com/404.shtml, referer: http://ucuconnection.com/
[Fri Mar 11 04:57:13 2016] [error] [client 158.222.10.174] File does not exist: /home/dacari/public_html/ucuconnection.com/uservalidationbyemail, referer: http://ucuconnection.com/
[Fri Mar 11 04:56:43 2016] [error] [client 94.23.51.20] File does not exist: /home/dacari/public_html/ucuconnection.com/404.shtml, referer: http://ucuconnection.com/
[Fri Mar 11 04:56:43 2016] [error] [client 94.23.51.20] File does not exist: /home/dacari/public_html/ucuconnection.com/uservalidationbyemail, referer: http://ucuconnection.com/
[Fri Mar 11 04:56:26 2016] [error] [client 198.23.202.238] File does not exist: /home/dacari/public_html/ucuconnection.com/404.shtml, referer: http://ucuconnection.com/
[Fri Mar 11 04:56:26 2016] [error] [client 198.23.202.238] File does not exist: /home/dacari/public_html/ucuconnection.com/register, referer: http://ucuconnection.com/
[Fri Mar 11 04:55:07 2016] [error] [client 118.170.32.202] File does not exist: /home/dacari/public_html/ucuconnection.com/404.shtml, referer: http://ucuconnection.com/
[Fri Mar 11 04:55:07 2016] [error] [client 118.170.32.202] File does not exist: /home/dacari/public_html/ucuconnection.com/activity, referer: http://ucuconnection.com/
[Fri Mar 11 04:53:34 2016] [error] [client 173.234.235.152] File does not exist: /home/dacari/public_html/ucuconnection.com/404.shtml, referer: http://ucuconnection.com/
[Fri Mar 11 04:53:34 2016] [error] [client 173.234.235.152] File doe
Possibly something with the rewrite rules is not working correctly. This could be due to mod_rewrite of Apache not working correctly or something is not right with the .htaccess file of Elgg. You might want to read about possible issues that can occur during installation at http://learn.elgg.org/en/2.0/intro/install.html#troubleshooting.
It's slightly different on Elgg 1.12 (might work on previous versions but I've not checked) and Elgg 2.0. On Elgg 2.0 it's easier.
On Elgg 2.0 you only need to override a single view. Either do it witin a little customization plugin or add the modified view to another suitable plugin (e.g. your theme plugin).
For a separate plugin you would have to add a manifest.xml to the plugin folder (check out one of the core plugins for reference).
The start.php file must exist for the plugin to work but the file itself can be left empty (or add <?php in the first line).
The modified view must be saved as mod/river_remove_tabs/views/default/resources/river.php (assuming here that you name your plugin "river_remove_tabs"). The content of river.php is
<?php
/**
* Main activity stream list page
*/$options = array(
'distinct' => false
);$type = preg_replace('[\W]', '', get_input('type', 'all'));
$subtype = preg_replace('[\W]', '', get_input('subtype', ''));
if ($subtype) {
$selector = "type=$type&subtype=$subtype";
} else {
$selector = "type=$type";
}if ($type != 'all') {
$options['type'] = $type;
if ($subtype) {
$options['subtype'] = $subtype;
}
}$title = elgg_echo('river:friends');
$options['relationship_guid'] = elgg_get_logged_in_user_guid();
$options['relationship'] = 'friend';$activity = elgg_list_river($options);
if (!$activity) {
$activity = elgg_echo('river:none');
}$content = elgg_view('core/river/filter', array('selector' => $selector));
$sidebar = elgg_view('core/river/sidebar');
$params = array(
'title' => $title,
'content' => $content . $activity,
'sidebar' => $sidebar,
'filter' => false,
'class' => 'elgg-river-layout',
);$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
That's all for Elgg 2.0.
On Elgg 1.12 the above river.php file must be placed at mod/river_remove_tabs/pagesriver.php instead. Additionally the start.php file has some content:
<?php
elgg_register_event_handler('init', 'system', 'river_remove_tabs_init');
function river_remove_tabs_init() {
elgg_unregister_page_handler('activity');
elgg_register_page_handler('activity', 'my_river_page_handler');
}function my_river_page_handler($page) {
elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
$base = elgg_get_plugins_path() . 'river_remove_tabs/pages';
require "$base/river.php";
return true;
}
(I hope I haven't missed some faults in the code of start.php as I've to admit that I've not tested it on Elgg 1.X).
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.