setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' .JText::_('CONTROL PANEL'));
// Set toolbar items for the page
JToolBarHelper::title( JText::_('JOOMFISH_TITLE') .' :: '. JText::_( 'JOOMFISH_HEADER' ), 'fish' );
JToolBarHelper::preferences('com_joomfish', '580', '750');
JToolBarHelper::help( 'screen.cpanel', true);
JSubMenuHelper::addEntry(JText::_('Control Panel'), 'index2.php?option=com_joomfish', true);
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', false);
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->performanceInfo = &$this->get('PerformanceInfo');
$this->publishedTabs = &$this->get('PublishedTabs');
$this->assignRef('panelStates', $this->panelStates);
$this->assignRef('contentInfo', $this->contentInfo);
$this->assignRef('performanceInfo', $this->performanceInfo);
$this->assignRef('publishedTabs', $this->publishedTabs);
JHTML::_('behavior.tooltip');
parent::display($tpl);
}
/**
* render Information module
*/
function renderInformation () {
$output = '';
//$panelStates = $this->get('panelStates');
$sysInfo = $this->panelStates['system'];
// this already includes administrator
$live_site = JURI::base();
$output = '
';
$output .= JText::_('INFORMATION_TEXT');
$output .= JText::_('INFORMATION_CLUB_TITLE');
$link = JText::_('INFORMATION_CLUB_LINK');
$output .= '
.'/administrator/components/com_joomfish/assets/images/joomfishclub.png)
';
$output .= JText::sprintf('INFORMATION_CLUB', $sysInfo['translations'], sprintf('%01.2f', intval($sysInfo['translations']) *0.10));
$output .= JText::_('INFORMATION_SERVICE_TITLE');
$output .= JText::_('INFORMATION_SERVICE');
$output .= '
';
//$output .= JText::sprintf ('INFORMATION_DONATE', intval($sysInfo['translations']) *0.10). '
';
return $output;
}
/**
* render News feed from Joom!Fish portal
*/
function renderJFNews() {
$output = '';
// get RSS parsed object
$options = array();
$options['rssUrl'] = 'http://www.joomfish.net/news?format=feed&type=rss';
$options['cache_time'] = 86400;
$rssDoc =& JFactory::getXMLparser('RSS', $options);
if ( $rssDoc == false ) {
$output = JText::_('Error: Feed not retrieved');
} else {
// channel header and link
$title = $rssDoc->get_title();
$link = $rssDoc->get_link();
$output = '';
$output .= '| '.JText::_($title) .' |
';
$output .= '| '.JText::_('NEWS_INTRODUCTION').' |
';
$items = array_slice($rssDoc->get_items(), 0, 3);
$numItems = count($items);
if($numItems == 0) {
$output .= '| ' .JText::_('No news items found'). ' |
';
} else {
$k = 0;
for( $j = 0; $j < $numItems; $j++ ) {
$item = $items[$j];
$output .= '';
$output .= '' .$item->get_title(). '';
if($item->get_description()) {
$description = $this->limitText($item->get_description(), 50);
$output .= ' ' .$description;
}
$output .= ' |
';
}
}
$k = 1 - $k;
$output .= '
';
}
return $output;
}
/**
* render content state information
*/
function renderContentState() {
$joomFishManager =& JoomFishManager::getInstance();
$output = '';
$alertContent = false;
if( array_key_exists('unpublished', $this->contentInfo) && is_array($this->contentInfo['unpublished']) ) {
$alertContent = true;
}
ob_start();
?>
|
|
|
contentInfo['unpublished'] as $ceInfo ) {
$contentElement = $joomFishManager->getContentElement( $ceInfo['catid'] );
// Trap for content elements that may have been removed
if (is_null($contentElement)){
$name = "".JText::sprintf("CONTENT_ELEMENT_MISSING",$ceInfo["reference_table"])."";
}
else {
$name = $contentElement->Name;
}
if ($ceInfo["reference_table"] != $curReftable){
$curReftable = $ceInfo["reference_table"];
$k=0;
?>
|
loadFromContentID($ceInfo['reference_id']);
$link = 'index2.php?option=com_joomfish&task=translate.edit&&catid=' .$ceInfo['catid']. '&cid[]=0|' .$ceInfo['reference_id'].'|'.$ceInfo['language_id'];
$hrefEdit = "".$contentObject->title. "";
$link = 'index2.php?option=com_joomfish&task=translate.publish&catid=' .$ceInfo['catid']. '&cid[]=0|' .$ceInfo['reference_id'].'|'.$ceInfo['language_id'];
$hrefPublish = '
';
?>
|
|
|
|
|
|
|
performanceInfo["driver"]["optimal"]){
$color="green";
}
else {
$color="red";
}
echo "| ".JText::_("mySQL Driver")." | \n";
echo "".$this->performanceInfo["driver"]["current"]." | \n";
echo "".$this->performanceInfo["driver"]["best"]." | \n";
?>
performanceInfo["cache"]["optimal"]){
$color="green";
}
else {
$color="red";
}
echo "| ".JText::_("Translation Caching")." | \n";
echo "".$this->performanceInfo["cache"]["current"]." | \n";
echo "".$this->performanceInfo["cache"]["best"]." | \n";
?>
panelStates;
ob_start();
?>
$stateRow) {
if (!is_array($stateRow) || count($stateRow)==0){
continue;
}
?>
|
link ) ) continue;
?>
| link != '' ) {
$row->description = '' .$row->description. '';
}
echo $row->description;
?> |
resultText;?> |
$wordcount )
{
$text = '';
for( $i=0; $i < $wordcount; $i++ ) {
$text .= ' '. $texts[$i];
}
$text .= '...';
}
return $text;
}
}