diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-03-19 03:30:40 +0300 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-03-19 03:30:40 +0300 |
commit | 83ffd7749e726b91f38abc31fb81c20f61054ab2 (patch) | |
tree | d6c74c5aa39651845907c98f8bf9d4f9912f1c55 | |
parent | 55d8a3ad0bcb68a5c0da0c0b81c873d3d317b41e (diff) |
- new login screen design (thanks wordpress 2.5!!)
- misc changes
- plugins can now be loaded by default all the time (ex. Home, AdminHome, PluginsAdmin)
- improved admin design
24 files changed, 422 insertions, 140 deletions
diff --git a/lang/en.php b/lang/en.php index ffc7e0e69e..27c0518932 100644 --- a/lang/en.php +++ b/lang/en.php @@ -1,5 +1,12 @@ <?php $translations = array( 'General_Unknown' => 'Unknown', + 'General_Required' => '%s required', + + 'Login_LoginPasswordNotCorrect' => 'login & password not correct', + 'Login_Go' => 'Go!', + 'Login_login' => 'login:', + 'Login_password' => 'pass:', + ); ?> diff --git a/lang/fr.php b/lang/fr.php new file mode 100644 index 0000000000..377734a900 --- /dev/null +++ b/lang/fr.php @@ -0,0 +1,12 @@ +<?php +$translations = array( + 'General_Unknown' => 'Inconnu', + 'General_Required' => '%s requis', + + 'Login_LoginPasswordNotCorrect' => 'login & mot de passe non valides', + 'Login_Go' => 'Go!', + 'Login_login' => 'login:', + 'Login_password' => 'pass:', + +); +?> diff --git a/misc/generateVisits.php b/misc/generateVisits.php index 5d28d7d609..fb72d7c9c6 100644 --- a/misc/generateVisits.php +++ b/misc/generateVisits.php @@ -45,9 +45,14 @@ Piwik_PluginsManager::getInstance()->unloadPlugin('Provider'); Piwik_PluginsManager::getInstance()->doNotLoadPlugins(); $generator = new Piwik_LogStats_Generator; -$generator->setMaximumUrlDepth(12); -$generator->disableProfiler(); +$generator->setMaximumUrlDepth(3); +//$generator->disableProfiler(); $generator->setIdSite( $idSite = 1 ); +$minVisits = 8; +$maxVisits = 9; +$nbActions = 15; +$daysToCompute = 1; + $nbActionsTotal = 0;
//$generator->emptyAllLogTables(); @@ -59,17 +64,12 @@ $t = new Piwik_Timer; * Generate visits / actions for the last 31 days */ -$daysToCompute = 1; -
// do NOT edit this line
$startTime = time() - ($daysToCompute-1)*86400; while($startTime <= time()) { - $visits = rand(5,6);
- $actions=10; -// $actions = 10; -// $visits = rand(10,30); -// $actions = 5; + $visits = rand($minVisits,$maxVisits);
+ $actions=$nbActions; $generator->setTimestampToUse($startTime);
@@ -82,6 +82,7 @@ while($startTime <= time()) print("Generated $visits visits and $actionsPerVisit actions per visit for the ".date("Y-m-d", $startTime)."<br>\n"); $startTime+=86400; $nbActionsTotal+=$nbActionsTotalThisDay; + flush(); } diff --git a/misc/openads_integration/openads_piwik_plugin.php b/misc/openads_integration/openads_piwik_plugin.php index bd956c5db4..324a0cc34c 100644 --- a/misc/openads_integration/openads_piwik_plugin.php +++ b/misc/openads_integration/openads_piwik_plugin.php @@ -209,7 +209,8 @@ class Piwik_Openads_Plugin */ function getCurrentlyAuthenticatedUserLogin() { - phpAds_getUserID() + //TODO + phpAds_getUserID(); } /** diff --git a/modules/FrontController.php b/modules/FrontController.php index f77d8ae978..0f7fccc115 100644 --- a/modules/FrontController.php +++ b/modules/FrontController.php @@ -85,6 +85,14 @@ class Piwik_FrontController throw new Exception("Invalid module name '$module'"); } + + // check that the plugin is enabled + if( ! Piwik_PluginsManager::getInstance()->isPluginEnabled( $module )) + { + throw new Exception_PluginDeactivated($module); + } + + $controllerClassName = "Piwik_".$module."_Controller"; if(!class_exists($controllerClassName)) @@ -98,12 +106,6 @@ class Piwik_FrontController require_once $moduleController; } - // check that the plugin is enabled - if( ! Piwik_PluginsManager::getInstance()->isPluginEnabled( $module )) - { - throw new Exception_PluginDeactivated($module); - } - $controller = new $controllerClassName; if($action === false) @@ -282,10 +284,6 @@ class Piwik_FrontController Piwik::prefixTable('log_profiling'), ); - //Piwik::dropTables($doNotDrop); - //Piwik::createTables(); - //Piwik_PluginsManager::getInstance()->installPlugins(); - // Setup the auth object Piwik_PostEvent('FrontController.authSetCredentials'); @@ -293,7 +291,10 @@ class Piwik_FrontController $authAdapter = Zend_Registry::get('auth'); } catch(Exception $e){ - throw new Exception("Object 'auth' cannot be found in the Registry. Maybe the Login plugin is not enabled?"); + throw new Exception("Object 'auth' cannot be found in the Registry. Maybe the Login plugin is not enabled? + <br>You can enable the plugin by adding:<br> + <code>Plugins[] = Login</code><br> + under the <code>[Plugins]</code> section in your config/config.inc.php"); } // Perform the authentication query, saving the result diff --git a/modules/LogStats.php b/modules/LogStats.php index 656a99fea3..8cbadc50e4 100644 --- a/modules/LogStats.php +++ b/modules/LogStats.php @@ -93,6 +93,7 @@ class Piwik_LogStats if(is_array($pluginsLogStats) && count($pluginsLogStats) != 0) { + Piwik_PluginsManager::getInstance()->doNotLoadAlwaysActivatedPlugins(); Piwik_PluginsManager::getInstance()->setPluginsToLoad( $pluginsLogStats['Plugins_LogStats'] ); } } catch(Exception $e) { diff --git a/modules/Menu.php b/modules/Menu.php index a36797f482..84e06b5a70 100644 --- a/modules/Menu.php +++ b/modules/Menu.php @@ -58,7 +58,10 @@ function Piwik_RenameMenuEntry($mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed) { global $mainMenu; - $save = $mainMenu[$mainMenuOriginal][$subMenuOriginal]; - unset($mainMenu[$mainMenuOriginal][$subMenuOriginal]); - $mainMenu[$mainMenuRenamed][$subMenuRenamed] = $save; + if(isset($mainMenu[$mainMenuOriginal][$subMenuOriginal])) + { + $save = $mainMenu[$mainMenuOriginal][$subMenuOriginal]; + unset($mainMenu[$mainMenuOriginal][$subMenuOriginal]); + $mainMenu[$mainMenuRenamed][$subMenuRenamed] = $save; + } } diff --git a/modules/Piwik.php b/modules/Piwik.php index a3466adc7c..e37b626938 100755 --- a/modules/Piwik.php +++ b/modules/Piwik.php @@ -450,42 +450,42 @@ class Piwik ", 'log_visit' => "CREATE TABLE {$prefixTables}log_visit ( - idvisit INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, - idsite INTEGER(10) UNSIGNED NOT NULL, - visitor_localtime TIME NOT NULL, - visitor_idcookie CHAR(32) NOT NULL, - visitor_returning TINYINT(1) NOT NULL, - visit_first_action_time DATETIME NOT NULL, - visit_last_action_time DATETIME NOT NULL, - visit_server_date DATE NOT NULL, - visit_exit_idaction INTEGER(11) NOT NULL, - visit_entry_idaction INTEGER(11) NOT NULL, - visit_total_actions SMALLINT(5) UNSIGNED NOT NULL, - visit_total_time SMALLINT(5) UNSIGNED NOT NULL, - referer_type INTEGER UNSIGNED NULL, - referer_name VARCHAR(70) NULL, - referer_url TEXT NOT NULL, - referer_keyword VARCHAR(255) NULL, - config_md5config CHAR(32) NOT NULL, - config_os CHAR(3) NOT NULL, - config_browser_name VARCHAR(10) NOT NULL, - config_browser_version VARCHAR(20) NOT NULL, - config_resolution VARCHAR(9) NOT NULL, - config_color_depth TINYINT(2) UNSIGNED NOT NULL, - config_pdf TINYINT(1) NOT NULL, - config_flash TINYINT(1) NOT NULL, - config_java TINYINT(1) NOT NULL, - config_director TINYINT(1) NOT NULL, - config_quicktime TINYINT(1) NOT NULL, - config_realplayer TINYINT(1) NOT NULL, - config_windowsmedia TINYINT(1) NOT NULL, - config_cookie TINYINT(1) NOT NULL, - location_ip BIGINT(11) NOT NULL, - location_browser_lang VARCHAR(20) NOT NULL, - location_country CHAR(3) NOT NULL, - location_continent CHAR(3) NOT NULL, - PRIMARY KEY(idvisit) -) + idvisit INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + idsite INTEGER(10) UNSIGNED NOT NULL, + visitor_localtime TIME NOT NULL, + visitor_idcookie CHAR(32) NOT NULL, + visitor_returning TINYINT(1) NOT NULL, + visit_first_action_time DATETIME NOT NULL, + visit_last_action_time DATETIME NOT NULL, + visit_server_date DATE NOT NULL, + visit_exit_idaction INTEGER(11) NOT NULL, + visit_entry_idaction INTEGER(11) NOT NULL, + visit_total_actions SMALLINT(5) UNSIGNED NOT NULL, + visit_total_time SMALLINT(5) UNSIGNED NOT NULL, + referer_type INTEGER UNSIGNED NULL, + referer_name VARCHAR(70) NULL, + referer_url TEXT NOT NULL, + referer_keyword VARCHAR(255) NULL, + config_md5config CHAR(32) NOT NULL, + config_os CHAR(3) NOT NULL, + config_browser_name VARCHAR(10) NOT NULL, + config_browser_version VARCHAR(20) NOT NULL, + config_resolution VARCHAR(9) NOT NULL, + config_color_depth TINYINT(2) UNSIGNED NOT NULL, + config_pdf TINYINT(1) NOT NULL, + config_flash TINYINT(1) NOT NULL, + config_java TINYINT(1) NOT NULL, + config_director TINYINT(1) NOT NULL, + config_quicktime TINYINT(1) NOT NULL, + config_realplayer TINYINT(1) NOT NULL, + config_windowsmedia TINYINT(1) NOT NULL, + config_cookie TINYINT(1) NOT NULL, + location_ip BIGINT(11) NOT NULL, + location_browser_lang VARCHAR(20) NOT NULL, + location_country CHAR(3) NOT NULL, + location_continent CHAR(3) NOT NULL, + PRIMARY KEY(idvisit) + ) ", 'log_link_visit_action' => "CREATE TABLE {$prefixTables}log_link_visit_action ( @@ -519,16 +519,16 @@ class Piwik ) ", 'archive_blob' => "CREATE TABLE {$prefixTables}archive_blob ( - idarchive INTEGER UNSIGNED NOT NULL, - name VARCHAR(255) NOT NULL, - idsite INTEGER UNSIGNED NULL, - date1 DATE NULL, - date2 DATE NULL, - period TINYINT UNSIGNED NULL, - ts_archived DATETIME NULL, - value BLOB NULL, - PRIMARY KEY(idarchive, name) -) + idarchive INTEGER UNSIGNED NOT NULL, + name VARCHAR(255) NOT NULL, + idsite INTEGER UNSIGNED NULL, + date1 DATE NULL, + date2 DATE NULL, + period TINYINT UNSIGNED NULL, + ts_archived DATETIME NULL, + value BLOB NULL, + PRIMARY KEY(idarchive, name) + ) ", ); return $tables; @@ -898,6 +898,10 @@ class Piwik $db->query( $tableSql ); } } + + $queries = array( + + ); } static public function install() diff --git a/modules/PluginsManager.php b/modules/PluginsManager.php index 87cf165919..0f1a69eca7 100644 --- a/modules/PluginsManager.php +++ b/modules/PluginsManager.php @@ -50,6 +50,12 @@ class Piwik_PluginsManager protected $doLoadPlugins = true; protected $languageToLoad = null; protected $loadedPlugins = array(); + + protected $doLoadAlwaysActivatedPlugins = true; + protected $pluginToAlwaysEnable = array( 'Home', + 'AdminHome', + 'PluginsAdmin' + ); static private $instance = null; @@ -73,9 +79,14 @@ class Piwik_PluginsManager $this->dispatcher = Event_Dispatcher::getInstance(); } + public function isPluginAlwaysActivated( $name ) + { + return in_array( $name, $this->pluginToAlwaysEnable); + } public function isPluginEnabled( $name ) { - return in_array( $name, $this->pluginsToLoad); + return in_array( $name, $this->pluginsToLoad) + || $this->isPluginAlwaysActivated( $name ); } /** @@ -233,7 +244,11 @@ class Piwik_PluginsManager { $this->doLoadPlugins = false; } - + + public function doNotLoadAlwaysActivatedPlugins() + { + $this->doLoadAlwaysActivatedPlugins = false; + } /** * Add a plugin in the loaded plugins array * @@ -278,7 +293,15 @@ class Piwik_PluginsManager public function loadPlugins() { $this->pluginsToLoad = array_unique($this->pluginsToLoad); - foreach($this->pluginsToLoad as $pluginName) + + $pluginsToLoad = $this->pluginsToLoad; + + if($this->doLoadAlwaysActivatedPlugins) + { + $pluginsToLoad = array_merge($this->pluginsToLoad, $this->pluginToAlwaysEnable); + } + + foreach($pluginsToLoad as $pluginName) { $newPlugin = $this->loadPlugin($pluginName); diff --git a/modules/SmartyPlugins/modifier.translate.php b/modules/SmartyPlugins/modifier.translate.php new file mode 100644 index 0000000000..bd0360ee9c --- /dev/null +++ b/modules/SmartyPlugins/modifier.translate.php @@ -0,0 +1,34 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id: modifier.sumtime.php 168 2008-01-14 05:26:43Z matt $ + * + * @package Piwik_Visualization + */ + +/** + * Translates a string in the currently selected language in Piwik. + * The translations strings are located either in /lang/xx.php or within the plugin lang directory. + * + * Example: + * + * {'General_Unknown'|translate} will be translated as 'Unknown' (see the entry in /lang/en.php) + * + * + * + */ +function smarty_modifier_translate($string, $aValues = null) +{ + if(is_null($aValues)) + { + $aValues = array(); + } + if(!is_array($aValues)) + { + $aValues = array( $aValues); + } + return vsprintf($translations[$string], $aValues); +}
\ No newline at end of file diff --git a/modules/Translate.php b/modules/Translate.php index d44119cbf8..d2156181ad 100644 --- a/modules/Translate.php +++ b/modules/Translate.php @@ -17,6 +17,11 @@ class Piwik_Translate { static private $instance = null; + /** + * Returns singleton + * + * @return Piwik_Translate + */ static public function getInstance() { if (self::$instance == null) @@ -48,7 +53,8 @@ class Piwik_Translate /**
* Enter description here...
*
- * @return unknown
+ * @return string the language filename prefix, eg "en" for english + * @throws exception if the language set in the config file is not a valid filename
*/ public function getLanguageToLoad() { @@ -74,3 +80,11 @@ function Piwik_Translate($index) throw new Exception("Translation string '$index' not available."); } +if(!function_exists('_')) +{ + function _($translationIndex) + { + return Piwik_Translate($translationIndex); + } +} + diff --git a/plugins/AdminHome/templates/index.tpl b/plugins/AdminHome/templates/index.tpl index e65e6dd5d1..4fbdeafb73 100644 --- a/plugins/AdminHome/templates/index.tpl +++ b/plugins/AdminHome/templates/index.tpl @@ -3,8 +3,12 @@ <head>
</head>
<body>
-<link rel="stylesheet" type="text/css" href="plugins/AdminHome/templates/menu.css">
+<script type="text/javascript" src="libs/jquery/jquery.js"></script>
+<script type="text/javascript" src="themes/default/common.js"></script>
+
+<link rel="stylesheet" type="text/css" href="plugins/AdminHome/templates/menu.css">
+<link rel="stylesheet" href="themes/default/common-admin.css">
<div id="menu">
{include file="AdminHome/templates/menu.tpl"}
</div>
@@ -16,3 +20,7 @@ {if $content}{$content}{/if}
</div>
+<div id="footer" style="border-top:1px solid gray; margin-top:20px;padding-top:10px;">
+<a href='?module=Home'>Back to Piwik homepage</a>
+
+</div>
diff --git a/plugins/ExamplePlugin/ExamplePlugin.php b/plugins/ExamplePlugin/ExamplePlugin.php index 938900a534..368271874a 100644 --- a/plugins/ExamplePlugin/ExamplePlugin.php +++ b/plugins/ExamplePlugin/ExamplePlugin.php @@ -1,13 +1,13 @@ -<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- * @package Piwik_ExamplePlugin
- */
+<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * @package Piwik_ExamplePlugin + */ class Piwik_ExamplePlugin extends Piwik_Plugin { diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index 3c21a421c1..10c2291434 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -63,11 +63,10 @@ class Piwik_Login_Controller extends Piwik_Controller } else { - $messageNoAccess = 'login & password not correct'; + $messageNoAccess = _('Login_LoginPasswordNotCorrect'); } } - - $view = new Piwik_View('login.tpl'); + $view = new Piwik_View('Login/templates/login.tpl'); $view->AccessErrorString = $messageNoAccess; $view->addForm( $form ); $view->subTemplate = 'genericForm.tpl'; diff --git a/plugins/Login/Form.php b/plugins/Login/Form.php index 3449a95ba5..44276f356e 100644 --- a/plugins/Login/Form.php +++ b/plugins/Login/Form.php @@ -20,6 +20,8 @@ class Piwik_Login_Form extends Piwik_Form function __construct() { parent::__construct(); + // reset + $this->updateAttributes('id="loginform" name="loginform"'); } function init() @@ -33,20 +35,19 @@ class Piwik_Login_Form extends Piwik_Form } $formElements = array( - array('text', 'form_login', 'login:'), - array('password', 'form_password', 'pass:'), + array('text', 'form_login', _('Login_login')), + array('password', 'form_password', _('Login_password')), array('hidden', 'form_url', $urlToGoAfter), ); $this->addElements( $formElements ); $formRules = array( - array('form_login', sprintf('%s required', 'login'), 'required'), - array('form_password', sprintf('%s required', 'password'), 'required'), + array('form_login', sprintf(_('General_Required'), 'login'), 'required'), + array('form_password', sprintf(_('General_Required'), 'password'), 'required'), ); $this->addRules( $formRules ); - $this->addElement('submit', 'submit', 'Go!'); - $this->addElement('submit', 'back', 'Cancel'); + $this->addElement('submit', 'submit', _('Login_Go')); } diff --git a/plugins/Login/templates/login.css b/plugins/Login/templates/login.css new file mode 100644 index 0000000000..9eb657af81 --- /dev/null +++ b/plugins/Login/templates/login.css @@ -0,0 +1,124 @@ + +* { margin: 0; padding: 0; } + +body { + font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; +} + +form { + margin-left: 8px; + padding: 16px 16px 40px 16px; + font-weight: bold; + -moz-border-radius: 5px; + -khtml-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +form .forgetmenot { font-weight: normal; float: left; margin-bottom: 0;} + +#login form .submit input { + font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + padding: 3px 5px; + border: none; + font-size: 13px; + border-width: 1px; + border-style: solid; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + cursor: default; + text-decoration: none; + margin-top: -6px; +} + +form .submit { float: right; } + +form p { margin-bottom: 24px; } + +#login { width: 292px; margin: 7em auto; margin-top: 20px; } + +#login_error { + margin: 0 0 16px 8px; + border-width: 1px; + border-style: solid; + padding: 12px; +} + +#nav { margin: 0 0 0 8px; padding: 16px; } + +#form_password, #form_login, #user_email { + font-size: 20px; + width: 97%; + padding: 3px; + margin-right: 6px; +} + +#login form input { + color: #555; +} + +.login form { + background-color: #eaf3fa; +} + +#login form .submit input { + background-color: #cee1ef !important; +} + +#login #login_error { + background-color: #ffebe8; + border-color: #c00; +} + +#login form .submit input { + background-color: #e5e5e5; + color: #246; + border-color: #80b5d0; +} + +#login form .submit input:hover { + color: #d54e21; +} + + #login form .submit input:hover { + border-color: #328ab2; +} + +.login #login_error { + background-color: #ffffe0; + border-color: #e6db55; +} + +.login #nav a { + color: #777; +} +body.login { + border-top-color: #464646; +} +#login form input { + color: #555; +} + + + +#logo { + margin-left: 38%; + margin-top:100px; +} + +#logo h1 { +font-family: Georgia, "Times New Roman", Times, serif; +font-weight: normal; +color: #136F8B; +font-size: 48px; +text-transform: none; +} + +#logo .description { +font-family: Georgia, "Times New Roman", Times, serif; +font-weight: normal; +color: #879dbd; +font-size: 25px; +} diff --git a/plugins/Login/templates/login.tpl b/plugins/Login/templates/login.tpl new file mode 100644 index 0000000000..a4f7ad05fd --- /dev/null +++ b/plugins/Login/templates/login.tpl @@ -0,0 +1,70 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> +<head> + <title>Piwik › Login</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + +{literal}<script type="text/javascript"> + function focusit() { + document.getElementById('form_login').focus(); + } + window.onload = focusit; + </script> +{/literal} +<link rel="stylesheet" href="plugins/Login/templates/login.css"> +</head> + +<body class="login"> + + +<div id="logo"> + <a href="http://piwik.org"><h1 title="Web analytics">Piwik <span class="description"># open source web analytics</span></h1></a> +</div> + +<div id="login"> + + +{if $form_data.errors} +<div id="login_error"> + {foreach from=$form_data.errors item=data} + <strong>ERROR</strong>: {$data}<br /> + {/foreach} +</div> +{/if} + +{if $AccessErrorString} +<div id="login_error"><strong>ERROR</strong>: {$AccessErrorString}<br /></div> +{/if} + +<form {$form_data.attributes}> + <p> + <label>Username<br /> + <input type="text" name="form_login" id="form_login" class="input" value="" size="20" tabindex="10" /></label> + </p> + + <p> + <label>Password<br /> + <input type="password" name="form_password" id="form_password" class="input" value="" size="20" tabindex="20" /></label> + </p> + {* + <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p> + *} + {$form_data.form_url.html} + <p class="submit"> + <input type="submit" name="wp-submit" id="wp-submit" value="Log In" tabindex="100" /> + </p> +</form> + +{* +<p id="nav"> +<a href="http://wp.chrisjohnston.org/wp-login.php?action=register">Register</a> | +<a href="http://wp.chrisjohnston.org/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a> +</p> +*} +</div> + +</body> +</html> + + + diff --git a/plugins/PluginsAdmin/Controller.php b/plugins/PluginsAdmin/Controller.php index 3bc15b6bb3..425e426e10 100644 --- a/plugins/PluginsAdmin/Controller.php +++ b/plugins/PluginsAdmin/Controller.php @@ -29,8 +29,9 @@ class Piwik_PluginsAdmin_Controller extends Piwik_Controller foreach($listPlugins as $pluginName) { $oPlugin = Piwik_PluginsManager::getInstance()->loadPlugin($pluginName); - $plugins[$pluginName]= array( 'activated' => Piwik_PluginsManager::getInstance()->isPluginEnabled($pluginName), - 'info' => $oPlugin->getInformation() + $plugins[$pluginName]= array( 'activated' => Piwik_PluginsManager::getInstance()->isPluginEnabled($pluginName), + 'alwaysActivated' => Piwik_PluginsManager::getInstance()->isPluginAlwaysActivated($pluginName), + 'info' => $oPlugin->getInformation() ); } diff --git a/plugins/PluginsAdmin/templates/manage.tpl b/plugins/PluginsAdmin/templates/manage.tpl index 033c1793b9..6e2a91fc24 100644 --- a/plugins/PluginsAdmin/templates/manage.tpl +++ b/plugins/PluginsAdmin/templates/manage.tpl @@ -5,8 +5,8 @@ <table id="plugins"> <thead> - <th>Name</th> - <th>Description</th> + <th width="150px">Name</th> + <th width="400px">Description</th> <th>Author</th> <th>Version</th> <th>Action</th> @@ -20,12 +20,10 @@ <td>{$plugin.info.description} </td> <td class="center"><a href="{$plugin.info.homepage}">{$plugin.info.author}</a></td> <td>{$plugin.info.version}</td> - <td class="switch">{if $plugin.activated}<a href=?module=PluginsAdmin&action=deactivate&pluginName={$name}>Deactivate</a> + <td class="switch">{if $plugin.alwaysActivated}<span title="This plugin cannot be deactivated">Activated</span>{elseif $plugin.activated}<a href=?module=PluginsAdmin&action=deactivate&pluginName={$name}>Deactivate</a> {else}<a href=?module=PluginsAdmin&action=activate&pluginName={$name}>Activate</a>{/if}</td> </tr> {/foreach}
</tbody> </table> -
-<p><a href='?module=Home'>Back to Piwik homepage</a></p>
diff --git a/plugins/SitesManager/templates/DisplayJavascriptCode.tpl b/plugins/SitesManager/templates/DisplayJavascriptCode.tpl index 593049e546..a02d7a59a0 100644 --- a/plugins/SitesManager/templates/DisplayJavascriptCode.tpl +++ b/plugins/SitesManager/templates/DisplayJavascriptCode.tpl @@ -3,5 +3,3 @@ <code>
{$jsTag}
</code>
-
-<p><a href='?module=Home'>Back to Piwik homepage</a></p>
\ No newline at end of file diff --git a/plugins/SitesManager/templates/SitesManager.tpl b/plugins/SitesManager/templates/SitesManager.tpl index 9ced665119..24e029eb37 100644 --- a/plugins/SitesManager/templates/SitesManager.tpl +++ b/plugins/SitesManager/templates/SitesManager.tpl @@ -1,14 +1,5 @@ - - - -<script type="text/javascript" src="libs/jquery/jquery.js"></script> -<script type="text/javascript" src="themes/default/common.js"></script> - -<script type="text/javascript" src="plugins/UsersManager/templates/UsersManager.js"></script> <script type="text/javascript" src="plugins/SitesManager/templates/SitesManager.js"></script> -<link rel="stylesheet" href="themes/default/common-admin.css"> - <h2>Sites</h2> <div id="ajaxError" style="display:none"></div> <div id="ajaxLoading" style="display:none">Loading... <img src="themes/default/loading.gif"></div> @@ -44,8 +35,3 @@ <div id="addRowSite"><img src='plugins/UsersManager/images/add.png'> <a href="#">Add a new Site</a></div> {/if} - -<p><a href='?module=Home'>Back to Piwik homepage</a></p> - - - diff --git a/plugins/UsersManager/templates/UsersManager.js b/plugins/UsersManager/templates/UsersManager.js index 37e205ccb5..9f7063336b 100644 --- a/plugins/UsersManager/templates/UsersManager.js +++ b/plugins/UsersManager/templates/UsersManager.js @@ -229,7 +229,14 @@ $(document).ready( function() { } ); - $('#addrow').click( function() { + $('#addrow').hover( function() { + $(this).css({ cursor: "pointer"}); + }, + function() { + $(this).css({ cursor: "auto"}); + } + ) + .click( function() { ajaxHideError(); $(this).toggle(); @@ -243,7 +250,7 @@ $(document).ready( function() { <td><input id="useradd_email" value="email@domain.com" size=15></td>\ <td><input id="useradd_alias" value="alias" size=15></td>\ <td>-</td>\ - <td><img src="plugins/UsersManager/images/ok.png" id="adduser" href="#"></td>\ + <td><img src="plugins/UsersManager/images/ok.png" id="adduser"></td>\ <td><img src="plugins/UsersManager/images/remove.png" id="cancel"></td>\ </tr>') .appendTo('#users') diff --git a/plugins/UsersManager/templates/UsersManager.tpl b/plugins/UsersManager/templates/UsersManager.tpl index cdb136d523..771b71da17 100644 --- a/plugins/UsersManager/templates/UsersManager.tpl +++ b/plugins/UsersManager/templates/UsersManager.tpl @@ -103,7 +103,5 @@ </tbody> </table>
-<div id="addrow"><img src='plugins/UsersManager/images/add.png'> <a href="#">Add a new user</a></div> +<div id="addrow"><img src='plugins/UsersManager/images/add.png'> Add a new user</div> <script type="text/javascript" src="plugins/UsersManager/templates/UsersManager.js"></script> - -<p><a href='?module=Home'>Back to Piwik homepage</a></p> diff --git a/themes/default/common-admin.css b/themes/default/common-admin.css index c1aa8d4e14..c044962d3f 100644 --- a/themes/default/common-admin.css +++ b/themes/default/common-admin.css @@ -1,9 +1,15 @@ * { - font-family: Trebuchet MS, arial, sans-serif; + font-family: Georgia, Trebuchet MS, arial, sans-serif; +} +img { + vertical-align: baseline; +} +a { + font-size:12px; + + color:black; } - textarea { - font-family: Trebuchet MS, Verdana; font-size: 0.85em; } @@ -55,21 +61,6 @@ textarea { text-decoration: none; } -#logo h1 { - font-family: Georgia, "Times New Roman", Times, serif; - font-weight: normal; - color: #136F8B; - font-size: 48px; - text-transform: none; -} - -#logo .description { - font-family: Georgia, "Times New Roman", Times, serif; - font-weight: normal; - color: #879dbd; - font-size: 25px; -} - table { font-size: 0.9em; font-family: Arial, Helvetica, verdana sans-serif; |