🌍
Français
Pages: 1
Bonjour
je cherche à redéclarer la variable qui permet de sélectionné la taille d'affichage par défaut des thumbnail via themeconfig.inc d'un thème.
Dans category_default.inc.php on a à la ligne 154
$template->assign( array( 'derivative_params' => trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv',IMG_THUMB) ) ), 'SHOW_THUMBNAIL_CAPTION' =>$conf['show_thumbnail_caption'], ) );
comment je peux déclarer IMG_SMALL à la place de IMG_THUMB dans themeconfig.inc?
Merci de votre aide
Hors ligne
add_event_handler('get_index_derivative_params', 'mon_theme_get_index_photo_derivative_params', EVENT_HANDLER_PRIORITY_NEUTRAL+1 ); function mon_theme_get_index_photo_derivative_params($default) { if (pwg_get_session_var('index_deriv')===null) {// pas de surcharge specifique par l'utilisateur return ImageStdParams::get_by_type(IMG_SMALL); } return $default; }
Hors ligne
Pages: 1