[geeklog-hg] geeklog: Added Enviroment Check Admin Form

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu Jul 11 19:34:36 EDT 2013


changeset 9177:d853c3f42fce
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/d853c3f42fce
user: Tom <websitemaster at cogeco.net>
date: Thu Jul 11 19:26:39 2013 -0400
description:
Added Enviroment Check Admin Form

diffstat:

 language/english.php                                          |   66 ++++++++++
 language/english_utf-8.php                                    |   66 ++++++++++
 public_html/admin/index.php                                   |    5 +-
 public_html/docs/english/theme.html                           |    1 +
 public_html/layout/denim/admin/envcheck.thtml                 |   22 +++
 public_html/layout/denim/css_ltr/style.css                    |   42 ++++++
 public_html/layout/denim/css_rtl/style.css                    |   43 ++++++
 public_html/layout/denim/images/icons/envcheck.png            |  Bin 
 public_html/layout/modern_curve/admin/envcheck.thtml          |   22 +++
 public_html/layout/modern_curve/css/admin/envcheck.css        |   53 ++++++++
 public_html/layout/modern_curve/images/icons/envcheck.png     |  Bin 
 public_html/layout/modern_curve/style.css.php                 |    1 +
 public_html/layout/professional/envcheck.thtml                |   22 +++
 public_html/layout/professional/images/icons/envcheck.png     |  Bin 
 public_html/layout/professional/style.css                     |   41 ++++++
 public_html/layout/professional_css/admin/envcheck.thtml      |   22 +++
 public_html/layout/professional_css/css/admin.css             |    1 +
 public_html/layout/professional_css/css/admin/envcheck.css    |   53 ++++++++
 public_html/layout/professional_css/images/icons/envcheck.png |  Bin 
 19 files changed, 459 insertions(+), 1 deletions(-)

diffs (truncated from 586 to 300 lines):

diff -r 6408fb1b9a32 -r d853c3f42fce language/english.php
--- a/language/english.php	Thu Jul 11 15:33:20 2013 -0400
+++ b/language/english.php	Thu Jul 11 19:26:39 2013 -0400
@@ -685,6 +685,72 @@
 );
 
 ###############################################################################
