Adding additional widget to default riverdashboard

This is the most simple way to add widget in your default riverdashboard.

mod/riverdashboard/views/default/riverdashboard/newestmembers.php

duplicate that file

mod/riverdashboard/views/default/riverdashboard/latestgroups.php

remove all the content of the latestgroups.php

replace to :

 

<?php

$groups = elgg_list_entities(array(type => 'group', 'limit' => 12, 'full_view' => FALSE, 'view_type_toggle' => FALSE, 'pagination' => TRUE));

?>


<div class="sidebarBox">

<h3><?php echo elgg_echo('riverdashboard:newestgroups') ?></h3>

<div class="membersWrapper"><br />

<?php 

echo elgg_view_layout('container',$groups);

?>

<div class="clearfloat"></div>

</div>

</div>

thats all for the latestgroups.php

 

edit your : mod/riverdashboard/languages/en.php

find : 'riverdashboard:recentmembers' => 'Recent members',

add after : 'riverdashboard:newestgroups' => 'Recent groups',

last but not least

modify : mod/riverdashboard/index.php

find : //set a view to display newest members

$area1 .= elgg_view("riverdashboard/newestmembers");

add after : 

     //set a view to display recent groups

$area1 .= elgg_view("riverdashboard/newestgroups");

it works on my box but im not sure if it is the right becoz im not elgg expert

comments and recommendation are most welcome.

 

 

 

 

 

 

Form and related plugins

Form and related plugins

User-generated content, flexible user and group profiles, registration forms, custom file forms