Customization Options] Version: 1.1.7 Author: Addmarx Author URI: http://www.addmarx.com/ */ /* Copyright 2009 Addmarx (email : addmarx@gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ function ADDMARX_options_page() { $addmarx_wpurl = get_bloginfo('wpurl'); if( $_POST[ 'ADDMARX_submit_hidden' ] == 'Y' ) { $addmarx_js_stripped_update = stripslashes($_POST['ADDMARX_js']); $addmarx_js_stripped_update_2 = preg_replace('/http:\/\/www.addmarx.com\/bookmarx2.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/bookmarx2.png' , $addmarx_js_stripped_update, 1); $addmarx_js_stripped_update_3 = preg_replace('/http:\/\/www.addmarx.com\/bookmarx.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/bookmarx.png' , $addmarx_js_stripped_update_2, 1); $addmarx_js_stripped_update_4 = preg_replace('/http:\/\/www.addmarx.com\/sharemarx.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/sharemarx.png' , $addmarx_js_stripped_update_3, 1); $addmarx_js_stripped_update_5 = preg_replace('/http:\/\/www.addmarx.com\/sharemarx2.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/sharemarx2.png' , $addmarx_js_stripped_update_4, 1); $addmarx_js_stripped_update_6 = preg_replace('/http:\/\/www.addmarx.com\/emailmarx.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/emailmarx.png' , $addmarx_js_stripped_update_5, 1); $addmarx_js_stripped_update_7 = preg_replace('/http:\/\/www.addmarx.com\/sharebookmarx.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/sharebookmarx.png' , $addmarx_js_stripped_update_6, 1); $addmarx_js_stripped_update_8 = preg_replace('/http:\/\/www.addmarx.com\/shareemailbookmarx.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/shareemailbookmarx.png' , $addmarx_js_stripped_update_7, 1); $addmarx_js_stripped_update_9 = preg_replace('/http:\/\/www.addmarx.com\/shareemaillinkbookmarx.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/shareemaillinkbookmarx.png' , $addmarx_js_stripped_update_8, 1); $addmarx_js_stripped_update_10 = preg_replace('/http:\/\/www.addmarx.com\/linkmarx.png/', $addmarx_wpurl.'/wp-content/plugins/addmarx/linkmarx.png' , $addmarx_js_stripped_update_9, 1); if($_POST[ 'ADDMARX_mouseover' ] == '1') { $addmarx_js_stripped_update_10 = str_replace("clickDynamic1(this); return false;\" href=\"http://www.addmarx.com\">\"WordPress\"WordPress", "

", $addmarx_js_stripped_update_10); $addmarx_js_stripped_update_10 = str_replace("

", "

", $addmarx_js_stripped_update_10); } if($_POST[ 'ADDMARX_spacer' ] != '1') { $addmarx_js_stripped_update_10 = str_replace("

", " ", $addmarx_js_stripped_update_10); } update_option( 'ADDMARX_main', ($_POST['ADDMARX_main']=='1') ? '1':'-1' ); update_option( 'ADDMARX_posts', ($_POST['ADDMARX_posts']=='1') ? '1':'-1' ); update_option( 'ADDMARX_pages', ($_POST['ADDMARX_pages']=='1') ? '1':'-1' ); update_option( 'ADDMARX_mouseover', ($_POST['ADDMARX_mouseover']=='1') ? '1':'-1' ); update_option( 'ADDMARX_spacer', ($_POST['ADDMARX_spacer']=='1') ? '1':'-1' ); update_option( 'ADDMARX_js', ($_POST['ADDMARX_js']=='') ? '':$addmarx_js_stripped_update_10 ); ?>

Placement



To activate Addmarx as a sidebar widget, please visit the widgets page.
Note: Addmarx as a sidebar widget will not obey any of the above placement settings (it will appear on any page that is defined to have a sidebar widget regardless of the above checkbox options). However, it will obey all the customization options below (code options as well as customized colors).
Customization

linkscolor = "000000"; highlightscolor = "888888"; backgroundcolor = "FFFFFF"; channel = "none";

'; if (get_option('ADDMARX_js') != '') { $addmarx_content = get_option('ADDMARX_js'); } if (( !is_page() && !is_single() && ((get_option('ADDMARX_main')=='') || (get_option('ADDMARX_main')=='1'))) || ( !is_page() && is_single() && ((get_option('ADDMARX_posts')=='') || (get_option('ADDMARX_posts')=='1'))) || ( is_page() && ((get_option('ADDMARX_pages')=='') || (get_option('ADDMARX_pages')=='1')))) $content .= $addmarx_content; return $content; } function ADDMARX_widget($args) { // Pre-2.6 compatibility if(!defined('WP_PLUGIN_URL')) { if(!defined('WP_CONTENT_URL')) { define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); } define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins'); } if(!defined('WP_PLUGIN_DIR')) { if(!defined('WP_CONTENT_DIR')) { define('WP_CONTENT_DIR', ABSPATH . 'wp-content'); } define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins'); } $addmarx_wpurl_widget = get_bloginfo('wpurl'); $addmarx_content_widget = '

'; if (get_option('ADDMARX_js') != '') { $addmarx_content_widget = get_option('ADDMARX_js'); } $addmarx_content_widget = preg_replace('/margin-left:.*px/', 'margin-left:-175px' , $addmarx_content_widget, 1); // Set title to null $title = ""; // Help widget to conform to the active theme: before_widget, before_title and after_title extract($args); echo $before_widget . $before_title . $title . $after_title; // Display Addmarx echo $addmarx_content_widget; // Help widget to conform to the active theme: after_widget echo $after_widget; } function ADDMARX_widget_control() { echo 'To edit Addmarx, please see the options page'; } function ADDMARX_widget_init() { if(function_exists('register_sidebar_widget')) { register_sidebar_widget(__('Addmarx'), 'ADDMARX_widget'); } if(function_exists('register_widget_control')) { register_widget_control(array(__('Addmarx'), 'widgets'), 'ADDMARX_widget_control'); } } add_action("plugins_loaded", "ADDMARX_widget_init"); add_action('the_content', 'ADDMARX_content'); add_action('admin_menu', 'ADDMARX_menu'); ?>