addInto_plugin_logos = get_bloginfo('wpurl').'/wp-content/plugins/addinto/logos'; $this->bloginfo_lng = get_bloginfo('language'); if($_POST['addinto']) { $this->update_vars($_POST['addinto']); } } function update_vars ($vars) { foreach($vars as $key => $value) { if(get_option($key)) { update_option($key, $value); } else { add_option($key, $value); } } } function admin_menu () { add_options_page('AddInto Options', 'AddInto', 8, __FILE__, array(&$this, 'plugin_options')); } function plugin_options () { $langue = explode(",",$this->bloginfo_lng); $langue = StrToLower(substr(chop($langue[0]),0,2)); $langue = ($langue == 'fr') ? 'fr' : 'en'; // ----- $logo_addinto = (get_option('ai_button_logo') == 'logo_addinto') ? ' checked="checked"' : ''; $logo4 = (get_option('ai_button_logo') == 'logo4') ? ' checked="checked"' : ''; $logo1 = (get_option('ai_button_logo') == 'logo1') ? ' checked="checked"' : ''; $logo5 = (get_option('ai_button_logo') == 'logo5_fr' or get_option('ai_button_logo') == 'logo5_en') ? ' checked="checked"' : ''; $logo7 = (get_option('ai_button_logo') == 'logo7_fr' or get_option('ai_button_logo') == 'logo7_en') ? ' checked="checked"' : ''; // ----- $dropdown_yes = (get_option('ai_dropdown') == 'yes') ? ' checked="checked"' : ''; $dropdown_no = (get_option('ai_dropdown') == 'no') ? ' checked="checked"' : ''; $dd_onclick_yes = (get_option('ai_dd_onclick') == 'yes') ? ' checked="checked"' : ''; $dd_onclick_no = (get_option('ai_dd_onclick') == 'no') ? ' checked="checked"' : ''; $hide_embed_yes = (get_option('ai_hide_embed') == 'yes') ? ' checked="checked"' : ''; $hide_embed_no = (get_option('ai_hide_embed') == 'no') ? ' checked="checked"' : ''; // ----- $align_left = (get_option('ai_align') == 'left') ? ' selected="selected"' : ''; $align_center = (get_option('ai_align') == 'center') ? ' selected="selected"' : ''; $align_right = (get_option('ai_align') == 'right') ? ' selected="selected"' : ''; // ----- $display_on_home_yes = (get_option('ai_display_on_home') == 'yes') ? ' checked="checked"' : ''; $display_on_home_no = (get_option('ai_display_on_home') == 'no') ? ' checked="checked"' : ''; $display_on_pages_yes = (get_option('ai_display_on_pages') == 'yes') ? ' checked="checked"' : ''; $display_on_pages_no = (get_option('ai_display_on_pages') == 'no') ? ' checked="checked"' : ''; $display_on_archives_yes = (get_option('ai_display_on_archives') == 'yes') ? ' checked="checked"' : ''; $display_on_archives_no = (get_option('ai_display_on_archives') == 'no') ? ' checked="checked"' : ''; $display_on_categories_yes = (get_option('ai_display_on_categories') == 'yes') ? ' checked="checked"' : ''; $display_on_categories_no = (get_option('ai_display_on_categories') == 'no') ? ' checked="checked"' : ''; // ----- $display_type_item = (get_option('ai_display_type') == 'item') ? ' selected="selected"' : ''; $display_type_bkmk = (get_option('ai_display_type') == 'bkmk') ? ' selected="selected"' : ''; $display_type_mail = (get_option('ai_display_type') == 'mail') ? ' selected="selected"' : ''; // ----- $services_lng_all = (get_option('ai_services_lng') == 'all') ? ' selected="selected"' : ''; $services_lng_en = (get_option('ai_services_lng') == 'en') ? ' selected="selected"' : ''; $services_lng_fr = (get_option('ai_services_lng') == 'fr') ? ' selected="selected"' : ''; ?>

id="logo_addinto" /> id="logo4" /> id="logo1" /> id="logo5" /> id="logo7" />
/> />
/> />
/> />
: /> />
: /> />
: /> />
: /> />

ID)); $logo = get_option('ai_button_logo'); $align = get_option('ai_align'); $type = get_option('ai_display_type'); $dropdown = get_option('ai_dropdown'); $dd_onclick = (get_option('ai_dd_onclick') == 'yes') ? 'onclick' : 'onmouseover'; $dd_popup = (get_option('ai_dd_onclick') == 'no') ? ' onclick="return addinto_pop_win(\''.$post_title.'\', \''.$post_link.'\');"' : ''; $lng = (get_option('ai_services_lng') == 'all') ? '' : '&lng='.get_option('ai_services_lng'); $button = ''; $button .= '
'; if($dropdown == 'yes') { $button .= ''; $button .= ''.__('Bookmark/share with AddInto', 'addinto').''; $button .= ''; } else { $button .= ''; $button .= ''.__('Bookmark/share with AddInto', 'addinto').''; $button .= ''; } $button .= '
'; return $button; } function addinto_js () { $type = get_option('ai_display_type'); $lng_dd = (get_option('ai_services_lng') == 'all') ? '' : get_option('ai_services_lng'); $hide_embed = (get_option('ai_hide_embed') == 'yes') ? '1' : '0'; echo ''; echo ''; } function display ($content) { $display_home = get_option('ai_display_on_home'); $display_pages = get_option('ai_display_on_pages'); $display_archives = get_option('ai_display_on_archives'); $display_categories = get_option('ai_display_on_categories'); if (is_feed()) return $content; elseif (is_single()) return $content .= $this->write_button(); elseif (is_home() && $display_home == 'yes') return $content .= $this->write_button(); elseif (is_page() && $display_pages == 'yes') return $content .= $this->write_button(); elseif (is_archive() && $display_archives == 'yes') return $content .= $this->write_button(); elseif (is_category() && $display_categories == 'yes') return $content .= $this->write_button(); } } $AddInto =& new AddInto_plugin(); ?>