diff --git a/account_details.php b/account_details.php
index dc12458..262baeb 100644
--- a/account_details.php
+++ b/account_details.php
@@ -4,6 +4,9 @@
* Sample plugin that adds a new tab to the settings section
* to display some information about the current user
*/
+
+// error_log(print_r($variable, TRUE)); // I only have this here for development
+
class account_details extends rcube_plugin
{
public $task = 'mail|addressbook|calendar|settings|dummy';
@@ -49,12 +52,12 @@ private function _load_config()
'message' => "Failed to load Account Details plugin config"), true, true);
}
}
-
+
function infostep()
{
- $this->register_handler('plugin.body', array($this, 'infohtml'));
-
+ $this->register_handler('plugin.body', array($this, 'infohtml'));
+ //$this->register_action('plugin.account_details', array($this, 'infostep'));
$rcmail = rcmail::get_instance();
$rcmail->output->set_pagetitle($this->gettext('account_details'));
$rcmail->output->send('plugin');
@@ -75,10 +78,20 @@ function infohtml()
$pn_newline = false;
$pn_parentheses = true;
}
-
+
+ // Grabs Browser Info
$browser = new Browser();
+
+ // Grabs Screen Resolution Info
$width = " ";
$height = " ";
+
+ // Server Uptime Info
+ $uptime = shell_exec("cut -d. -f1 /proc/uptime");
+ $days = floor($uptime/60/60/24);
+ $hours = $uptime/60/60%24;
+ $mins = $uptime/60%60;
+ $secs = $uptime%60;
$table = new html_table(array('cols' => 2, 'cellpadding' => 0, 'cellspacing' => 0, 'class' => 'account-details'));
@@ -202,6 +215,30 @@ function infohtml()
$table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('location') . ':'));
$table->add('value', $this->config['location']);
}
+
+ if (!empty($this->config['enable_server_os'])) {
+ if (!empty($this->config['enable_server_name'])) {
+ $table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('serveros') . ':'));
+ $table->add('value', php_uname ("s"));
+ }
+ if (!empty($this->config['enable_server_rel'])) {
+ $table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('serveros') . ':'));
+ $table->add('value', php_uname ("s") . " - " . php_uname ("r"));
+ }
+ if (!empty($this->config['enable_server_ver'])) {
+ $table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('serveros') . ':'));
+ $table->add('value', php_uname ("s") . " - " . php_uname ("r") . " - " . php_uname ("v"));
+ }
+ if (!empty($this->config['enable_server_uptime'])) {
+ $table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('serveruptime') . ':'));
+ $table->add('value', rcube_utils::rep_specialchars_output($days) . " days, " . rcube_utils::rep_specialchars_output($hours) . " hours, " . rcube_utils::rep_specialchars_output($mins) . " minutes, and " . rcube_utils::rep_specialchars_output($secs) . " seconds");
+ }
+
+ if ($this->config['display_php_version']) {
+ $table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('php_version') . ':'));
+ $table->add('value', PHP_VERSION);
+ }
+ }
$webmail_url = $this->_host_replace($this->config['webmail_url']);
if (!empty($this->config['hostname'])) {
@@ -213,11 +250,6 @@ function infohtml()
$table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('rc_version') . ':'));
$table->add('value', RCMAIL_VERSION);
}
-
- if ($this->config['display_php_version']) {
- $table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('php_version') . ':'));
- $table->add('value', PHP_VERSION);
- }
if (!empty($this->config['hostname_smtp'])) {
$table->add('title', ' ● ' . rcube_utils::rep_specialchars_output($this->gettext('smtp') . ':'));
diff --git a/composer.json b/composer.json
index 8a424a8..c761780 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
"description": "Sample plugin that adds a new tab to the settings section to display additional information about the current user.",
"homepage": "https://github.com/texxasrulez/More-User-Info-for-Roundcube",
"license": "GPLv3+",
- "version": "1.0",
+ "version": "1.0.0",
"authors": [
{
"name": "Gene Hawkins",
diff --git a/config.inc.php b/config.inc.php
index 64ce88b..ae25615 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -10,9 +10,6 @@
$account_details_config = array();
-// Debugging
-$config['account_details_debug'] = false;
-
// DONATION - Just trying to get paid. You can turn off Paypal Button here
$account_details_config['enable_paypal'] = true;
@@ -38,7 +35,7 @@
$account_details_config['enable_support'] = true;
// Server location (Example: 'City, Country')
-$account_details_config['location'] = 'Somewhere in the World'; //Cannot be blank. Messes with tables
+$account_details_config['location'] = 'Somewhere on the Earth'; //Cannot be blank. Messes with tables
// Display Mailbox Details - Unread Count - Total Count - Size of Folder
$account_details_config['enable_mailbox'] = true;
@@ -48,10 +45,26 @@
$account_details_config['enable_junk'] = false; // Have not figured this out yet. Only can get INBOX Working. I need help
$account_details_config['enable_trash'] = false; // Have not figured this out yet. Only can get INBOX Working. I need help
$account_details_config['enable_archive'] = false; // Have not figured this out yet. Only can get INBOX Working. I need help
+///////////////////////////////////////////////////////////////////////////////////////////
// Display User System Details
$account_details_config['enable_osystem'] = true;
+// Displays Information for YOUR Server ... USE AT YOUR OWN RISK
+// Display your Server OS
+$account_details_config['enable_server_os'] = true; // Only one of the 3 options below should be true otherwise multiple tables will show OS.
+// Display only Server name
+$account_details_config['enable_server_name'] = false;
+// Display Server name and Release
+$account_details_config['enable_server_rel'] = false;
+// Display Server name Release and version
+$account_details_config['enable_server_ver'] = true;
+
+// Display Server Uptime
+$account_details_config['enable_server_uptime'] = true;
+///////////////////////////////////////////////////////////////////////////////////////////
+
+
// Display Browser Information
$account_details_config['enable_browser'] = true;
diff --git a/config.inc.php.dist b/config.inc.php.dist
index 64ce88b..ae25615 100644
--- a/config.inc.php.dist
+++ b/config.inc.php.dist
@@ -10,9 +10,6 @@
$account_details_config = array();
-// Debugging
-$config['account_details_debug'] = false;
-
// DONATION - Just trying to get paid. You can turn off Paypal Button here
$account_details_config['enable_paypal'] = true;
@@ -38,7 +35,7 @@ $account_details_config['enable_ip'] = true;
$account_details_config['enable_support'] = true;
// Server location (Example: 'City, Country')
-$account_details_config['location'] = 'Somewhere in the World'; //Cannot be blank. Messes with tables
+$account_details_config['location'] = 'Somewhere on the Earth'; //Cannot be blank. Messes with tables
// Display Mailbox Details - Unread Count - Total Count - Size of Folder
$account_details_config['enable_mailbox'] = true;
@@ -48,10 +45,26 @@ $account_details_config['enable_sent'] = false; // Have not figured this out yet
$account_details_config['enable_junk'] = false; // Have not figured this out yet. Only can get INBOX Working. I need help
$account_details_config['enable_trash'] = false; // Have not figured this out yet. Only can get INBOX Working. I need help
$account_details_config['enable_archive'] = false; // Have not figured this out yet. Only can get INBOX Working. I need help
+///////////////////////////////////////////////////////////////////////////////////////////
// Display User System Details
$account_details_config['enable_osystem'] = true;
+// Displays Information for YOUR Server ... USE AT YOUR OWN RISK
+// Display your Server OS
+$account_details_config['enable_server_os'] = true; // Only one of the 3 options below should be true otherwise multiple tables will show OS.
+// Display only Server name
+$account_details_config['enable_server_name'] = false;
+// Display Server name and Release
+$account_details_config['enable_server_rel'] = false;
+// Display Server name Release and version
+$account_details_config['enable_server_ver'] = true;
+
+// Display Server Uptime
+$account_details_config['enable_server_uptime'] = true;
+///////////////////////////////////////////////////////////////////////////////////////////
+
+
// Display Browser Information
$account_details_config['enable_browser'] = true;
diff --git a/custom_includes/intro.html b/custom_includes/intro.html
index 1c80ab2..0519ecb 100644
--- a/custom_includes/intro.html
+++ b/custom_includes/intro.html
@@ -1 +1 @@
-Got Money?
\ No newline at end of file
+
\ No newline at end of file
diff --git a/localization/en_US.inc b/localization/en_US.inc
index 74baaeb..0c91b81 100644
--- a/localization/en_US.inc
+++ b/localization/en_US.inc
@@ -63,11 +63,13 @@ $labels['portnumbersencrypted'] = 'encrypted connection to mail server';
$labels['portnumbersregular'] = 'regular connection to mail server';
$labels['rc_version'] = 'Roundcube Version';
$labels['recommended'] = 'SSL Recommended';
-$labels['resolution'] = 'Video Resolution';
+$labels['resolution'] = 'Screen Resolution';
$labels['sent'] = 'Sent Folder';
$labels['serverinfo'] = 'Server Details';
$labels['serverinformation'] = 'Server Information';
$labels['server'] = 'Server';
+$labels['serveros'] = 'Server OS';
+$labels['serveruptime'] = 'Server Uptime';
$labels['size'] = 'KB';
$labels['smtp'] = 'Outgoing SMTP';
$labels['smtp-ssl'] = 'Outgoing SMTP-SSL';