+# admin/envcheck.php - distribution integrity checker
+
+$LANG_ENVCHECK = array(
+    'correct_perms'             => 'Please correct the issues identified below. Once they have been corrected, use the <b>Recheck</b> button to validate the environment.',
+    'current'                   => 'Current',
+    'current_php_settings'      => 'Current PHP Settings',
+    'directory_permissions'     => 'Directory Permissions',
+    'enabled'                   => 'Enabled',
+    'env_check'                 => 'Environment Check',
+    'file_permissions'          => 'File Permissions',
+    'file_uploads'              => 'Many features of Geeklog require the ability to upload files, this should be enabled.',
+    'filesystem_check'          => 'Directory / File Permissions',
+    'gd_lib'                    => 'GD Libraries',
+    'gd_not_found'              => 'Unable to locate the GD library functions.  Please ensure that the GD libraries were compiled into PHP or select an alternate graphics library.',
+    'gd_ok'                     => 'GD Libraries v2 are installed.',
+    'gd_v1'                     => 'GD Libraries v1 is installed - This version does not fully support JPG image processing so there may be some quality issues.',
+    'graphics'                  => 'Graphics Library',
+    'hosting_env'               => 'Hosting Environment Check',
+    'imagemagick'               => 'ImageMagick Programs',
+    'im_not_found'              => 'Unable to locate the <strong>convert</strong> executable for ImageMagick.',
+    'im_ok'                     => 'The <strong>convert</strong> executable appears to be valid.',
+    'memory_limit'              => 'It is recommended that you have at least 48M of memory enabled on your site.',
+    'not_writable'              => 'NOT WRITABLE',
+    'notes'                     => 'Notes',
+    'not_found'                 => 'Not Found',
+    'netpbm'                    => 'NetPBM Library',
+    'np_ok'                     => 'The NetPBM library is installed',
+    'np_not_found'              => 'The NetPBM executables were not found.',
+    'off'                       => 'Off',
+    'ok'                        => 'OK',
+    'on'                        => 'On',
+    'open_basedir'              => 'If <strong>open_basedir</strong> restrictions are enabled on your site, it may cause permission problems during the install. The File System Check below should point out any issues.',
+    'php_req_version'           => 'Geeklog requires PHP version 5.2.0 or newer.',
+    'php_settings'              => 'PHP Settings',
+    'php_version'               => 'PHP Version',
+    'php_warning'               => 'If any of the items below are marked in <span class="no">red</span>, you may encounter problems with your Geeklog site.  Check with your hosting provider for information on changing any of these PHP settings.',
+    'post_max_size'             => 'Geeklog allows you to upload plugins, images, and files. You should allow at least 8M for the maximum post size.',
+    'recheck'                   => 'Recheck Environment',
+    'recommended'               => 'Recommended',
+    'register_globals'          => 'If PHP\'s <strong>register_globals</strong> is enabled, it can create security issues.',
+    'safe_mode'                 => 'If PHP\'s <strong>safe_mode</strong> is enabled, some functions of Geeklog may not work correctly. Specifically the Media Gallery plugin.',
+    'setting'                   => 'Setting',
+    'unable_mkdir'              => 'Unable to create directory',
+    'upload_max_filesize'       => 'Geeklog allows you to upload plugins, images, and files. You should allow at least 8M for the upload size.',
+    'not_checked'               => 'Skipped',
+    'bypass_note'               => 'Since either Safe Mode or open_basedir restrictions were detected, the check for graphic libraries were skipped.',
+    'not_used_note'             => 'No graphic libraries are set to be used by Geeklog.',
+    'location'                  => 'Location',
+    'status'                     => 'Status',
+    'item'                      => 'Item',
+    
+    /* Left incase we decided to use jhead and/or jpegtran Program in future */
+    'jhead'                     => 'jhead Program',
+    'jhead_not_found'           => 'Unable to locate the jhead executable.',
+    'jhead_ok'                  => 'The jhead executable is installed.',
+    'jpegtran'                  => 'jpegtran Program',
+    'jpegtran_not_found'        => 'Unable to locate the jpegtran executable.',
+    'jpegtran_ok'               => 'The jpegtran executable is installed.',
+    
+    'showhide_phpinfo'          => 'Show/Hide Full PHP Info',
+    'view_online'               => 'Click here %s to view online',
+    'no_new_items'              => 'No New Items',
+    'max_execution_time'        => 'Geeklog recommends the PHP default value of 30 seconds as a minimum, but plugin uploads and other operations may take longer than this depending upon your hosting environment.  If safe_mode (above) is Off, you may be able to increase this by modifying the value of <b>max_execution_time</b> in your php.ini file.'
+);
+
+###############################################################################
 # admin/auth.inc.php
 
 $LANG20 = array(
diff -r 6408fb1b9a32 -r d853c3f42fce language/english_utf-8.php
--- a/language/english_utf-8.php	Thu Jul 11 15:33:20 2013 -0400
+++ b/language/english_utf-8.php	Thu Jul 11 19:26:39 2013 -0400
@@ -685,6 +685,72 @@
 );
 
 ###############################################################################
