* @copyright PrestaShop * @license http://www.opensource.org/licenses/osl-3.0.php Open-source licence 3.0 * @version 1.3 * */ include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php'); class AdminMeta extends AdminTab { public function __construct() { $this->table = 'meta'; $this->className = 'Meta'; $this->lang = true; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array( 'id_meta' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'page' => array('title' => $this->l('Page'), 'width' => 120, 'suffix' => '.php'), 'title' => array('title' => $this->l('Title'), 'width' => 120), ); parent::__construct(); } public function displayForm($isMainTab = true) { global $currentIndex; parent::displayForm(); $meta = $this->loadObject(true); $files = Meta::getPages(true, ($meta->page ? $meta->page : false)); echo '
'.($meta->id ? '' : '').'
'.$this->l('Meta-Tags').'
'; if (!sizeof($files)) echo '

'.$this->l('There is no page available!').'

'; else { echo ' *

'.$this->l('Name of the related page').'

'; } echo '
'; foreach ($this->_languages as $language) echo '
'.$this->l('Invalid characters:').' <>;=#{} 

'.$this->l('Title of this page').'

'; $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'title¤description¤keywords', 'title'); echo '
 
'; foreach ($this->_languages as $language) echo '
'.$this->l('Invalid characters:').' <>;=#{} 

'.$this->l('A short description').'

'; $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'title¤description¤keywords', 'description'); echo '
 
'; foreach ($this->_languages as $language) echo '
'.$this->l('Invalid characters:').' <>;=#{} 

'.$this->l('List of keywords').'

'; $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'title¤description¤keywords', 'keywords'); echo '
 
* '.$this->l('Required field').'
'; } } ?>