コード例 #1
0
    function addthis_wordpress_mode_tabs()
    {
        global $addThisConfigs;
        global $cmsConnector;
        $options = $addThisConfigs->getConfigs();
        ?>
        <div class="Main-content" id="tabs">
            <ul class="Tabbed-nav">
                <li class="Tabbed-nav-item"><a href="#tabs-1">Sharing Tools</a></li>
                <li class="Tabbed-nav-item"><a href="#tabs-2">Advanced Options</a></li>
            </ul>

            <div id="tabs-1">
                <input
                    type="hidden"
                    value="<?php 
        echo $options['atversion'];
        ?>
"
                    name="addthis_settings[atversion]"
                    id="addthis_atversion_hidden" />
                <input
                    type="hidden"
                    value="<?php 
        echo $options['atversion_update_status'];
        ?>
"
                    name="addthis_settings[atversion_update_status]"
                    id="addthis_atversion_update_status" />
                <input
                    type="hidden"
                    value="<?php 
        echo $options['credential_validation_status'];
        ?>
"
                    name="addthis_settings[credential_validation_status]"
                    id="addthis_credential_validation_status" />

                <div class="Card" id="Card-above-post">
                    <div class="Card-hd">
                        <div class="at-tool-toggle">
                            <input
                                type="checkbox"
                                value="true"
                                name="addthis_settings[addthis_above_enabled]"
                                class="addthis-toggle-cb"
                                id="addthis_above_enabled"
                                style="display:none;" <?php 
        echo $options['addthis_above_enabled'] != false ? 'checked="checked"' : '';
        ?>
/>
                            <div
                                id="addthis_above_enabled_switch"
                                class="addthis-switch <?php 
        echo $options['addthis_above_enabled'] != false ? 'addthis-switchOn' : '';
        ?>
">
                            </div>
                        </div>
                        <h3 class="Card-hd-title">Sharing Buttons Above Content</h3>
                        <ul class="Tabbed-nav">
                            <li class="Tabbed-nav-item"><a href="#top-1">Style</a></li>
                            <li class="Tabbed-nav-item"><a href="#top-2">Options</a></li>
                        </ul>
                    </div>
                    <div class="addthis_above_enabled_overlay" >
                        <div  class="Card-bd">
                            <div id="top-1">
                                <?php 
        _addthis_choose_icons('above', $options);
        ?>
                            </div>
                            <div id="top-2">
                                <?php 
        _addthis_print_template_checkboxes('above');
        ?>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="Card" id="Card-below-post">
                    <div class="Card-hd">
                        <div class="at-tool-toggle">
                            <input
                                type="checkbox"
                                value="true"
                                name="addthis_settings[addthis_below_enabled]"
                                class="addthis-toggle-cb"
                                id="addthis_below_enabled"
                                style="display:none;" <?php 
        echo $options['addthis_below_enabled'] != false ? 'checked="checked"' : '';
        ?>
/>
                            <div
                                id="addthis_below_enabled_switch"
                                class="addthis-switch <?php 
        echo $options['addthis_below_enabled'] != false ? 'addthis-switchOn' : '';
        ?>
">
                            </div>
                        </div>
                        <h3 class="Card-hd-title">Sharing Buttons Below Content</h3>
                        <ul class="Tabbed-nav">
                            <li class="Tabbed-nav-item"><a href="#bottom-1">Style</a></li>
                            <li class="Tabbed-nav-item"><a href="#bottom-2">Options</a></li>
                        </ul>
                    </div>
                    <div class="addthis_below_enabled_overlay">
                        <div class="Card-bd">
                            <div id="bottom-1">
                                <?php 
        _addthis_choose_icons('below', $options);
        ?>
                            </div>
                            <div id="bottom-2">
                                <?php 
        _addthis_print_template_checkboxes('below');
        ?>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="Card"  id="Card-side-sharing">
                    <div class="Card-hd">
                        <div class="at-tool-toggle">
                            <input
                                type="checkbox"
                                value="true"
                                name="addthis_settings[addthis_sidebar_enabled]"
                                class="addthis-toggle-cb" id="addthis_sidebar_enabled"
                                style="display:none;" <?php 
        echo $options['addthis_sidebar_enabled'] != false ? 'checked="checked"' : '';
        ?>
/>
                            <div
                                id="addthis_sidebar_enabled_switch"
                                class="addthis-switch <?php 
        echo $options['addthis_sidebar_enabled'] != false ? 'addthis-switchOn' : '';
        ?>
">
                            </div>
                        </div>
                        <h3 class="Card-hd-title">Sharing Sidebar</h3>
                        <ul class="Tabbed-nav">
                            <li class="Tabbed-nav-item"><a href="#side-1">Style</a></li>
                            <li class="Tabbed-nav-item"><a href="#side-2">Options</a></li>
                        </ul>
                    </div>
                    <div class="addthis_sidebar_enabled_overlay">
                        <div class="Card-bd">
                            <div id="side-1">
                                <p>These buttons will appear on the side of the page, along the edge.</p>
                                <img src="<?php 
        echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_light.png';
        ?>
" />
                                <ul>
                                    <li>
                                        <strong>Position</strong>
                                        <label for="addthis_sidebar_position_left" class="addthis-sidebar-position-label">
                                            <input
                                                type="radio"
                                                id="addthis_sidebar_position_left"
                                                name="addthis_settings[addthis_sidebar_position]"
                                                value="left" <?php 
        echo $options['addthis_sidebar_position'] == 'left' ? 'checked="checked"' : '';
        ?>
/>
                                            <span class="addthis-checkbox-label">Left</span>
                                        </label>
                                        <label for="addthis_sidebar_position_right" class="addthis-sidebar-position-label">
                                            <input
                                                type="radio"
                                                id="addthis_sidebar_position_right"
                                                name="addthis_settings[addthis_sidebar_position]"
                                                value="right" <?php 
        echo $options['addthis_sidebar_position'] == 'right' ? 'checked="checked"' : '';
        ?>
/>
                                            <span class="addthis-checkbox-label">Right</span>
                                        </label>
                                    </li>
                                </ul>
                            </div>
                            <div id="side-2">
                                <?php 
        _addthis_print_template_checkboxes('sidebar');
        ?>
                                <ul>
                                    <li>
                                        <label for="addthis_sidebar_count">
                                            <strong>Buttons</strong>
                                            <span class="at-wp-tooltip" tooltip="The number of social sharing buttons to show in the side sharing tool.">?</span>
                                        </label>
                                        <select id="addthis_sidebar_count" name="addthis_settings[addthis_sidebar_count]">
                                            <?php 
        for ($i = 1; $i < 7; $i++) {
            echo '<option value="' . $i . '"' . ($options['addthis_sidebar_count'] == $i ? " selected='selected'" : "") . '>' . $i . '</option>';
        }
        ?>
                                        </select>
                                    </li>
                                    <li>
                                        <label for="addthis_sidebar_theme">
                                            <strong>Theme</strong>
                                            <span class="at-wp-tooltip" tooltip="You can select the background color that better matches the look of your site for the expand/minimize arrow on the side sharing tool.">?</span>
                                        </label>
                                        <select id="addthis_sidebar_theme" name="addthis_settings[addthis_sidebar_theme]">
                                            <?php 
        $themes = array("Transparent", "Light", "Gray", "Dark");
        foreach ($themes as $theme) {
            echo '<option value="' . $theme . '"' . ($options['addthis_sidebar_theme'] == $theme ? " selected='selected'" : "") . '>' . $theme . '</option>';
        }
        ?>
                                        </select>
                                        <br />
                                        <img src="<?php 
        echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_light.png';
        ?>
" id="sbpreview_Light"/>
                                        <img src="<?php 
        echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_gray.png';
        ?>
" id="sbpreview_Gray"/>
                                        <img src="<?php 
        echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_dark.png';
        ?>
" id="sbpreview_Dark"/>
                                        <img src="<?php 
        echo $cmsConnector->getPluginImageFolderUrl() . 'sidebar_theme_light.png';
        ?>
" id="sbpreview_Transparent"/>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <?php 
        echo _addthis_rate_us_card();
        ?>
            </div>
            <div id="tabs-2">
                <?php 
        echo _addthis_tracking_card();
        ?>

                <?php 
        echo _addthis_display_options_card();
        ?>

                <?php 
        echo _addthis_additional_options_card();
        ?>

                <?php 
        echo _addthis_profile_id_card($options['credential_validation_status']);
        ?>

                <?php 
        echo _addthis_mode_card();
        ?>
            </div>
        </div>
        <?php 
    }
