summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-10-21 12:50:18 +0200
committerSem <sembrestels@riseup.net>2012-10-21 12:50:18 +0200
commit1ad82d4657bb4ce678f437f135bae2803bb80d8e (patch)
tree56f2244ba07ff19d84a52e853f7322f9de773112
parent9117f53b1f77ee25568b809fc038453dc630f9b3 (diff)
parent832a0972233142dc069a56fd836506db9d88003a (diff)
downloadsaravea_theme-1ad82d4657bb4ce678f437f135bae2803bb80d8e.tar.gz
saravea_theme-1ad82d4657bb4ce678f437f135bae2803bb80d8e.tar.bz2
Merge branch 'master' of gitorious.org:lorea/n1_theme
-rw-r--r--index.php26
-rw-r--r--start.php14
-rw-r--r--views/default/n1_theme/header.php11
-rw-r--r--views/default/n1_theme/landing.php2
4 files changed, 20 insertions, 33 deletions
diff --git a/index.php b/index.php
deleted file mode 100644
index 0716540..0000000
--- a/index.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Elgg index page for web-based applications
- *
- * @package Elgg
- * @subpackage Core
- */
-
-if (elgg_is_logged_in()) {
- forward('activity');
-}
-
-elgg_load_css('n1:landing_page');
-
-$content = elgg_view('n1_theme/landing');
-$content .= elgg_view_title(elgg_echo('content:latest'));
-$content .= elgg_list_river();
-
-$login_box = elgg_view('core/account/login_box');
-
-$params = array(
- 'content' => $content,
- 'sidebar' => $login_box
-);
-$body = elgg_view_layout('one_sidebar', $params);
-echo elgg_view_page(null, $body);
diff --git a/start.php b/start.php
index 7766f5f..43d175f 100644
--- a/start.php
+++ b/start.php
@@ -8,13 +8,18 @@ function n1_theme_init() {
elgg_register_menu_item('topbar', $item);
elgg_register_plugin_hook_handler('register', 'menu:topbar', 'n1_theme_topbar_menu');
- elgg_register_plugin_hook_handler('index', 'system', 'n1_theme_front_page');
-
elgg_register_simplecache_view('n1_theme/landing');
elgg_register_css('n1:landing_page', elgg_get_simplecache_url('css', 'n1_theme/landing'));
elgg_extend_view('css/elgg', 'n1_theme/css');
elgg_extend_view('js/elgg', 'n1_theme/js');
+ elgg_extend_view('page/elements/title', 'n1_theme/header', 0);
+ // custom index widgets
+ foreach(array("custom_index", "edit_widgets", "index_2rbhh", "index_2rhhb",
+ "index", "index_2rbms", "index_2rmsb",
+ "index_1rsss", "index_2rbsm", "index_2rsmb") as $layout) {
+ elgg_extend_view('page/layouts/'.$layout, 'n1_theme/landing', 0);
+ }
if (elgg_is_active_plugin('pages')) {
// pages icon url override
@@ -26,11 +31,6 @@ function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){
//var_dump($returnvalue);exit();
}
-function n1_theme_front_page($hook, $type, $returnvalue, $params) {
- include(elgg_get_plugins_path() . 'n1_theme/index.php');
- return true;
-}
-
/**
* Override the default entity icon for pages and pads
*
diff --git a/views/default/n1_theme/header.php b/views/default/n1_theme/header.php
new file mode 100644
index 0000000..5939df8
--- /dev/null
+++ b/views/default/n1_theme/header.php
@@ -0,0 +1,11 @@
+<?php
+
+$context = elgg_get_context();
+
+$title = $vars['title'];
+
+if ($context === 'main' && $title == elgg_echo('content:latest')) {
+
+ echo elgg_view('n1_theme/landing');
+
+}
diff --git a/views/default/n1_theme/landing.php b/views/default/n1_theme/landing.php
index 83132a9..132b275 100644
--- a/views/default/n1_theme/landing.php
+++ b/views/default/n1_theme/landing.php
@@ -1,5 +1,7 @@
<?php
+elgg_load_css('n1:landing_page');
+
$title = elgg_echo('n1_theme:landing:title');
$subtitle = elgg_echo('n1_theme:landing:subtitle');