diff options
-rwxr-xr-x | _graphics/elgg_sprites.png | bin | 27750 -> 27750 bytes | |||
-rw-r--r-- | languages/ca.php | 4 | ||||
-rw-r--r-- | languages/en.php | 4 | ||||
-rw-r--r-- | languages/es.php | 4 | ||||
-rw-r--r-- | manifest.xml | 4 | ||||
-rw-r--r-- | start.php | 102 | ||||
-rw-r--r-- | views/default/css/elements/forms.php | 23 | ||||
-rw-r--r-- | views/default/css/elements/icons.php | 10 | ||||
-rw-r--r-- | views/default/css/elements/layout.php | 2 | ||||
-rw-r--r-- | views/default/css/elements/modules.php | 12 | ||||
-rw-r--r-- | views/default/css/elements/navigation.php | 4 | ||||
-rw-r--r-- | views/default/css/elements/typography.php | 4 |
12 files changed, 124 insertions, 49 deletions
diff --git a/_graphics/elgg_sprites.png b/_graphics/elgg_sprites.png Binary files differindex 7ab44dd..d22e6b4 100755 --- a/_graphics/elgg_sprites.png +++ b/_graphics/elgg_sprites.png diff --git a/languages/ca.php b/languages/ca.php index 963f02d..d175b2c 100644 --- a/languages/ca.php +++ b/languages/ca.php @@ -2,8 +2,8 @@ $catalan = array( - 'cic_theme:landing:title' => '¡Xarxes socials del poble i per al poble!', - 'cic_theme:landing:subtitle' => 'Perquè "les eines de l\'amo mai desmontaràn la casa de l\'amo"', + 'n1_theme:landing:title' => '¡Xarxes socials del poble i per al poble!', + 'n1_theme:landing:subtitle' => 'Perquè "les eines de l\'amo mai desmontaràn la casa de l\'amo"', ); diff --git a/languages/en.php b/languages/en.php index 0c943ff..ad5de2f 100644 --- a/languages/en.php +++ b/languages/en.php @@ -2,8 +2,8 @@ $english = array( - 'cic_theme:landing:title' => '¡Social networks by the people and for the people!', - 'cic_theme:landing:subtitle' => 'Because "the master\'s tools will never dismantle the master\'s house"', + 'n1_theme:landing:title' => '¡Social networks by the people and for the people!', + 'n1_theme:landing:subtitle' => 'Because "the master\'s tools will never dismantle the master\'s house"', ); diff --git a/languages/es.php b/languages/es.php index 6a9b87f..fd23fb6 100644 --- a/languages/es.php +++ b/languages/es.php @@ -2,8 +2,8 @@ $spanish = array( - 'cic_theme:landing:title' => '¡Redes sociales del pueblo y para el pueblo!', - 'cic_theme:landing:subtitle' => 'Porque "las herramientas del amo nunca desmontarán la casa del amo"', + 'n1_theme:landing:title' => '¡Redes sociales del pueblo y para el pueblo!', + 'n1_theme:landing:subtitle' => 'Porque "las herramientas del amo nunca desmontarán la casa del amo"', ); diff --git a/manifest.xml b/manifest.xml index 48cad2d..daf419d 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8"> - <name>CIC Theme</name> + <name>N-1 Theme</name> <author>Lorea</author> <version>1.0</version> <category>theme</category> <description> Modifies your Elgg site to look and behave very much like Facebook. </description> - <website>https://github.com/lorea/cic_theme</website> + <website>https://github.com/lorea/n1_theme</website> <copyright>(C) 2011 Lorea</copyright> <license>GNU Public License version 2</license> @@ -1,34 +1,104 @@ <?php
-elgg_register_event_handler('init', 'system', 'cic_theme_init');
+elgg_register_event_handler('init', 'system', 'n1_theme_init');
-function cic_theme_init() {
+function n1_theme_init() {
elgg_unregister_menu_item('topbar','elgg_logo');
$item = new ElggMenuItem('site_logo', elgg_get_site_entity()->name, elgg_get_site_url());
elgg_register_menu_item('topbar', $item);
- elgg_register_plugin_hook_handler('register', 'menu:topbar', 'cic_theme_topbar_menu');
+ elgg_register_plugin_hook_handler('register', 'menu:topbar', 'n1_theme_topbar_menu');
- elgg_register_simplecache_view('cic_theme/landing');
- elgg_register_css('cic:landing_page', elgg_get_simplecache_url('css', 'cic_theme/landing'));
+ 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', 'cic_theme/css');
- elgg_extend_view('js/elgg', 'cic_theme/js');
- elgg_extend_view('page/elements/title', 'cic_theme/header', 0);
+ 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, 'cic_theme/landing', 0);
+ elgg_extend_view('page/layouts/'.$layout, 'n1_theme/landing', 0);
}
if (elgg_is_active_plugin('pages')) {
// pages icon url override
- elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'cic_theme_pages_icon_url_override');
+ elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'n1_theme_pages_icon_url_override');
}
}
-function cic_theme_topbar_menu($hook, $type, $returnvalue, $params){
- //var_dump($returnvalue);exit();
+function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){
+ $user = elgg_get_logged_in_user_entity();
+
+ if (elgg_is_active_plugin('groups')) {
+
+ $ia = elgg_set_ignore_access(TRUE);
+ $num_invitations = elgg_get_entities_from_relationship(array(
+ 'relationship' => 'invited',
+ 'relationship_guid' => $user->guid,
+ 'inverse_relationship' => TRUE,
+ 'limit' => 0,
+ 'count' => TRUE,
+ ));
+ elgg_set_ignore_access($ia);
+
+ if ($num_invitations) {
+ $num_invitations = elgg_view('output/url', array(
+ 'text' => "<span class=\"messages-new\">$num_invitations</span>",
+ 'href' => "groups/invitations/$user->username",
+ ));
+ }
+
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'groups',
+ 'href' => "groups/member/$user->username",
+ 'text' => elgg_view_icon('groups') . $num_invitations,
+ 'title' => elgg_echo('groups'),
+ 'priority' => 500,
+ ));
+ }
+
+ if (elgg_is_admin_logged_in()) {
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'administration',
+ 'href' => "admin",
+ 'text' => elgg_view_icon('settings'),
+ 'title' => elgg_echo('admin'),
+ 'priority' => 100,
+ 'section' => 'alt',
+ ));
+ }
+
+ if (elgg_is_active_plugin('dashboard')) {
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'dashboard',
+ 'href' => "dashboard",
+ 'text' => elgg_view_icon('home'),
+ 'title' => elgg_echo('dashboard'),
+ 'priority' => 200,
+ 'section' => 'alt',
+ ));
+ }
+
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'usersettings',
+ 'href' => "settings/user/{$user->username}",
+ 'text' => elgg_view_icon('settings-alt'),
+ 'title' => elgg_echo('settings'),
+ 'priority' => 500,
+ 'section' => 'alt',
+ ));
+
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'logout',
+ 'href' => "action/logout",
+ 'text' => elgg_echo('logout'),
+ 'title' => elgg_echo('logout'),
+ 'is_action' => TRUE,
+ 'priority' => 1000,
+ 'section' => 'alt',
+ ));
+ return $returnvalue;
}
/**
@@ -36,7 +106,7 @@ function cic_theme_topbar_menu($hook, $type, $returnvalue, $params){ *
* @return string Relative URL
*/
-function cic_theme_pages_icon_url_override($hook, $type, $returnvalue, $params) {
+function n1_theme_pages_icon_url_override($hook, $type, $returnvalue, $params) {
$entity = $params['entity'];
if (elgg_instanceof($entity, 'object', 'page_top') ||
elgg_instanceof($entity, 'object', 'page')) {
@@ -50,13 +120,13 @@ function cic_theme_pages_icon_url_override($hook, $type, $returnvalue, $params) switch ($params['size']) {
case 'topbar':
case 'tiny':
- return "mod/cic_theme/_graphics/icons/{$icon}_tiny.gif";
+ return "mod/n1_theme/_graphics/icons/{$icon}_tiny.gif";
break;
case 'small':
- return "mod/cic_theme/_graphics/icons/{$icon}_small.gif";
+ return "mod/n1_theme/_graphics/icons/{$icon}_small.gif";
break;
default:
- return "mod/cic_theme/_graphics/icons/{$icon}_lrg.gif";
+ return "mod/n1_theme/_graphics/icons/{$icon}_lrg.gif";
break;
}
}
diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php index c2cc433..0a5452b 100644 --- a/views/default/css/elements/forms.php +++ b/views/default/css/elements/forms.php @@ -291,27 +291,24 @@ input[type="radio"] { max-width: 600px; } .ui-autocomplete { - background-color: #333 ; + background-color: #f7f7f7; border: 1px solid #ccc; overflow: hidden; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; } .ui-autocomplete .ui-menu-item { padding: 0px 4px; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + font-weight: normal; +} +.ui-autocomplete .ui-menu-item:hover { + background-color: #eee; + cursor: pointer; } .ui-autocomplete .ui-menu-item:hover a { - text-decoration: none; - color: white; - text-shadow: 0 0 6px white; + color: #FF4C12; + background: none; + border: none; + border-radius: 0; } - .ui-combobox { height: 23px !important; } diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php index 142cbd2..07d1461 100644 --- a/views/default/css/elements/icons.php +++ b/views/default/css/elements/icons.php @@ -13,7 +13,7 @@ *************************************** */ .elgg-icon, .elgg-menu-item-logout a { - background: transparent url(<?php echo elgg_get_site_url(); ?>mod/cic_theme/_graphics/elgg_sprites.png) no-repeat left; + background: transparent url(<?php echo elgg_get_site_url(); ?>mod/n1_theme/_graphics/elgg_sprites.png) no-repeat left; width: 16px; height: 16px; margin: 0 2px; @@ -281,6 +281,12 @@ .elgg-icon-logout:hover, .elgg-menu-item-logout:hover a { background-position: 0 -1542px; } +.elgg-icon-groups { + background-position: 0 -1577px; +} +.elgg-icon-groups:hover { + background-position: 0 -1560px; +} .elgg-icon-group, .elgg-menu-item-group a { background-position: 0 -1560px; @@ -290,6 +296,8 @@ background-position: 0 -1578px; } + + .elgg-avatar > .elgg-icon-hover-menu { display: none; position: absolute; diff --git a/views/default/css/elements/layout.php b/views/default/css/elements/layout.php index eb934e1..570f4f8 100644 --- a/views/default/css/elements/layout.php +++ b/views/default/css/elements/layout.php @@ -76,7 +76,7 @@ body { } .elgg-page-header > .elgg-inner { position: relative; - background: transparent url(<?php echo elgg_get_site_url(); ?>mod/cic_theme/_graphics/cic_small.png) no-repeat 650px bottom; + background: transparent url(<?php echo elgg_get_site_url(); ?>mod/n1_theme/_graphics/n1_small.png) no-repeat 650px bottom; } /***** LIQUID LAYOUT *******/ diff --git a/views/default/css/elements/modules.php b/views/default/css/elements/modules.php index b05aa5c..28332bb 100644 --- a/views/default/css/elements/modules.php +++ b/views/default/css/elements/modules.php @@ -59,7 +59,7 @@ margin-bottom: 5px; } .elgg-module-popup > .elgg-head * { - color: #56A00E; + color: #d86c2c; } /* Dropdown */ @@ -89,15 +89,15 @@ /* Featured */ .elgg-module-featured { - border: 1px solid #56A00E; + border: 1px solid #333; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } .elgg-module-featured > .elgg-head { padding: 5px; - background-color: #56A00E; + background-color: #333; } .elgg-module-featured > .elgg-head * { color: white; diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index f07d951..1b08c53 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -230,7 +230,7 @@ } .elgg-menu-site-default > li > a { - color: #B3FF42; + color: #ed9239; } .elgg-menu-site > li > ul { @@ -267,7 +267,7 @@ .elgg-menu-site-more > li > a { background-color: #333; - color: #B3FF42; + color: #ed9239; -webkit-border-radius: 0; -moz-border-radius: 0; diff --git a/views/default/css/elements/typography.php b/views/default/css/elements/typography.php index 1f0f18c..f6b8549 100644 --- a/views/default/css/elements/typography.php +++ b/views/default/css/elements/typography.php @@ -40,7 +40,7 @@ body { } a { - color: #56A00E; + color: #ff4c12; } a:hover, @@ -156,7 +156,7 @@ h6 { font-size: 0.8em; } } .elgg-loud { - color: #56A00E; + color: #d86c2c; } /* *************************************** |