append('head_elements', ' '); $template->set_filenames( array('plugin_admin_content' => ADDTHIS_ROOT.'/admin/AddThis.tpl') ); include ADDTHIS_INC_PATH.'constants.inc.php'; if (isset($_POST['submit'])) { $me->my_config['HomeButton'] = $_POST['HomeButton']; $me->my_config['CategoryButton']= $_POST['CategoryButton']; $me->my_config['ImageButton'] = $_POST['ImageButton']; $me->my_config['addthis_icon_nb'] = $_POST['addthis_icon_nb']; $me->my_config['addthis_icon_text'] = $_POST['addthis_icon_text']; $me->my_config['addthis_brand'] = $_POST['addthis_brand']; $me->my_config['addthis_pub'] = $_POST['addthis_pub']; $me->my_config['addthis_language'] = $_POST['addthis_language']; $me->my_config['addthis_languser'] = isset($_POST['addthis_languser']); $me->my_config['addthis_header_background'] = $_POST['addthis_header_background']; $me->my_config['addthis_header_color'] = $_POST['addthis_header_color']; $me->my_config['addthis_offset_top'] = $_POST['addthis_offset_top']; $me->my_config['addthis_offset_left'] = $_POST['addthis_offset_left']; $me->my_config['addthis_hover_delay'] = $_POST['addthis_hover_delay']; $nb_check = 0; foreach ($me->my_config['addthis_options'] as $key => $value) { $me->my_config['addthis_options'][$key] = isset($_POST[$key]); if (isset($_POST[$key])) $nb_check++; } if ( ($me->my_config['HomeButton'] == 8 || $me->my_config['CategoryButton'] == 8 || $me->my_config['ImageButton'] == 8) && $nb_check > $me->my_config['addthis_icon_nb']) array_push($page['errors'], l10n('addthis_admin_icon_nb')); $me->save_config(); array_push($page['infos'], l10n('addthis_admin_saveOK')); } if (isset($_POST['restore'])) { $me->restore_default_config(); $me->save_config(); array_push($page['infos'], l10n('addthis_admin_defautvalueOK')); } foreach ($me->my_config['addthis_options'] as $key => $value) { $template->assign(array( $key => ($value ? 'checked="checked"' : '' ) )); } // Affichage des choix normal possibles pour Piclens for ($i=0; $iappend('Language_list',array('ID' => $language_list[0][$i],'NAME' => $language_list[1][$i],'SELECTED' => ($me->my_config['addthis_language'] == $language_list[0][$i] ? 'selected' : ''))); } $template->assign(array( 'Homebutton'.$me->my_config['HomeButton'].'_checked' => 'checked="checked"', 'Categorybutton'.$me->my_config['CategoryButton'].'_checked' => 'checked="checked"', 'Imagebutton'.$me->my_config['ImageButton'].'_checked' => 'checked="checked"', 'ADDTHIS_ICON_NB' => $me->my_config['addthis_icon_nb'], 'ADDTHIS_ICON_TEXT' => $me->my_config['addthis_icon_text'], 'ADDTHIS_BRAND' => $me->my_config['addthis_brand'], 'ADDTHIS_PUB' => $me->my_config['addthis_pub'], 'ADDTHIS_LANG_USER' => ($me->my_config['addthis_languser'] ? 'checked="checked"' : ''), 'ADDTHIS_HEADER_BACKGROUND' => $me->my_config['addthis_header_background'], 'ADDTHIS_HEADER_COLOR' => $me->my_config['addthis_header_color'], 'ADDTHIS_OFFSET_TOP' => $me->my_config['addthis_offset_top'], 'ADDTHIS_OFFSET_LEFT' => $me->my_config['addthis_offset_left'], 'ADDTHIS_HOVER_DELAY' => $me->my_config['addthis_hover_delay'] )); $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); ?>