setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' .JText::_('TITLE_Statistics')); // Set toolbar items for the page JToolBarHelper::title(JText::_( 'TITLE_Statistics' ), 'statistics' ); JToolBarHelper::custom( 'cpanel.show', 'joomfish', 'joomfish', 'CONTROL PANEL' , false ); JToolBarHelper::help( 'screen.manage', true); JSubMenuHelper::addEntry(JText::_('Control Panel'), 'index2.php?option=com_joomfish'); JSubMenuHelper::addEntry(JText::_('Translation'), 'index2.php?option=com_joomfish&task=translate.overview'); JSubMenuHelper::addEntry(JText::_('Orphans'), 'index2.php?option=com_joomfish&task=translate.orphans'); JSubMenuHelper::addEntry(JText::_('Manage Translations'), 'index2.php?option=com_joomfish&task=manage.overview', false); JSubMenuHelper::addEntry(JText::_('Statistics'), 'index2.php?option=com_joomfish&task=statistics.overview', true); JSubMenuHelper::addEntry(JText::_('Language Configuration'), 'index2.php?option=com_joomfish&task=languages.show', false); JSubMenuHelper::addEntry(JText::_('Content elements'), 'index2.php?option=com_joomfish&task=elements.show', false); JSubMenuHelper::addEntry(JText::_('HELP AND HOWTO'), 'index2.php?option=com_joomfish&task=help.show', false); $this->panelStates = &$this->get('PanelStates'); $this->contentInfo = &$this->get('ContentInfo'); $this->publishedTabs = &$this->get('PublishedTabs'); $this->assignRef('panelStates', $this->panelStates); $this->assignRef('contentInfo', $this->contentInfo); $this->assignRef('publishedTabs', $this->publishedTabs); JHTML::_('behavior.tooltip'); parent::display($tpl); } /** * This method renders a nice status overview table from the content element files * * @param unknown_type $contentelements */ function renderOriginalStatusTable($originalStatus, $message='', $langCodes=null) { $htmlOutput = ''; $htmlOutput = ''; $htmlOutput .= ''; if(is_array($langCodes)) { foreach ($langCodes as $code) { $htmlOutput .= ''; } } $htmlOutput .= ''; $ceName = ''; foreach ($originalStatus as $statusRow ) { $href = 'index2.php?option=com_joomfish&task=overview&act=translate&catid='.$statusRow['catid']; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; if(is_array($langCodes)) { foreach ($langCodes as $code) { if( array_key_exists('langentry_' .$code, $statusRow)) { $persentage = intval( ($statusRow['langentry_' .$code]*100) / $statusRow['total'] ); $htmlOutput .= ''; } else { $htmlOutput .= ''; } } } $htmlOutput .= ''; } if($message!='') { $span = 4 + count($langCodes); $htmlOutput .= ''; } $htmlOutput .= '
' .JText::_('Content'). '' .JText::_('table exist'). '' .JText::_('original total'). '' .JText::_('Orphans'). '' .$code. '
' .$statusRow['name']. '' .($statusRow['missing_table'] ? JText::_('missing') : JText::_('valid')). '' .$statusRow['total']. '' .$statusRow['orphans']. '' .$persentage. '% 
' .$message. '
'; return $htmlOutput; } /** * Status table for translation checks * * @param array $translationStatus * @return unknown */ function renderTranslationStatusTable($translationStatus, $message='') { $htmlOutput = ''; $htmlOutput .= ''; $htmlOutput .= ''; foreach ($translationStatus as $statusRow ) { $href = 'index.php?option=com_joomfish&task=translate.overview&catid='.$statusRow['catid'].'&language_id='.$statusRow['language_id']; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; $htmlOutput .= ''; } if($message!='') { $htmlOutput .= ''; } $htmlOutput .= '
' .JText::_('Content'). '' .JText::_('language'). '' .JText::_('translation total'). '' .JText::_('TITLE_PUBLISHED'). '' .JText::_('valid'). '' .JText::_('unvalid'). '
' .$statusRow['content']. '' .$statusRow['language']. '' .$statusRow['total']. '' .$statusRow['published']. '' .$statusRow['state_valid']. '' .$statusRow['state_unvalid']. '
' .$message. '
'; return $htmlOutput; } }