mudplanet Posted September 3, 2009 Share Posted September 3, 2009 Voici un nouveau bloc modifié par mes soins, le bloc Informations qui affiche les différents articles de CMS.L'original affiche les liens dans l'ordre des identifiants.Celui-ci affiche les liens par ordre alphabétique.Bonus : en ajoutant "1.", "2.", etc. en début de titre, vous pouvez changer l'ordre de tri. Evidemment, cette numérotation n'apparaîtra pas sur l'affichage du bloc.Installation et administration identiques au bloc standard.UPDATE : un petit bogue concernant la traduction est corrigé dans cette version 1.12 blockinfos_mp.1.12.zip Link to comment Share on other sites More sharing options...
Bgiv Posted September 17, 2009 Share Posted September 17, 2009 Félicitations pour ce module. Tout est ok et c'est justement ce que je souhaitais. Link to comment Share on other sites More sharing options...
mark2 Posted November 27, 2009 Share Posted November 27, 2009 Thanks for contributing this.It is quite close to what I would like, which is also like to be able to include links in the Information block which point to pages outside of the CMS. There is another block for providing this "Bloc link" but I would like to have a single block combining the two features. For example the information block could include a link to the user's account information.Is anyone aware of module that would allow for this ?Regards, Mark Link to comment Share on other sites More sharing options...
mark2 Posted November 27, 2009 Share Posted November 27, 2009 A quick hack to allow links to be stored in the CMSAfter the line: $links = CMS::getLinks($cookie->id_lang, $id_cms ? $id_cms : NULL); in the file blockinfos_mp.php add the following: // Hack to allow links to be provided by the CMS reset($links); while (list($key, $value) = each($links)) { if (preg_match("/^TITLE\s*(.*)\s*URL\s*(.*)/", $value['meta_title'], $matches)) { $links[$key]['meta_title'] = $matches[1]; $links[$key]['link'] = $matches[2]; } } This allows CMS entries with the title like:TITLE Testing a Link URL my-account.phpTo be included in the infoblock as links.The sitemap.php also needs editing to get the link displayed correctly there. This appears to also be an issue for the numbering system used in this module to order the entries.In sitemap.php replace the line: $smarty->assign('cmslinks', CMS::getLinks(intval($cookie->id_lang), $id_cms ? $id_cms : NULL)); With: // Hack to allow links to be provided by the CMS $links = CMS::getLinks($cookie->id_lang, $id_cms ? $id_cms : NULL); reset($links); while (list($key, $value) = each($links)) { if (preg_match("/^TITLE\s*(.*)\s*URL\s*(.*)/", $value['meta_title'], $matches)) { $links[$key]['meta_title'] = $matches[1]; $links[$key]['link'] = $matches[2]; } if (preg_match("/^\d+\\.\\ *(.*)/", $value['meta_title'], $matches)) { $links[$key]['meta_title'] = $matches[1]; } $smarty->assign('cmslinks', $links); } Link to comment Share on other sites More sharing options...
beginning Posted December 5, 2009 Share Posted December 5, 2009 Hi I did add this module. But I dont find where to Control position on link in information bar ??Any help please Link to comment Share on other sites More sharing options...
Halguane Posted December 5, 2009 Share Posted December 5, 2009 Mille merci c'est exactement le module que je cherchais !!! Merci Merci !!! Link to comment Share on other sites More sharing options...
poplol Posted April 21, 2010 Share Posted April 21, 2010 The module worked fine apart that the page in the browser comes up with the 01. TITLE in the title bar... how can i fix that ?The sitemap works fine Link to comment Share on other sites More sharing options...
Mallee Boy Posted April 29, 2010 Share Posted April 29, 2010 Where do i control the position in this module? Link to comment Share on other sites More sharing options...
Dan1 Posted November 16, 2010 Share Posted November 16, 2010 Thank you for this nice module. Link to comment Share on other sites More sharing options...
Nico34 Posted December 2, 2010 Share Posted December 2, 2010 Bonjour,Cela fonctionne sur la 1.3.2 ? Link to comment Share on other sites More sharing options...
vithiely Posted November 8, 2011 Share Posted November 8, 2011 Bonjour, Merci MP pour ce module bien pratique (bien que sur une 1.4.5.1 l'admin ne fonctionne pas trop). Je souhaiterais modifier le code pour qu'il n'affiche que les CMS de la categorie "Accueil" car il affiche tout les CMS (par exemple les toutes les FAQ), or je fais déjà cela dans un autre bloc. Pouvez vous svp me dire comment je peux réaliser cela ? Merci, V. 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