コード例 #1
0
 /**
  * The admin section upgrades page rendering method
  *
  * @uses current_user_can()
  * @uses wp_die()
  */
 function page_upgrades()
 {
     if (!current_user_can($this->roles['view_more_features'])) {
         wp_die(__("You do not have privileges to access this page", $this->namespace));
     }
     $namespace = $this->namespace;
     $plugins = array();
     $license_key = slidedeck2_get_license_key();
     /**
      * Here let's set the I'm back variable to true. This allows us to
      * know that they user is expecting a dialog showing the big install
      * button.
      * In this case, we don't need to immediately show the page, we can just
      * wait for a load.
      */
     if (isset($_REQUEST['imback']) && $_REQUEST['imback'] === 'true') {
         $this->user_is_back = true;
     }
     if (isset($_GET['install']) && !empty($_GET['install'])) {
         // We're doing a SlideDeck addon install.
         SlideDeckLitePlugin::$slidedeck_addons_installing = true;
         include 'lib/slidedeck-plugin-install.php';
         if (isset($_GET['package']) && !empty($_GET['package'])) {
             foreach ((array) $_GET['package'] as $package) {
                 /**
                  * Some servers don't allow http or https in a querystring.
                  * Understandable, but since we're logged in for this action, I think 
                  * it's relatively safe. The woraround is to add the protocol here.
                  */
                 if (!preg_match('/^http|https/', $package)) {
                     $package = 'http://' . $package;
                 }
                 $plugins[] = $package;
             }
         }
         $ssl = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '';
         $port = $_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '';
         $url = sprintf('http%s://%s%s%s', $ssl, $_SERVER['SERVER_NAME'], $port, $_SERVER['REQUEST_URI']);
         $type = '';
         $title = '';
         $nonce = '';
         $skin = new SlideDeckPluginInstallSkin(compact('type', 'title', 'nonce', 'url'));
         $skin->sd_header = isset($data['body_header']) ? $data['body_header'] : '';
         $skin->sd_footer = isset($data['body_footer']) ? $data['body_footer'] : '';
         $Installer = new SlideDeckPluginInstall($skin);
         $Installer->install($plugins);
         exit;
     }
     if (isset($_REQUEST['referrer']) && !empty($_REQUEST['referrer'])) {
         slidedeck2_km("Visit Addons", array('cta' => $_REQUEST['referrer']));
     }
     include SLIDEDECK2_DIRNAME . '/views/admin-upgrades.php';
 }
コード例 #2
0
ファイル: manage.php プロジェクト: kol4ak/autoiservice
                    </fieldset>
                </form>
            <?php 
}
?>
            
            <div class="float-wrapper">
                <div class="left">
                    <?php 
include SLIDEDECK2_DIRNAME . '/views/elements/_manage-table.php';
?>
                </div>
                <div class="right">
                    <div class="right-inner">
                        <?php 
if (!SlideDeckLitePlugin::get_partner_data()) {
    ?>
                       <!-- <div id="manage-iab" class="iab">
                         <iframe height="100%" frameborder="0" scrolling="no" width="100%" allowtransparency="true" src="<?php 
    echo $sidebar_ad_url;
    ?>
"></iframe>
                        </div>-->
			<div id="manage-pro-img"><a target="_blank" href="http://www.slidedeck.com/pricing"><img src="https://s3.amazonaws.com/wpeka-slidedeck-pro/slidedeck-tips-and-tricks.png" border="0"/></a></div><br/>
			
                        <?php 
}
?>
                        
                        <?php 
do_action("{$namespace}_manage_sidebar_bottom");
コード例 #3
0
 function slidedeck2_km($event = "", $properties = array(), $force = false)
 {
     global $SlideDeckPlugin;
     $options = get_option("slidedeck2_global_options", array());
     if ($force == false) {
         // If the user has not opted-in to anonymous stats, fail silently
         if (!isset($options['anonymous_stats_optin']) || !$options['anonymous_stats_optin']) {
             return false;
         }
     }
     // Setup for events that should be traccked once
     $once_events_option_name = SlideDeckLitePlugin::$st_namespace . "_completed_once_events";
     $once_events = array('SlideDeck Installed' => false);
     $completed_once_events = get_option($once_events_option_name, $once_events);
     $completed_once_events = array_merge($once_events, $completed_once_events);
     // If the event should only happen once and it has been logged as already happened, don't log it
     if (isset($completed_once_events[$event]) && $completed_once_events[$event] === true) {
         return false;
     }
     $params = array('_k' => SLIDEDECK2_KMAPI_KEY, '_p' => SLIDEDECK2_USER_HASH, '_n' => urlencode($event), 'license' => SLIDEDECK2_LICENSE, 'version' => SLIDEDECK2_VERSION, 'tier' => SlideDeckLitePlugin::highest_installed_tier());
     // Get the cohort data from the database
     $cohort = SlideDeckLitePlugin::get_cohort_data();
     foreach ($cohort as $key => $value) {
         $params['cohort_' . $key] = isset($cohort[$key]) && !empty($cohort[$key]) ? $cohort[$key] : '';
     }
     $params = array_merge($params, $properties);
     wp_remote_fopen("http://trk.kissmetrics.com/e?" . http_build_query($params));
     // Log one time events as completed
     if (isset($once_events[$event])) {
         $completed_once_events[$event] = true;
         update_option($once_events_option_name, $completed_once_events);
     }
 }
コード例 #4
0
ファイル: _sidebar-social.php プロジェクト: jocher/httpdocs
<div id="slidedeck-social-buttons" class="right-column-module"<?php 
echo !SlideDeckLitePlugin::get_partner_data() ? '' : ' style="border-top:0;"';
?>
>
    <strong>Share with friends</strong>
    <div class="tweeet-button social-button">
        <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://demo.slidedeck.com/wp-login.php" data-text="I just made a WordPress content slider in minutes! Try the free @SlideDeck 3 demo. Please RT">Tweet</a>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    </div>                
    <div class="like-button social-button">
        <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdemo.slidedeck.com%2Fwp-login.php&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
    </div>
    <div class="plusone-button social-button">
        <!-- Place this tag where you want the +1 button to render. -->
		<div class="g-plusone" data-size="medium" data-href="http://demo.slidedeck.com/wp-login.php"></div>
		
		<!-- Place this tag after the last +1 button tag. -->
		<script type="text/javascript">
		  (function() {
		    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
		    po.src = 'https://apis.google.com/js/plusone.js';
		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
		  })();
		</script>
    </div>
</div>