aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/views.php2
-rw-r--r--mod/custom_index/views/default/custom_index/css.php4
-rw-r--r--mod/custom_index/views/default/page/layouts/custom_index.php18
3 files changed, 15 insertions, 9 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 89ed98bdc..070b59e37 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1196,7 +1196,7 @@ function elgg_view_image_block($image, $body, $vars = array()) {
* @since 1.8.0
*/
function elgg_view_module($type, $title, $body, $vars = array()) {
- $vars['class'] .= " elgg-module-$type"; //@todo this will probably cause errors?
+ $vars['class'] .= " elgg-module-$type";
$vars['title'] = $title;
$vars['body'] = $body;
return elgg_view('page/components/module', $vars);
diff --git a/mod/custom_index/views/default/custom_index/css.php b/mod/custom_index/views/default/custom_index/css.php
index ef7b0a39c..841b66761 100644
--- a/mod/custom_index/views/default/custom_index/css.php
+++ b/mod/custom_index/views/default/custom_index/css.php
@@ -11,12 +11,12 @@
.custom-index {
padding: 10px 0;
}
-.custom-index .elgg-module-featured {
+.elgg-module-front {
-webkit-box-shadow: 1px 1px 5px #CCC;
-moz-box-shadow: 1px 1px 5px #CCC;
box-shadow: 1px 1px 5px #CCC;
}
-.custom-index .elgg-module-featured:hover {
+.elgg-module-front:hover {
-webkit-box-shadow: 1px 1px 6px #AAA;
-moz-box-shadow: 1px 1px 6px #AAA;
box-shadow: 1px 1px 6px #AAA;
diff --git a/mod/custom_index/views/default/page/layouts/custom_index.php b/mod/custom_index/views/default/page/layouts/custom_index.php
index 6b3f6d739..46efa11e2 100644
--- a/mod/custom_index/views/default/page/layouts/custom_index.php
+++ b/mod/custom_index/views/default/page/layouts/custom_index.php
@@ -6,6 +6,9 @@
* Whatever you put in this view will appear on the front page of your site.
*
*/
+
+$mod_params = array('class' => 'elgg-module-featured');
+
?>
<div class="custom-index elgg-main elgg-grid clearfix">
@@ -22,19 +25,22 @@ if (elgg_is_logged_in()) {
} else {
$top_box = $vars['login'];
}
-echo elgg_view_module('featured', '', $top_box, array('header' => false));
+echo elgg_view_module('front', '', $top_box, array(
+ 'header' => false,
+ 'class' => 'elgg-module-featured',
+));
// a view for plugins to extend
echo elgg_view("index/lefthandside");
// files
if (elgg_is_active_plugin('file')) {
- echo elgg_view_module('featured', elgg_echo("custom:files"), $vars['files']);
+ echo elgg_view_module('front', elgg_echo("custom:files"), $vars['files'], $mod_params);
}
// groups
if (elgg_is_active_plugin('groups')) {
- echo elgg_view_module('featured', elgg_echo("custom:groups"), $vars['groups']);
+ echo elgg_view_module('front', elgg_echo("custom:groups"), $vars['groups'], $mod_params);
}
?>
</div>
@@ -48,16 +54,16 @@ if (elgg_is_active_plugin('groups')) {
echo elgg_view("index/righthandside");
// files
-echo elgg_view_module('featured', elgg_echo("custom:members"), $vars['members']);
+echo elgg_view_module('front', elgg_echo("custom:members"), $vars['members'], $mod_params);
// groups
if (elgg_is_active_plugin('blog')) {
- echo elgg_view_module('featured', elgg_echo("custom:blogs"), $vars['blogs']);
+ echo elgg_view_module('front', elgg_echo("custom:blogs"), $vars['blogs'], $mod_params);
}
// files
if (elgg_is_active_plugin('bookmarks')) {
- echo elgg_view_module('featured', elgg_echo("custom:bookmarks"), $vars['bookmarks']);
+ echo elgg_view_module('front', elgg_echo("custom:bookmarks"), $vars['bookmarks'], $mod_params);
}
?>
</div>