+# admin/envcheck.php - distribution integrity checker
+
+$LANG_ENVCHECK = array(
+    'correct_perms'             => 'Please correct the issues identified below. Once they have been corrected, use the <b>Recheck</b> button to validate the environment.',
+    'current'                   => 'Current',
+    'current_php_settings'      => 'Current PHP Settings',
+    'directory_permissions'     => 'Directory Permissions',
+    'enabled'                   => 'Enabled',
+    'env_check'                 => 'Environment Check',
+    'file_permissions'          => 'File Permissions',
+    'file_uploads'              => 'Many features of Geeklog require the ability to upload files, this should be enabled.',
+    'filesystem_check'          => 'Directory / File Permissions',
+    'gd_lib'                    => 'GD Libraries',
+    'gd_not_found'              => 'Unable to locate the GD library functions.  Please ensure that the GD libraries were compiled into PHP or select an alternate graphics library.',
+    'gd_ok'                     => 'GD Libraries v2 are installed.',
+    'gd_v1'                     => 'GD Libraries v1 is installed - This version does not fully support JPG image processing so there may be some quality issues.',
+    'graphics'                  => 'Graphics Library',
+    'hosting_env'               => 'Hosting Environment Check',
+    'imagemagick'               => 'ImageMagick Programs',
+    'im_not_found'              => 'Unable to locate the <strong>convert</strong> executable for ImageMagick.',
+    'im_ok'                     => 'The <strong>convert</strong> executable appears to be valid.',
+    'memory_limit'              => 'It is recommended that you have at least 48M of memory enabled on your site.',
+    'not_writable'              => 'NOT WRITABLE',
+    'notes'                     => 'Notes',
+    'not_found'                 => 'Not Found',
+    'netpbm'                    => 'NetPBM Library',
+    'np_ok'                     => 'The NetPBM library is installed',
+    'np_not_found'              => 'The NetPBM executables were not found.',
+    'off'                       => 'Off',
+    'ok'                        => 'OK',
+    'on'                        => 'On',
+    'open_basedir'              => 'If <strong>open_basedir</strong> restrictions are enabled on your site, it may cause permission problems during the install. The File System Check below should point out any issues.',
+    'php_req_version'           => 'Geeklog requires PHP version 5.2.0 or newer.',
+    'php_settings'              => 'PHP Settings',
+    'php_version'               => 'PHP Version',
+    'php_warning'               => 'If any of the items below are marked in <span class="no">red</span>, you may encounter problems with your Geeklog site.  Check with your hosting provider for information on changing any of these PHP settings.',
+    'post_max_size'             => 'Geeklog allows you to upload plugins, images, and files. You should allow at least 8M for the maximum post size.',
+    'recheck'                   => 'Recheck Environment',
+    'recommended'               => 'Recommended',
+    'register_globals'          => 'If PHP\'s <strong>register_globals</strong> is enabled, it can create security issues.',
+    'safe_mode'                 => 'If PHP\'s <strong>safe_mode</strong> is enabled, some functions of Geeklog may not work correctly. Specifically the Media Gallery plugin.',
+    'setting'                   => 'Setting',
+    'unable_mkdir'              => 'Unable to create directory',
+    'upload_max_filesize'       => 'Geeklog allows you to upload plugins, images, and files. You should allow at least 8M for the upload size.',
+    'not_checked'               => 'Skipped',
+    'bypass_note'               => 'Since either Safe Mode or open_basedir restrictions were detected, the check for graphic libraries were skipped.',
+    'not_used_note'             => 'No graphic libraries are set to be used by Geeklog.',
+    'location'                  => 'Location',
+    'status'                    => 'Status',
+    'item'                      => 'Item',
+    
+    /* Left incase we decided to use jhead and/or jpegtran Program in future */
+    'jhead'                     => 'jhead Program',
+    'jhead_not_found'           => 'Unable to locate the jhead executable.',
+    'jhead_ok'                  => 'The jhead executable is installed.',
+    'jpegtran'                  => 'jpegtran Program',
+    'jpegtran_not_found'        => 'Unable to locate the jpegtran executable.',
+    'jpegtran_ok'               => 'The jpegtran executable is installed.',
+    
+    'showhide_phpinfo'          => 'Show/Hide Full PHP Info',
+    'view_online'               => 'Click here %s to view online',
+    'no_new_items'              => 'No New Items',
+    'max_execution_time'        => 'Geeklog recommends the PHP default value of 30 seconds as a minimum, but plugin uploads and other operations may take longer than this depending upon your hosting environment.  If safe_mode (above) is Off, you may be able to increase this by modifying the value of <b>max_execution_time</b> in your php.ini file.'
+);
+
+###############################################################################
 # admin/auth.inc.php
 
 $LANG20 = array(
diff -r 6408fb1b9a32 -r d853c3f42fce public_html/admin/index.php
--- a/public_html/admin/index.php	Thu Jul 11 15:33:20 2013 -0400
+++ b/public_html/admin/index.php	Thu Jul 11 19:26:39 2013 -0400
@@ -103,7 +103,7 @@
 */
 function commandcontrol($token)
 {
-    global $_CONF, $_CONF_FT, $_TABLES, $LANG01, $LANG29, $LANG_LOGVIEW, $_IMAGE_TYPE, $_DB_dbms;
+    global $_CONF, $_CONF_FT, $_TABLES, $LANG01, $LANG29, $LANG_LOGVIEW, $LANG_ENVCHECK, $_IMAGE_TYPE, $_DB_dbms;
 
     $retval = '';
 
@@ -234,6 +234,9 @@
                         'url' => $_CONF['site_admin_url'] . '/clearctl.php',
                         'lang' => $LANG01['ctl'], 'image' => $_CONF['layout_url'] . '/images/icons/ctl.' . $_IMAGE_TYPE),
                     array('condition' => SEC_inGroup('Root'),
+                        'url' => $_CONF['site_admin_url'] . '/envcheck.php',
+                        'lang' => $LANG_ENVCHECK['env_check'], 'image' => $_CONF['layout_url'] . '/images/icons/envcheck.' . $_IMAGE_TYPE),
+                    array('condition' => SEC_inGroup('Root'),
                         'url' => $_CONF['site_admin_url'] . '/logviewer.php',
                         'lang' => $LANG_LOGVIEW['log_viewer'], 'image' => $_CONF['layout_url'] . '/images/icons/log_viewer.' . $_IMAGE_TYPE),
                     array('condition' => true,
diff -r 6408fb1b9a32 -r d853c3f42fce public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html	Thu Jul 11 15:33:20 2013 -0400
+++ b/public_html/docs/english/theme.html	Thu Jul 11 19:26:39 2013 -0400
@@ -225,6 +225,7 @@
 <li>Moved all images from <tt>/navbar/images/</tt> to <tt>/images/navbar/</tt> and updated required css files (different for each theme). Removed unused images for navbar from Denim and Modern Curve themes.</li>
 <li>Updated <tt>/admin/blocks/blockeditor.thtml</tt> and added in cache_time labels and input for all themes.</li>
 <li>Updated <tt>/admin/common/edit_topics.thtml</tt> so it can use jQuery (by adding ids to a number of elements) for all themes.</li>
+<li>Added <tt>/admin/envcheck.thtml</tt> and related css for ne Enviroment Check Admin page.</li>
 </ul>
 
 <h2><a name="changes">Theme changes in Geeklog 2.0.0</a></h2>
diff -r 6408fb1b9a32 -r d853c3f42fce public_html/layout/denim/admin/envcheck.thtml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/denim/admin/envcheck.thtml	Thu Jul 11 19:26:39 2013 -0400
@@ -0,0 +1,22 @@
+{# begin {templatelocation} #}
+
+{php_settings_list}
+
+{graphics_list}
+
+{filesystem_list}
+
+{!if phpinfo}
+<div class="block-center">
+    {# Mimic ADMIN_simpleList function output #}
+    <h2>{lang_current_php_settings}</h2>
+    <div class="block-center-content">
+        <div id="toggle_phpinfo">{lang_showhide_phpinfo}</div>
+        <div id="panel_phpinfo">
+            {phpinfo}
+        </div>
+    </div>
+</div>
+{!endif}
+
+{# end {templatelocation} #}
diff -r 6408fb1b9a32 -r d853c3f42fce public_html/layout/denim/css_ltr/style.css
--- a/public_html/layout/denim/css_ltr/style.css	Thu Jul 11 15:33:20 2013 -0400
+++ b/public_html/layout/denim/css_ltr/style.css	Thu Jul 11 19:26:39 2013 -0400
@@ -2892,6 +2892,48 @@
   display: none;
 }
 
+/*--------------------------------------
+  Enviroment Check  
+--------------------------------------*/
+
+.pathtext {
+  font-size:11px;
+  color:#666;
+}
+
+.pathtext-status {
+  text-align:right;
+  white-space:nowrap;
+}
+
+.yes, .iswriteable {
+  font-weight: bold;
+  color: #46882b;
+}
+.no, .notok, .notwriteable {
+  font-weight: bold;
+  color: #cc0000;
+}
+
+/* PHPInfo Panel style and button */
+#panel_phpinfo {
+  padding:5px;
+  width:600px;
+  margin: auto;
+  text-align:center;
+}
+#toggle_phpinfo {
+  padding:5px;
+  width:200px;
+  margin: auto;
+  text-align:center;
+  border:solid 1px #c3c3c3;
+}
+
+#panel_phpinfo {
+  padding:50px;
+  display:none;
+}
 
 /***************************************************************************************************/
 /* Note: If you want to disable the Responsive Web Design, please delete the code below this line. */
diff -r 6408fb1b9a32 -r d853c3f42fce public_html/layout/denim/css_rtl/style.css
--- a/public_html/layout/denim/css_rtl/style.css	Thu Jul 11 15:33:20 2013 -0400
+++ b/public_html/layout/denim/css_rtl/style.css	Thu Jul 11 19:26:39 2013 -0400
@@ -1024,6 +1024,49 @@
   padding: 0;
 }
 
+/*--------------------------------------
+  Enviroment Check  
+--------------------------------------*/
+
+.pathtext {
+  font-size:11px;
+  color:#666;
+}
+
+.pathtext-status {
+  text-align:right;
+  white-space:nowrap;
+}
+
+.yes, .iswriteable {
+  font-weight: bold;
+  color: #46882b;
+}
+.no, .notok, .notwriteable {
+  font-weight: bold;
+  color: #cc0000;
+}
+
+/* PHPInfo Panel style and button */
+#panel_phpinfo {
+  padding:5px;
+  width:600px;
+  margin: auto;
+  text-align:center;
+}



More information about the geeklog-cvs mailing list