Permalink
Browse files

version 2.5.4

* NEW diagnostic page
  • Loading branch information...
1 parent b44d823 commit 145f8f159d932da8701617201661792f7e1d1924 @cedricwalter committed Jun 1, 2012
@@ -18,6 +18,7 @@
require_once (dirname(__FILE__) . '/controllers/import.php');
require_once (dirname(__FILE__) . '/controllers/export.php');
require_once (dirname(__FILE__) . '/controllers/statistics.php');
+require_once (dirname(__FILE__) . '/controllers/diagnostic.php');
$document = JFactory::getDocument();
$document->addStyleSheet(JURI::root() . '/media/com_cedtag/css/admintag.css');
@@ -0,0 +1,40 @@
+<?php
+/**
+ * @package Component cedTag for Joomla! 2.5
+ * @author waltercedric.com
+ * @copyright (C) 2012 http://www.waltercedric.com
+ * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
+ **/
+
+
+defined('_JEXEC') or die();
+jimport('joomla.application.input');
+jimport('joomla.filesystem.file');
+
+
+class CedTagControllerDiagnostic extends JController
+{
+ function __construct()
+ {
+ parent::__construct();
+ }
+
+ public function execute($task)
+ {
+ switch ($task) {
+ default:
+ $this->display();
+ }
+ }
+
+ /**
+ * @param bool $cachable
+ * @param bool $urlparams
+ */
+ public function display($cachable = false, $urlparams = false)
+ {
+ JFactory::getApplication()->input->set('view', 'diagnostic');
+ parent::display();
+ }
+
+}
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @package Component cedTag for Joomla! 2.5
+ * @author waltercedric.com
+ * @copyright (C) 2012 http://www.waltercedric.com
+ * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
+ **/
+
+// Check to ensure this file is included in Joomla!
+defined('_JEXEC') or die('Restricted access');
+
+jimport('joomla.application.component.model');
+
+require_once JPATH_SITE . '/components/com_cedtag/helper/helper.php';
+
+class CedTagModelDiagnostic extends JModel
+{
+ public function __construct($config = array())
+ {
+ parent::__construct($config);
+ }
+
+ public function getDiagnostic()
+ {
+ $diagnostic = new stdClass();
+ $diagnostic->curl = in_array('curl', get_loaded_extensions());
+ //ini_get('allow_url_fopen');
+
+ return $diagnostic;
+ }
+}
@@ -0,0 +1,3 @@
+<html>
+<body bgcolor="#FFFFFF"></body>
+</html>
@@ -0,0 +1,48 @@
+<?php
+/**
+ * @package Component Tag for Joomla! 2.5
+ * @author waltercedric.com
+ * @copyright (C) 2012 http://www.waltercedric.com
+ * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
+ **/
+defined('_JEXEC') or die('Restricted access');
+
+// userhelper for acl
+require_once JPATH_SITE . '/administrator/components/com_users/helpers/users.php';
+$canDo = UsersHelper::getActions();
+
+// Load the javascript
+JHtml::_('behavior.framework');
+JHtml::_('behavior.modal', 'a.modal');
+
+require_once JPATH_COMPONENT_SITE . '/helper/helper.php';
+?>
+
+<div class="tagpanel">
+
+ <table width="100%" border="1" cellpadding="5">
+ <thead>
+ <tr>
+ <th>Item</th>
+ <th>Optionnal/Required</th>
+ <th>Status</th>
+ <th>Recommended Value</th>
+ <th>Used by</th>
+ <th>Resolution</th>
+
+ </tr>
+
+ </thead>
+ <tr>
+ <td><?php echo JText::_('Curl') ?></td>
+ <td><?php echo JText::_('Optionnal') ?></td>
+ <td><?php echo $this->diagnostic->curl ? JText::_('JYES') : JText::_('JNO') ?></td>
+ <td><?php echo JText::_('JYES') ?></td>
+ <td><?php echo JText::_('WikiPedia import of terms descriptions') ?></td>
+ <td><?php echo $this->diagnostic->curl == 0 ? JText::_('Required Root access or contacting your hosting company to activate cURL. cURL is a computer software project providing a library and command-line tool for transferring data using various protocols. The cURL project produces two products, libcurl and cURL. It was first released in 1997.') : '' ?></td>
+ </tr>
+
+ </table>
+
+
+</div>
@@ -0,0 +1,3 @@
+<html>
+<body bgcolor="#FFFFFF"></body>
+</html>
@@ -0,0 +1,34 @@
+<?php
+/**
+ * @package Component Tag for Joomla! 2.5
+ * @author waltercedric.com
+ * @copyright (C) 2012 http://www.waltercedric.com
+ * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
+ **/
+defined('_JEXEC') or die();
+jimport('joomla.application.component.view');
+
+class CedTagViewDiagnostic extends JView
+{
+ function display($tpl = null)
+ {
+ $this->defaultTpl($tpl);
+ }
+
+ function defaultTpl($tpl = null)
+ {
+ $this->addToolbar();
+
+ $diagnostic = $this->get('diagnostic');
+ $this->assign('diagnostic', $diagnostic);
+
+ parent::display($tpl);
+ }
+
+ function addToolbar()
+ {
+ JToolBarHelper::title(JText::_('DIAGNOSTIC'), 'tag.png');
+ JToolBarHelper::spacer();
+ JToolBarHelper::back(JText::_('CONTROL PANEL'), 'index.php?option=com_cedtag');
+ }
+}
@@ -152,6 +152,18 @@
<span><?php echo JText::_('DOWNLOAD LATEST VERSION');?></span></a>
</div>
</div>
+ <div style="float: left;">
+ <div class="icon">
+ <a href="index.php?option=com_cedtag&controller=diagnostic"
+ title="<?php echo JText::_('DIAGNOSTIC');?>"> <img
+ src="<? echo JURI::root() ?>/media/com_cedtag/images/diagnostic.png"/>
+ <span><?php echo JText::_('DIAGNOSTIC');?></span></a>
+ </div>
+ </div>
+
+
+
+
</div>
<div class="tagversion">

0 comments on commit 145f8f1

Please sign in to comment.