Advertisement
bradvin

ssb-admin.php

Feb 28th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 13.95 KB | None | 0 0
  1. <div class="wrap">
  2.  
  3. <style type="text/css">
  4.    div.inside ul li {
  5.       line-height: 16px;
  6.       list-style-type: square;
  7.       margin-left: 15px;
  8.    }
  9. </style>
  10.  
  11. <h2>Simple Social Buttons - <?php _e('Settings'); ?>:</h2>
  12.  
  13. <p><?php _e('<strong>Simple Social Buttons</strong> by <strong>Paweł Rabinek</strong>. This plugin adds a social media buttons, such as: <strong>Google +1</strong>, <strong>Facebook Like it</strong> and <strong>Twitter share</strong>. The most flexible social buttons plugin ever.', 'simplesocialbuttons'); ?></p>
  14.  
  15. <?php
  16.  
  17. if(strtolower($_POST['hiddenconfirm']) == 'y') {
  18.  
  19.     /**
  20.      * Compile settings array
  21.      * @see http://codex.wordpress.org/Function_Reference/wp_parse_args
  22.      */
  23.  
  24.     $updateSettings = array(
  25.         'googleplus' => $_POST['ssb_googleplus'],
  26.         'fblike' => $_POST['ssb_fblike'],
  27.         'twitter' => $_POST['ssb_twitter'],
  28.  
  29.         'beforepost' => $_POST['ssb_beforepost'],
  30.         'afterpost' => $_POST['ssb_afterpost'],
  31.         'beforepage' => $_POST['ssb_beforepage'],
  32.         'afterpage' => $_POST['ssb_afterpage'],
  33.         'beforearchive' => $_POST['ssb_beforearchive'],
  34.         'afterarchive' => $_POST['ssb_afterarchive'],
  35.  
  36.         'showfront' => $_POST['ssb_showfront'],
  37.         'showcategory' => $_POST['ssb_showcategory'],
  38.         'showarchive' => $_POST['ssb_showarchive'],
  39.         'showtag' => $_POST['ssb_showtag'],
  40.  
  41.         'override_css' => $_POST['ssb_override_css'],
  42.    
  43.     'twitter_username' => $_POST['ssb_twitter_username']
  44.     );
  45.  
  46.     $this->update_settings( $updateSettings );
  47.  
  48. }
  49.  
  50. /**
  51.  * HACK: Use one big array instead of a bunchload of single options
  52.  * @author Fabian Wolf
  53.  * @link http://usability-idealist.de/
  54.  * @since 1.2.1
  55.  */
  56.  
  57. // get settings from database
  58. $settings = $this->get_settings();
  59.  
  60. extract( $settings, EXTR_PREFIX_ALL, 'ssb' );
  61.  
  62. ?>
  63.  
  64.  
  65. <div class="postbox-container" style="width:69%">
  66.    <div id="poststuff">
  67.       <form name="ssb_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
  68.  
  69.       <div class="postbox">
  70.          <h3><?php _e('Select buttons', 'simplesocialbuttons'); ?></h3>
  71.          <div class="inside">
  72.             <h4><?php _e('Select social media buttons:', 'simplesocialbuttons'); ?></h4>
  73.  
  74.  
  75.             <p><select name="ssb_googleplus" id="ssb_googleplus">
  76.                 <option value=""<?php if(empty($ssb_googleplus) != false) {
  77.                      ?>selected="selected"<?php
  78.                 } ?>><?php _e('inactive', 'simplesocialbuttons'); ?></option>
  79.  
  80.             <?php for($pos = 1; $pos < 4; $pos++) { ?>
  81.                 <option value="<?php echo $pos; ?>"<?php if($ssb_googleplus == $pos) {
  82.                      ?>selected="selected"<?php
  83.                 } ?>> # <?php echo $pos; ?> </option>
  84.             <?php } ?>
  85.             </select> &nbsp;
  86.             <label for="ssb_googleplus"><?php _e('Google plus one (+1)', 'simplesocialbuttons'); ?></label></p>
  87.  
  88.             <!-- fblike -->
  89.             <p><select name="ssb_fblike" id="ssb_fblike">
  90.                 <option value=""<?php if(empty($ssb_fblike) != false) {
  91.                      ?>selected="selected"<?php
  92.                 } ?>><?php _e('inactive', 'simplesocialbuttons'); ?></option>
  93.  
  94.             <?php for($pos = 1; $pos < 4; $pos++) { ?>
  95.                 <option value="<?php echo $pos; ?>"<?php if($ssb_fblike == $pos) {
  96.                      ?>selected="selected"<?php
  97.                 } ?>> # <?php echo $pos; ?> </option>
  98.             <?php } ?>
  99.             </select> &nbsp;
  100.             <label for="ssb_fblike"><?php _e('Facebook Like it', 'simplesocialbuttons'); ?></label></p>
  101.             <!-- /fblike -->
  102.  
  103.             <!-- twitter -->
  104.             <p><select name="ssb_twitter" id="ssb_twitter">
  105.                 <option value=""<?php if(empty($ssb_twitter) != false) {
  106.                      ?>selected="selected"<?php
  107.                 } ?>><?php _e('inactive', 'simplesocialbuttons'); ?></option>
  108.  
  109.             <?php for($pos = 1; $pos < 4; $pos++) { ?>
  110.                 <option value="<?php echo $pos; ?>"<?php if($ssb_twitter == $pos) {
  111.                      ?>selected="selected"<?php
  112.                 } ?>> # <?php echo $pos; ?> </option>
  113.             <?php } ?>
  114.             </select> &nbsp;
  115.             <label for="ssb_twitter"><?php _e('Twitter share', 'simplesocialbuttons'); ?></label></p>
  116.             <!-- /twitter -->
  117.  
  118.             <p><label for="ssb_override_css"><input type="checkbox" name="ssb_override_css" id="ssb_override_css" value="1" <?php if($ssb_override_css) { echo 'checked="checked"'; } ?>/> <?php _e('Disable plugin CSS (only advanced users)'); ?></label></p>
  119.          </div>
  120.       </div>
  121.  
  122.       <div class="postbox">
  123.          <h3><?php _e('Single posts - display settings', 'simplesocialbuttons'); ?></h3>
  124.          <div class="inside">
  125.             <h4><?php _e('Place buttons on single post:', 'simplesocialbuttons'); ?></h4>
  126.             <p><input type="checkbox" name="ssb_beforepost" id="ssb_beforepost" value="1" <?php if(!empty($ssb_beforepost)) { ?>checked="checked"<?php } ?> /> <label for="ssb_beforepost"><?php _e('Before the content', 'simplesocialbuttons'); ?></label></p>
  127.             <p><input type="checkbox" name="ssb_afterpost" id="ssb_afterpost" value="1" <?php if(!empty($ssb_afterpost)) { ?>checked="checked"<?php } ?> /> <label for="ssb_afterpost"><?php _e('After the content', 'simplesocialbuttons'); ?></label></p>
  128.          </div>
  129.       </div>
  130.  
  131.       <div class="postbox">
  132.          <h3><?php _e('Single pages - display settings', 'simplesocialbuttons'); ?></h3>
  133.          <div class="inside">
  134.             <h4><?php _e('Place buttons on single pages:', 'simplesocialbuttons'); ?></h4>
  135.             <p><input type="checkbox" name="ssb_beforepage" id="ssb_beforepage" value="1" <?php if(!empty($ssb_beforepage)) { ?>checked="checked"<?php } ?> /> <label for="ssb_beforepage"><?php _e('Before the page content', 'simplesocialbuttons'); ?></label></p>
  136.             <p><input type="checkbox" name="ssb_afterpage" id="ssb_afterpage" value="1" <?php if(!empty($ssb_afterpage)) { ?>checked="checked"<?php } ?> /> <label for="ssb_afterpage"><?php _e('After the page content', 'simplesocialbuttons'); ?></label></p>
  137.          </div>
  138.       </div>
  139.  
  140.       <div class="postbox">
  141.          <h3><?php _e('Archives - display settings', 'simplesocialbuttons'); ?></h3>
  142.          <div class="inside">
  143.             <h4><?php _e('Select additional places to display buttons:', 'simplesocialbuttons'); ?></h4>
  144.             <p><input type="checkbox" name="ssb_showfront" id="ssb_showfront" value="1" <?php if(!empty($ssb_showfront)) { ?>checked="checked"<?php } ?> /> <label for="ssb_showfront"><?php _e('Show at frontpage', 'simplesocialbuttons'); ?></label></p>
  145.             <p><input type="checkbox" name="ssb_showcategory" id="ssb_showcategory" value="1" <?php if(!empty($ssb_showcategory)) { ?>checked="checked"<?php } ?> /> <label for="ssb_showcategory"><?php _e('Show at category pages', 'simplesocialbuttons'); ?></label></p>
  146.             <p><input type="checkbox" name="ssb_showarchive" id="ssb_showarchive" value="1" <?php if(!empty($ssb_showarchive)) { ?>checked="checked"<?php } ?> /> <label for="ssb_showarchive"><?php _e('Show at archive pages', 'simplesocialbuttons'); ?></label></p>
  147.             <p><input type="checkbox" name="ssb_showtag" id="ssb_showtag" value="1" <?php if(!empty($ssb_showtag)) { ?>checked="checked"<?php } ?> /> <label for="ssb_showtag"><?php _e('Show at tag pages', 'simplesocialbuttons'); ?></label></p>
  148.  
  149.             <h4><?php _e('Place buttons on archives:', 'simplesocialbuttons'); ?></h4>
  150.             <p><input type="checkbox" name="ssb_beforearchive" id="ssb_beforearchive" value="1" <?php if(!empty($ssb_beforearchive)) { ?>checked="checked"<?php } ?> /> <label for="ssb_beforearchive"><?php _e('Before the content', 'simplesocialbuttons'); ?></label></p>
  151.             <p><input type="checkbox" name="ssb_afterarchive" id="ssb_afterarchive" value="1" <?php if(!empty($ssb_afterarchive)) { ?>checked="checked"<?php } ?> /> <label for="ssb_afterarchive"><?php _e('After the content', 'simplesocialbuttons'); ?></label></p>
  152.          </div>
  153.       </div>
  154.      
  155.       <div class="postbox">
  156.          <h3><?php _e('Twitter', 'simplesocialbuttons'); ?></h3>
  157.          <div class="inside">
  158.             <h4><?php _e('Twitter username to include with tweets:', 'simplesocialbuttons'); ?></h4>
  159.             <p><input type="text" name="ssb_twitter_username" id="ssb_twitter_username" value="<?php echo $ssb_twitter_username; ?>" /></p>
  160.          </div>
  161.       </div>      
  162.  
  163.       <div class="submit">
  164.          <input type="hidden" name="hiddenconfirm" value="Y" />
  165.          <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
  166.       </div>
  167.  
  168.    </form>
  169. </div>
  170. </div>
  171.  
  172. <div class="postbox-container" style="width:29%">
  173.    <div id="poststuff">
  174.       <div class="postbox">
  175.          <h3><?php _e('About this plugin:', 'simplesocialbuttons'); ?></h3>
  176.          <div class="inside">
  177.             <p><?php _e('Talk to <a href="http://twitter.com/rabinek" target="_blank">@rabinek</a> on twitter for bugs or feature requests.', 'simplesocialbuttons'); ?></p>
  178.             <p><strong><?php _e('Enjoy the plugin?', 'simplesocialbuttons'); ?></strong><br />
  179.             <?php _e('<a href="http://twitter.com/?status=I\'m using @rabinek\'s WordPress Simple Social Buttons plugin - check it out! http://blog.rabinek.pl/" target="_blank">Tweet about it</a> and consider donating.', 'simplesocialbuttons'); ?></p>
  180.             <p><?php _e('<strong>Donate:</strong> A lot of hard work goes into building plugins - support your open source developers. Thank you!', 'simplesocialbuttons'); ?><br />
  181.             <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  182.                <input type="hidden" name="cmd" value="_s-xclick">
  183.                <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkN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DxcNMTEwOTE3MTc1NDE4WjAjBgkqhkiG9w0BCQQxFgQUi1Wu2p91ElTW2fpQ2Y7PP93ERzYwDQYJKoZIhvcNAQEBBQAEgYBLhKww4LgMaMpbjM9H1EGQyddl13dcyvL9UhKUb1MjdCr7M5P6wpZDwIdsh7FM4C1ztRtNfcfrfDgtP/UO6gMABuCKcGtLS9VFe7XA/puY6i+zRtEffwXPbPwSpV3NvyPKhPc6wzj8M0j9vFvbQvidaSZhIH9i6xNTufQfSxCK+w==-----END PKCS7-----">
  184.                <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  185.                <img alt="" border="0" src="https://www.paypalobjects.com/pl_PL/i/scr/pixel.gif" width="1" height="1">
  186.             </form>
  187.             </p>
  188.          </div>
  189.       </div>
  190.  
  191.       <div class="postbox">
  192.          <h3><?php _e('About the author:', 'simplesocialbuttons'); ?></h3>
  193.          <div class="inside">
  194.          <p><?php _e('Hi! My name is Paweł Rabinek (aka xradar). I\'m interesed in SEO and social media, PHP and Wordpress developement.', 'simplesocialbuttons'); ?></p>
  195.          <ul>
  196.             <li><a href="http://blog.rabinek.pl/" target="_blank"><?php _e('My blog about SEO', 'simplesocialbuttons'); ?></a> <?php _e('[Polish]', 'simplesocialbuttons'); ?></li>
  197.             <li><?php _e('Follow me on Twitter', 'simplesocialbuttons'); ?> <a href="http://www.twitter.com/rabinek" target="_blank">@rabinek</a></li>
  198.             <li><a href="http://www.facebook.com/rabinek" target="_blank"><?php _e('Paweł Rabinek on Facebook', 'simplesocialbuttons'); ?></a></li>
  199.             <li><a href="http://plus.google.com/114311287272342088386/" target="_blank"><?php _e('Paweł Rabinek on Google Plus', 'simplesocialbuttons'); ?></a></li>
  200.             <li><a href="http://pl.linkedin.com/in/rabinek" target="_blank"><?php _e('LinkedIn profile', 'simplesocialbuttons'); ?></a></li>
  201.          </ul>
  202.          </div>
  203.       </div>
  204.  
  205.       <div class="postbox">
  206.          <h3><?php _e('Usefull links:', 'simplesocialbuttons'); ?></h3>
  207.          <div class="inside">
  208.          <ul>
  209.             <li><a href="http://www.site5.com/in.php?id=53542" target="_blank"><?php _e('Unlimited web hosting', 'simplesocialbuttons'); ?></a></li>
  210.             <li><a href="http://www.webceo.com/cgi-bin/go/clickthru.cgi?id=xradar" target="_blank"><?php _e('Best SEO software', 'simplesocialbuttons'); ?></a></li>
  211.             <li><a href="http://themeforest.net?ref=xradar" target="_blank"><?php _e('Wordpress templates', 'simplesocialbuttons'); ?></a></li>
  212.          </ul>
  213.          </div>
  214.       </div>
  215.  
  216.    </div>
  217. </div>
  218. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement