'default', 'name' => 'Sobre', 'local_head' => 'local_head.tpl', ); /* Exemple pour les $conf sérialisés */ /* $conf['picture_informations'] = unserialize($conf['picture_informations']); $conf['picture_informations']['author'] = false; $conf['picture_informations'] = serialize($conf['picture_informations']); */ /* Language */ load_language('theme.lang', PHPWG_THEMES_PATH.'sobre/'); add_event_handler('loc_begin_page_header', 'set_sbre_header'); function set_sbre_header() { global $page, $conf, $template; $config = unserialize($conf['Sobre']); if (isset($page['body_id']) and $page['body_id'] == 'theCategoryPage') { $header = isset($page['category']) ? $config['categories'] : $config['home']; } elseif (isset($page['body_id']) and $page['body_id'] == 'thePicturePage') { $header = $config['picture']; } else { $header = $config['other']; } $template->assign('display_sbre_banner', $header); } /* Ajout d'une icône RSS à la suite du champs "Notifications" dans le menu "Menu" (menubar) */ add_event_handler('blockmanager_prepare_display', 'add_rss_icon'); function add_rss_icon() { global $lang; if (isset($lang['Notification'])) { $lang['Notification'] .= 'flux-rss'; } if (isset($lang['Notification RSS'])) { $lang['Notification RSS'] .= 'flux-rss'; } } /* coa_albums.tpl */ /* Mise en tableau des commentaires (ajout) */ $this->set_prefilter('comments_on_albums', 'Addon_picture_Pendings_05'); function Addon_picture_Pendings_05($content, &$smarty) { $pattern = '#
Votre commentaire ici. Merci{$comment_add.CONTENT} {\'Add a comment\'|@translate} {if $comment_add.SHOW_AUTHOR} {else} {/if} {/if} {/if}{*comments*} '; return preg_replace($pattern, $replacement, $content); } /* comment_list.tpl & stuffs_comment_list.tpl */ /* Petit formatage*/ $this->set_prefilter('comments', 'Addon_comments_Pendings_text'); $this->set_prefilter('stuffs', 'Addon_comments_Pendings_text'); function Addon_comments_Pendings_text($content, &$smarty) { $pattern = '{$comment.AUTHOR} - {$comment.DATE}'; $replacement = '{$comment.AUTHOR} - {$comment.DATE}'; return str_replace($pattern, $replacement, $content); } ?>