コード例 #2
0
function addthis_plugin_options_php4()
{
    require_once 'addthis_settings_functions.php';
    global $addthis_styles;
    global $addthis_languages;
    global $addthis_settings;
    global $addthis_menu_types;
    global $addthis_new_styles;
    global $addthis_default_options;
    global $addthis_addjs;
    global $current_user;
    $user_id = $current_user->ID;
    if (get_user_meta($user_id, 'addthis_nag_updated_options')) {
        delete_user_meta($user_id, 'addthis_nag_updated_options', 'true');
    }
    ?>
    <div class="wrap">
    <h2 class='placeholder'>&nbsp;</h2>
    
    <form  id="addthis_settings" method="post" action="options.php">
    <?php 
    // use the old-school settings style in older versions of wordpress
    if (addthis_get_wp_version() >= 2.7 || apply_filters('at_assume_latest', __return_false()) || apply_filters('addthis_assume_latest', __return_false())) {
        settings_fields('addthis');
    } else {
        wp_nonce_field('update-options');
    }
    $addthis_options = get_option('addthis_settings');
    if ($addthis_options == false) {
        add_option('addthis_settings', array());
    }
    foreach (array('addthis_show_stats', 'addthis_append_data', 'addthis_showonhome', 'addthis_showonpages', 'addthis_showonarchives', 'addthis_showoncats') as $option) {
        if ($addthis_options && !isset($addthis_options[$option])) {
            $addthis_options[$option] = false;
        }
    }
    $options = wp_parse_args($addthis_options, $addthis_default_options);
    extract($options);
    ?>

    <p><?php 
    echo $addthis_addjs->getAtPluginPromoText();
    ?>
</p>
    <img alt='addthis' src="//cache.addthis.com/icons/v1/thumbs/32x32/more.png" class="header-img"/>
    <span class="addthis-title">AddThis</span> <span class="addthis-plugin-name">Share</span>
    <div class="page-header" id="tabs">
        <ul class="nav-tab-wrapper">
            <li><h2 class="nav-tab-wrapper"><a href="#tabs-1">Basic</a></h2></li>
            <li><h2 class="nav-tab-wrapper"><a href="#tabs-2">Advanced</a></h2></li>
            <li style="float: right; border: none;padding-right:0px;"> 
            <strong><?php 
    _e("AddThis Profile ID:", 'addthis_trans_domain');
    ?>
</strong>
            <input id="addthis_profile"  type="text" name="addthis_settings[addthis_profile]" value="<?php 
    echo $profile;
    ?>
" autofill='off' autocomplete='off'  />
            <br />
            <span id="addthis-profile-validation-message" style="float: right;color:red;font-size:10px"></span>
                                                <?php 
    if ($credential_validation_status == 1) {
        echo '<span style="float: right;color:green;font-size:10px;">&#10004; Valid AddThis Profile ID</span>';
    }
    ?>
            </li>
        </ul>
        <div class='clear'>&nbsp;</div> 
        
        <div id="tabs-1">
        	<div style="float: left;width: 620px; margin-right: 10px;">
                        <?php 
    echo $version_notification_content = _addthis_version_notification($atversion_update_status, $atversion);
    ?>
                        <input type="hidden" value="<?php 
    echo $atversion;
    ?>
"  name="addthis_settings[atversion]" id="addthis_atversion_hidden" />
                        <input type="hidden" value="<?php 
    echo $atversion_update_status;
    ?>
"  name="addthis_settings[atversion_update_status]" id="addthis_atversion_update_status" />
                        <input type="hidden" value="<?php 
    echo $credential_validation_status;
    ?>
"  name="addthis_settings[credential_validation_status]" id="addthis_credential_validation_status" />
			<table class="form-table">
				<tbody>
				<?php 
    _addthis_choose_icons('above', $options);
    ?>
				<?php 
    _addthis_choose_icons('below', $options);
    ?>
				</tbody>
			</table>
			
			<br/>
			
			<div style="margin-left:5px;font-weight:bold">
				<?php 
    _e("<a href='https://www.addthis.com/register?profile=wpp' target='_blank'>Register</a> for free in-depth analytics reports and better understand your site's social traffic.", 'addthis_trans_domain');
    ?>
			</div>
			<table class="form-table" style="width:600px;">
				<tbody>
					<tr valign="top">
						<td width="200"><?php 
    _e("AddThis email / username:"******"addthis_username"  type="text" name="addthis_settings[addthis_username]" value="<?php 
    echo $username;
    ?>
" autofill='off' autocomplete='off'  /></td>
					</tr>
					<tr id="password_row" >
						<td><?php 
    _e("AddThis password:"******"font-size:10px">(required for displaying stats)</span></td>
						<td><input id="addthis_password" type="password" name="addthis_settings[addthis_password]" value="<?php 
    echo $password;
    ?>
" autocomplete='off' autofill='off'  /></td>
					</tr>
                                        <tr>
                                            <td style="height:32px">
                                                
                                            </td>
                                            <td style="vertical-align:top;margin-top:0;padding-top:0;line-height:5px;font-size:10px">
                                                <img class="addthis-admin-loader" style="display:none" src="<?php 
    echo plugins_url('img/loader.gif', __FILE__);
    ?>
" />
                                                <span class="addthis-admin-loader" style="display:none;color:gray">Connecting to AddThis profile <?php 
    echo $profile;
    ?>
..</span>
                                                <span id="addthis-credential-validation-message" style="color:red"></span>
                                                <?php 
    if ($credential_validation_status == 1) {
        echo '<span style="color:green">&#10004; Valid AddThis Credentials</span>';
    }
    ?>
                                            </td>
                                        </tr>
				</tbody>
			</table>
			<div class='clear'>&nbsp;</div>  
			<br/>
			</div>
			
			<div style="display:block; float:left; width:470px;">
                <div id="preview_floater">
        			<table class="form-table">
            			<tbody>
                			<tr>
                                <td id="below" colspan="2">
                                    <fieldset>  
                        				<legend id="previewHeader">&nbsp;<strong>Preview</strong> &nbsp;</legend>
                        	            <div id="previewBox" class="previewbox">
                        			    	<div id="addthis_share_demo" class="addthis_tshare_demo" >
                                                <div class="addthis-share-list">
                                                    <h3 style="margin-top:0;">Another Post with Everything in it</h3>
                                                    <div id="above_previewContainer" style="float: left; width: 100%;"></div>
                                                    <p style="float: left; width: 100%;">Published by <a href="#">admin</a> on September 17, 2008 | <a href="#">2 Responses</a> | <a href="#">Edit</a></p> 
                                                    <div id="preview_post"><p style="float: left; width: 100%;">Lorem dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p></div>
                                                    <div id="below_previewContainer" style="float: left; width: 100%;"></div>
                                                    <p style="float:left;">Posted in <a href="#">Child Category I</a>, <a href="#">Parent Category I</a>, <a href="#">Parent Category II</a></p>
                                                  </div>
                        			          </div>                    
                        			    </div>      				
                        			</fieldset>	
                    	        </td>
                            </tr>
                        </tbody>
        			</table>
                </div>
		    </div>
		</div>

        <div id="tabs-2">
            <?php 
    echo $version_notification_content;
    ?>
			<table class="form-table">
                <tr>
                    <th><h2>Show AddThis on &hellip;</h2></th> 

                </tr>
					<th scope="row"><?php 
    _e("homepage:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_showonhome]" value="true" <?php 
    echo $addthis_showonhome == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
					<th scope="row"><?php 
    _e("<a href=\"//codex.wordpress.org/Pages\" target=\"blank\">pages</a>:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_showonpages]" value="true" <?php 
    echo $addthis_showonpages == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
					<th scope="row"><?php 
    _e("archives:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_showonarchives]" value="true" <?php 
    echo $addthis_showonarchives == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
					<th scope="row"><?php 
    _e("categories:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_showoncats]" value="true" <?php 
    echo $addthis_showoncats == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
					<th scope="row"><?php 
    _e("excerpts:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_showonexcerpts]" value="true" <?php 
    echo $addthis_showonexcerpts == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<?php 
    if ($addthis_settings['placement'] != "0") {
        ?>
					<tr>
						<th scope="row"><?php 
        _e("after title:", 'addthis_trans_domain');
        ?>
</th>
						<td><input type="checkbox" name="addthis_settings[addthis_aftertitle]" value="true" <?php 
        echo $addthis_aftertitle == true ? 'checked="checked"' : '';
        ?>
/></td>
					</tr>
					<tr>
						<th scope="row"><?php 
        _e("before comments:", 'addthis_trans_domain');
        ?>
</th>
						<td><input type="checkbox" name="addthis_settings[addthis_beforecomments]" value="true" <?php 
        echo $addthis_beforecomments == true ? 'checked="checked"' : '';
        ?>
/></td>
					</tr>
				<?php 
    }
    ?>
                <tr>
                    <th><h2>Have AddThis track &hellip;</h2></th> 
                </tr>
				<tr>
					<th scope="row"><?php 
    _e("<a href=\"//www.addthis.com/blog/2010/03/11/clickback-analytics-measure-traffic-back-to-your-site-from-addthis/\" target=\"_blank\">clickbacks</a>:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_append_data]" value="true" <?php 
    echo $addthis_append_data == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
					<th scope="row"><?php 
    _e("address bar shares:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_addressbar]" value="true" <?php 
    echo $addthis_addressbar == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
					<th scope="row"><?php 
    _e("copied text:", 'addthis_trans_domain');
    ?>
</th>
                    <?php 
    if (isset($addthis_copytracking1) && $addthis_copytracking1 == true) {
        echo "<input type='hidden' name='addthis_settings[addthis_copytrackingremove' value='true'/>";
        $addthis_copytracking2 = false;
    }
    ?>
<!--					<td><input type="checkbox" name="addthis_settings[addthis_copytracking1]" value="true" <?php 
    echo $addthis_copytracking1 == true ? 'checked="checked"' : '';
    ?>
/></td> -->
					<td><input type="checkbox" name="addthis_settings[addthis_copytracking2]" value="true" <?php 
    echo $addthis_copytracking2 == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
                <tr>
                    <th><h2>Display Options</h2></th>
                </tr>
				<tr valign="top">
					<td colspan="2">For more details on the following options, see <a href="//support.addthis.com/customer/portal/articles/381263-addthis-client-api">our customization documentation</a>.</td>
				</tr>
				<tr valign="top">
					<th scope="row"><?php 
    _e("Custom service list:", 'addthis_trans_domain');
    ?>
<br /><span class='description'><?php 
    _e('Important: AddThis optimizes displayed services based on popularity and language, and personalizes the list for each user. You may decrease sharing by overriding these features.', 'addthis_trans_domain');
    ?>
					</span></th>
					  <td><input size='60' type="text" name="addthis_settings[addthis_options]" value="<?php 
    echo $addthis_options;
    ?>
" /><br />
					  <span class='description'><?php 
    _e('Enter a comma-separated list of <a href="//addthis.com/services/list">service codes</a>', 'addthis_trans_domain');
    ?>
</span>
					  </td>  
				</tr>
				<tr valign="top" class="classicFeature">
					<th scope="row"><?php 
    _e("Brand:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="text" name="addthis_settings[addthis_brand]" value="<?php 
    echo $addthis_brand;
    ?>
" /></td>
				</tr>
				<tr valign="top">
					<th scope="row"><?php 
    _e("Twitter via:", 'addthis_trans_domain');
    ?>
</th>
                                        <td><input type="text" name="addthis_settings[addthis_twitter_template]" value="<?php 
    echo get_first_twitter_username($addthis_twitter_template);
    ?>
" /></td>
				</tr>

				<tr valign="top">
					<th scope="row"><?php 
    _e("Language:", 'addthis_trans_domain');
    ?>
</th>
					<td>
						<select name="addthis_settings[addthis_language]">
						<?php 
    $curlng = $addthis_language;
    foreach ($addthis_languages as $lng => $name) {
        echo "<option value=\"{$lng}\"" . ($lng == $curlng ? " selected='selected'" : "") . ">{$name}</option>";
    }
    ?>
						</select>
					</td>
				</tr>
				<tr valign="top" class="classicFeature">
					<th scope="row"><?php 
    _e("Header background:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="text" name="addthis_settings[addthis_header_background]" value="<?php 
    echo $addthis_header_background;
    ?>
" /></td>
				</tr>
				<tr valign="top" class="classicFeature">
					<th scope="row"><?php 
    _e("Header color:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="text" name="addthis_settings[addthis_header_color]" value="<?php 
    echo $addthis_header_color;
    ?>
" /></td>
				</tr>

                <tr>
                    <th><h2>Additional Options</h2></th>
                </tr>
				<tr>
					<th scope="row"><?php 
    _e("Show analytics in admin dashboard:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_show_stats]" value="true" <?php 
    echo $addthis_show_stats == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
				<tr>
					<th scope="row"><?php 
    _e("Enable enhanced accessibility:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="checkbox" name="addthis_settings[addthis_508]" value="true" <?php 
    echo $addthis_508 == true ? 'checked="checked"' : '';
    ?>
/></td>
				</tr>
				<tr>
					<th scope="row"><?php 
    _e("Google Analytics property ID:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="text" name="addthis_settings[data_ga_property]" value="<?php 
    echo $data_ga_property;
    ?>
"/></td>
				</tr>

				<tr valign="top">
					<td colspan="2"></td>
				</tr>
				<tr valign="top">
					<th scope="row"><?php 
    _e("Bitly login:"******"text" name="addthis_settings[addthis_bitly_login]" value="<?php 
    echo $addthis_bitly_login;
    ?>
" /></td>
				</tr>
				<tr valign="top">
					<th scope="row"><?php 
    _e("Bitly key:", 'addthis_trans_domain');
    ?>
</th>
					<td><input type="text" name="addthis_settings[addthis_bitly_key]" value="<?php 
    echo $addthis_bitly_key;
    ?>
" /></td>
				</tr>
				<tr valign="top">
					<th scope="row"><?php 
    _e("addthis_config values:<br/><span class=\"description\">(json format)</span>", 'addthis_trans_domain');
    ?>
</th>
					<td><textarea rows='3' cols='40' type="text" name="addthis_settings[addthis_config_json]" id="addthis-config-json"/><?php 
    echo $addthis_config_json;
    ?>
</textarea></td>
					<td id="config-error" style="display: none;color: red;float: left;margin-top: 25px;width: 150px;">Invalid JSON format</td>
				</tr>
				<tr valign="top">
					<th scope="row"><?php 
    _e("addthis_share values:<br/><span class=\"description\">(json format)</span>", 'addthis_trans_domain');
    ?>
</th>
					<td><textarea rows='3' cols='40' type="text" name="addthis_settings[addthis_share_json]" id="addthis-share-json" /><?php 
    echo $addthis_share_json;
    ?>
</textarea></td>
					<td id="share-error" style="display: none;color: red;float: left;margin-top: 25px;width: 150px;">Invalid JSON format</td>
                </tr>               
			</table>
			<div class='clear'>&nbsp;</div>
		</div>
    </div>
    <div class="clear">&nbsp;</div>
	
    <p class="submit">
    <?php 
    // Build Preview Link
    $preview_link = esc_url(get_option('home') . '/');
    if (is_ssl()) {
        $preview_link = str_replace('http://', 'https://', $preview_link);
    }
    $stylesheet = get_option('stylesheet');
    $template = get_option('template');
    $preview_link = htmlspecialchars(add_query_arg(array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true'), $preview_link));
    ?>
    
		<input type="submit" name="Submit" value="<?php 
    _e('Save Changes');
    ?>
"  id="submit-button"/>
		<a href="<?php 
    echo $preview_link;
    ?>
" class="thickbox thickbox-preview" id="preview" ><?php 
    _e('Preview');
    ?>
</a>
    </p>

    </form>
    </div>
<?php 
}