Ejemplo n.º 1
0
 /**
  * Renders footer
  */
 public static function show_footer()
 {
     ShareaholicUtilities::load_template('footer');
 }
Ejemplo n.º 2
0
?>
</span>
  
    <button class='app_wide_settings btn' data-href='monetizations/edit'><?php 
_e('Edit Monetization Settings', 'shareaholic');
?>
</button>
  
  </fieldset>
  </div>

  <div class="row" style="padding-top:20px; padding-bottom:35px; clear:both;">
    <div class="span2"><input type='submit' onclick="this.value='<?php 
echo sprintf(__('Saving Changes...', 'shareaholic'));
?>
';" value='<?php 
echo sprintf(__('Save Changes', 'shareaholic'));
?>
'></div>
  </div>
  </form>
</div>
<?php 
ShareaholicUtilities::load_template('why_to_sign_up', array('url' => Shareaholic::URL));
?>
</div>


<?php 
ShareaholicAdmin::show_footer();
ShareaholicAdmin::include_snapengage();
Ejemplo n.º 3
0
 /**
  * Inserts the script code snippet into the head of the page
  */
 public static function script_tag()
 {
     if (ShareaholicUtilities::has_accepted_terms_of_service() && ShareaholicUtilities::get_or_create_api_key()) {
         ShareaholicUtilities::load_template('script_tag', array('api_key' => ShareaholicUtilities::get_option('api_key'), 'base_settings' => ShareaholicPublicJS::get_base_settings(), 'overrides' => ShareaholicPublicJS::get_overrides()));
     }
 }
Ejemplo n.º 4
0
 /**
  *
  * Loads the locations names and their respective ids for an api key
  * and sets them in the shareaholic settings.'
  *
  * @param string $api_key
  */
 public static function get_new_location_name_ids($api_key)
 {
     $response = ShareaholicCurl::get(Shareaholic::API_URL . "/publisher_tools/{$api_key}.json");
     $publisher_configuration = $response['body'];
     $result = array();
     if ($publisher_configuration && is_array($publisher_configuration)) {
         foreach (array('share_buttons', 'recommendations') as $app) {
             foreach ($publisher_configuration['apps'][$app]['locations'] as $id => $location) {
                 $result[$app][$location['name']] = $id;
             }
         }
         self::update_location_name_ids($result);
     } else {
         ShareaholicUtilities::load_template('failed_to_create_api_key_modal');
         ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
     }
 }
Ejemplo n.º 5
0
 /**
  * This function is in charge the logic for
  * showing whatever it is we want to show a user
  * about whether they have verified their api
  * key or not.
  */
 private static function draw_verify_api_key()
 {
     if (!ShareaholicUtilities::api_key_verified()) {
         $settings = ShareaholicUtilities::get_settings();
         $api_key = $settings['api_key'];
         $verification_key = $settings['verification_key'];
         ShareaholicUtilities::load_template('verify_api_key_js', array('verification_key' => $verification_key));
     }
 }
Ejemplo n.º 6
0
 /**
  * Inserts the script code snippet into the head of the page
  */
 public static function script_tag()
 {
     if (ShareaholicUtilities::has_accepted_terms_of_service() && ShareaholicUtilities::get_or_create_api_key()) {
         ShareaholicUtilities::load_template('script_tag', array('shareaholic_url' => Shareaholic::URL, 'api_key' => ShareaholicUtilities::get_option('api_key'), 'page_config' => ShareaholicPublicJS::get_page_config()));
     }
 }
 /**
  *
  */
 public static function show_header()
 {
     $settings = ShareaholicUtilities::get_settings();
     $settings['base_link'] = ShareaholicUtilities::URL . '/publisher_tools/' . $settings['api_key'] . '/';
     $settings['website_settings_link'] = $settings['base_link'] . 'websites/edit?verification_key=' . $settings['verification_key'];
     ShareaholicUtilities::load_template('header', array('settings' => $settings));
 }