victorbarns Posted April 29, 2011 Share Posted April 29, 2011 Bonjour, j'ai mis le bloc various link dans mon footer et j'y ai ajouté un bloc facebook, seulement j'aimerais enlever les restriction de taille du bloc, je ne comprends pas pourquoi il ne vas pas jusqu'au bout.. voici le lien : http://ococ.frJ'imagine que ça se passe dans le php mais impossible de trouver... le voici ><?php class BlockVariousLinks extends Module { private $_html; function __construct() { $this->name = 'blockvariouslinks'; $this->tab = 'Blocks'; $this->version = 0.1; parent::__construct(); $this->displayName = $this->l('Footer links block'); $this->description = $this->l('Displays miscellaneous links (generally in footer)'); } function install() { if (!parent::install()) return false; if (!$this->registerHook('footer')) return false; Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'block_cms`(`id_block`, `id_cms`) VALUES ('.intval($this->id).', 3), ('.intval($this->id).', 4)'); return true; } public function uninstall() { Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'block_cms` WHERE `id_block` ='.intval($this->id)); parent::uninstall(); } public function getContent() { if (isset($_POST['btnSubmit'])) $this->_postProcess(); $this-> _displayForm(); return $this->_html; } private function _displayForm() { global $cookie; $this->_html .= '<form action="'.$_SERVER['REQUEST_URI'].'" method="post"> '.$this->l('Selected files displayed').' '.$this->l('Please check files that will be displayed in this module').'. </pre> <table cellspacing="0" cellpadding="0" style="width:29.5em;"><input type="checkbox" name="checkme" class="noborder"></th> '.$this->l('ID').''.$this->l('Name').'<input type="checkbox" class="noborder" value="'.$row['id_cms'].'" name="categoryBox[]" '.((CMS::isInBlock($row['id_cms'], $this->id)) ? 'checked="checked"' : '').'>'.$row['id_cms'].''.$row['meta_title'].'</table> <br><br><br> <input type="submit" name="btnSubmit" class="button" value="'.$this->l('Update').'"><br><br> </form>';<br> }<br><br> private function _postProcess()<br> {<br> if (isset($_POST['categoryBox']) AND is_array($_POST['categoryBox']) AND count($_POST['categoryBox'] >= 1))<br> {<br> foreach ($_POST['categoryBox'] AS $row)<br> $cms[] = intval($row);<br> if (CMS::updateCmsToBlock($cms, $this->id))<br> $this->_html .= '<div>'.$this->l('Cms Updated').'</div>';<br> }<br> else<br> CMS::updateCmsToBlock(array(), $this->id);<br> }<br><br> /**<br> * Returns module content<br> *<br> * @param array $params Parameters<br> * @return string Content<br> */<br> function hookFooter($params)<br> {<br> global $smarty, $cookie;<br> $cms = CMS::listCms($cookie->id_lang, $this->id);<br> $id_cms = array();<br> foreach($cms AS $row)<br> $id_cms[] = intval($row['id_cms']);<br><br> $smarty->assign('cmslinks', CMS::getLinks($cookie->id_lang, $id_cms ? $id_cms : NULL));<br> return $this->display(__FILE__, 'blockvariouslinks.tpl');<br> }<br><br>}<br><br Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now