Plugin Directory

Changeset 940152


Ignore:
Timestamp:
06/28/2014 08:39:44 PM (11 years ago)
Author:
noticesoftware
Message:

v2.1.3 release - settings up dates - spit*polish

Location:
roost-for-bloggers
Files:
23 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • roost-for-bloggers/trunk/includes/class-roost-api.php

    r925987 r940152  
    1212            $auth_creds = 'Basic ' . base64_encode( $remote_data['appkey'] .':'.$remote_data['appsecret'] );
    1313        }
    14         $remote_url = 'https://get.roost.me/api/' . $remote_data['remoteAction'];
     14        $remote_url = 'https://go.goroost.com/api/' . $remote_data['remoteAction'];
    1515
    1616        $headers = array(
     
    104104   
    105105    public static function save_remote_settings( $app_key, $app_secret, $roost_server_settings, $POST ) {
    106         if ( isset( $POST['mobilePush'] ) ) {
    107             if ( 'TOP' != $roost_server_settings['roostBarSetting'] || 'BOTTOM' != $roost_server_settings['roostBarSetting'] ) {
    108                 $remote_content['roostBarSetting'] = 'TOP';
    109             }
    110         } else {
    111             if ( 'OFF' != $roost_server_settings['roostBarSetting'] ) {
    112                 $remote_content['roostBarSetting'] = 'OFF';
    113             }
    114         }
    115 
    116106        if ( isset( $POST['autoUpdate'] ) ) {
    117107            if ( true != $roost_server_settings['autoUpdate'] ) {
  • roost-for-bloggers/trunk/includes/class-roost-core.php

    r928005 r940152  
    1111    }   
    1212
    13     public static $roost_version = '2.1.2';
     13    public static $roost_version = '2.1.3';
    1414       
    1515    public static function site_url() {
     
    1818   
    1919    public static function registration_url() {
    20         $tld = 'https://get.roost.me/signup?returnURL=';
     20        $tld = 'https://go.goroost.com/signup?returnURL=';
    2121        $admin_path = admin_url('admin.php?page=roost-web-push');
    2222        $url = $tld . urlencode( $admin_path . '&source=wpplugin' );
     
    2525
    2626    public static function login_url( $sso ) {
    27         $tld = 'https://get.roost.me/login?returnURL=';
     27        $tld = 'https://go.goroost.com/login?returnURL=';
    2828        $admin_path = admin_url('admin.php?page=roost-web-push');
    2929        $url = $tld . urlencode( $admin_path );
     
    7676        }
    7777    }
    78 
     78   
    7979    public static function uninstall(){
    8080        delete_option('roost_settings');
     
    8888        add_action( 'post_submitbox_misc_actions', array( $this, 'note_override' ) );
    8989        add_action( 'wp_head', array( $this, 'byline' ), 1 );
     90        add_action( 'wp_footer', array( $this, 'roostJS' ) );
    9091        add_action( 'save_post', array( $this, 'save_post_meta_roost' ) );
    91         add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ) );
    9292        add_filter( 'clean_url', array( $this, 'add_async' ), 2, 1 );
    9393        add_action( 'wp_ajax_graph_reload', array( $this, 'graph_reload' ) );
     
    9999            add_filter( 'plugin_action_links_roost-for-bloggers/roost.php', array( $this, 'add_action_links' ) );
    100100            add_action( 'admin_init', array( $this, 'activate_redirect' ) );
     101            add_action( 'admin_init', array( $this, 'roost_logout' ) );
     102            add_action( 'admin_init', array( $this, 'manual_send' ) );
    101103            add_action( 'admin_notices', array( $this, 'setup_notice' ) );
    102104            add_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_scripts' ) );
     
    111113        return array_merge( $rlink, $links );
    112114    }
    113    
    114     public function load_scripts() {
    115         $roost_settings = self::roost_settings();
    116         $app_key = $roost_settings['appKey'];
    117         if ($app_key && !is_admin()) {
    118             wp_enqueue_script( 'roostjs', '//get.roost.me/js/roost.js#async', '', self::$roost_version, false );
    119             wp_enqueue_script( 'roostvars', ROOST_URL . 'layout/js/roost_vars.js#async', array( 'roostjs' ), self::$roost_version, false );
    120             wp_localize_script( 'roostvars', 'pushNotificationsByRoostMe', array( 'appkey' => $app_key) );
    121         }
    122     }
    123115
    124116    public function add_async( $url ) {
     
    133125
    134126    public function byline() {
    135         $byline = "<!-- Push notifications for this website enabled by Roost. Support for Safari, Firefox, and Chrome Browser Push. (v ". self::$roost_version .") - http://roost.me/ -->";
     127        $byline = "<!-- Push notifications for this website enabled by Roost. Support for Safari, Firefox, and Chrome Browser Push. (v ". self::$roost_version .") - http://goroost.com/ -->";
    136128        echo "\n${byline}\n";
    137129    }
    138130
     131    public function roostJS() {
     132        $roost_settings = self::roost_settings();
     133        $app_key = $roost_settings['appKey'];
     134    ?>
     135        <script>var _roost = _roost || [];_roost.push(['appkey','<?php echo( $app_key ); ?>']);</script><noscript><a href="http://goroost.com/site-contact?noscript&appkey=<?php echo($app_key); ?>" title="Contact Us" target="_blank">Questions or feedback? Need help?</a> powered by <a href="http://goroost.com" title="Roost Web Push">Roost - Push notifications for websites</a></noscript><script src="//cdn.goroost.com/js/roost.js" async></script>
     136    <?php
     137    }
     138   
    139139    public static function setup_notice() {
    140140        global $hook_suffix;
     
    167167            if ( is_wp_error( $api_check ) ) {
    168168    ?>
    169         <div class="error" id="roost-api-error">There was a problem accessing the <strong>Roost API</strong>. You may not be able to log in. Contact Roost support at <a href="mailto:support@roost.me" target="_blank">[email protected]</a> for more information.</div>
     169        <div class="error" id="roost-api-error">There was a problem accessing the <strong>Roost API</strong>. You may not be able to log in. Contact Roost support at <a href="mailto:support@goroost.com" target="_blank">[email protected]</a> for more information.</div>
    170170    <?php
    171171            }
     
    375375    }
    376376
    377     public static function admin_menu_page() {
     377    public function roost_logout() {
     378        if ( isset( $_POST['clearkey'] ) ) {
     379            $form_keys = array(
     380                'appKey' => '',
     381                'appSecret' => '',
     382            );
     383            self::update_keys( $form_keys );
     384            wp_dequeue_script( 'roostscript' );
     385            $status = 'Roost has been disconnected.';
     386            $status = urlencode( $status );
     387            wp_redirect( admin_url( 'admin.php?page=roost-web-push' ) . '&status=' . $status );
     388            exit;
     389        }
     390    }
     391   
     392    public function manual_send() {
     393        if ( isset( $_POST['manualtext'] ) ) {
     394            $manual_text = $_POST['manualtext'];
     395            $manual_link = $_POST['manuallink'];
     396            $manual_text = stripslashes( $manual_text );
     397            if ( '' == $manual_text || '' == $manual_link ) {
     398                $status = 'Your message or link can not be blank.';
     399            } else {
     400                $roost_settings = self::roost_settings();
     401                $app_key = $roost_settings['appKey'];
     402                $app_secret = $roost_settings['appSecret'];
     403                if ( false === strpos( $manual_link, 'http' ) ) {
     404                    $manual_link = 'http://' . $manual_link;
     405                }
     406                $msg_status = Roost_API::send_notification( $manual_text, $manual_link, null, $app_key, $app_secret, null );
     407                if ( true === $msg_status['success'] ) {
     408                    $status = 'Message Sent.';
     409                } else {
     410                    $status = 'Message failed. Please make sure you have a valid URL.';
     411                }
     412            }
     413            $status = urlencode( $status );
     414            wp_redirect( admin_url( 'admin.php?page=roost-web-push' ) . '&status=' . $status );
     415            exit;
     416        }       
     417    }
     418
     419    public static function admin_menu_page() {
    378420        $roost_settings = self::roost_settings();
    379 
     421               
    380422        if ( empty( $roost_settings ) ) {
    381423            self::install();
     
    383425            $app_key = $roost_settings['appKey'];
    384426            $app_secret = $roost_settings['appSecret'];
     427        }
     428       
     429        if ( !empty( $app_key ) ) {
     430            $roost_active_key = true;
     431            $bbPress_active = Roost_bbPress::bbPress_active();
     432        } else {
     433            $roost_active_key = false;
    385434        }
    386435       
     
    398447            $roost_server_settings = $response['server_settings']; 
    399448            $roost_stats = $response['stats'];
     449            $roost_active_key = true;
    400450        }
    401451       
     
    415465                $roost_server_settings = $response['server_settings']; 
    416466                $roost_stats = $response['stats'];
     467                $roost_active_key = true;
    417468            }
    418469        }
     
    425476            $roost_server_settings = $response['server_settings']; 
    426477            $roost_stats = $response['stats'];
     478            $roost_active_key = true;
    427479        }
    428        
    429         if ( isset( $_POST['clearkey'] ) ) {
    430             $form_keys = array(
    431                 'appKey' => '',
    432                 'appSecret' => '',
    433             );
    434             self::update_keys( $form_keys );
    435             wp_dequeue_script( 'roostscript' );
    436             $status = 'Roost has been disconnected.';
    437         }
    438 
     480
     481        if ( isset( $_GET['status'] ) ) {
     482            $status = urldecode( $_GET['status'] );
     483        }
     484       
    439485        if ( isset( $_POST['savesettings'] ) ) {   
    440486            $autoPush = false;
    441487            $bbPress = false;
     488           
    442489            if ( isset( $_POST['autoPush'] ) ) {
    443490                $autoPush = true;
     
    459506        }
    460507       
    461         if ( isset( $_POST['manualpush'] ) ) {
    462             $manual_text = $_POST['manualtext'];
    463             $manual_link = $_POST['manuallink'];
    464             if ( '' == $manual_text || '' == $manual_link ) {
    465                 $status = 'Your message or link can not be blank.';
    466             } else {
    467                 $roost_settings = self::roost_settings();
    468                 $app_key = $roost_settings['appKey'];
    469                 $app_secret = $roost_settings['appSecret'];
    470                 if ( false === strpos( $manual_link, 'http' ) ) {
    471                     $manual_link = 'http://' . $manual_link;
    472                 }
    473                 $msg_status = Roost_API::send_notification( $manual_text, $manual_link, null, $app_key, $app_secret, null );
    474                 if ( true === $msg_status['success'] ) {
    475                     $status = 'Message Sent.';
    476                 } else {
    477                     $status = 'Message failed. Please make sure you have a valid URL.';
    478                 } 
    479             }
    480         }
    481508        require_once( dirname( plugin_dir_path( __FILE__ ) ) . '/layout/admin.php');       
    482509    }
  • roost-for-bloggers/trunk/layout/admin.php

    r928005 r940152  
    1 <?php
    2     $roost = new Roost();
    3     $roost_settings = get_option( 'roost_settings' );
    4     if ( strlen( $roost_settings['appKey'] ) > 0 ) {
    5         $roost_active_key = true;
    6         $roost = new Roost;
    7     } else {
    8         $roost_active_key = false;
    9     }
    10     $bbPress_active = Roost_bbPress::bbPress_active();
    11 ?>
    12 
    131<div id="rooster">
    142    <div id="roost-header">
     
    7462                                            <p>
    7563                                                Welcome! Creating an account only takes a few seconds and will give you access
    76                                                 to additional features like our analytics dashboard at roost.me
     64                                                to additional features like our analytics dashboard at goroost.com
    7765                                            </p>
    7866                                            <a href="<?php echo( Roost::registration_url() ); ?>" id="roost-create-account" class="roost-signin-link"><img src="<?php echo ROOST_URL; ?>layout/images/roost-arrow-white.png" />Create an account</a>
     
    126114                                        <input type="Submit" class="type-submit" id="roost-middle-save" name="<?php echo isset($roost_sites) ? 'roostconfigselect' : 'roostlogin' ?>" value="<?php echo isset( $roost_sites ) ? 'Choose Site' : 'Login' ?>" tabindex="3" />
    127115                                        <?php submit_button( 'Cancel', 'delete', 'cancel', false, array( 'tabindex' => '4' ) ); ?>
    128                                         <span class="left-link"><a href="https://get.roost.me/login?forgot=true" target="_blank">forget password?</a></span>
     116                                        <span class="left-link"><a href="https://go.goroost.com/login?forgot=true" target="_blank">forget password?</a></span>
    129117                                    </div>
    130118                                    <div id="roost-sso">
     
    271259                                                </div>
    272260                                                <div class="roost-setting-wrapper">
    273 
    274                                                     <span class="roost-label">Mobile push support:</span>
    275                                                     <input type="checkbox" name="mobilePush" class="roost-control-secondary" value="1" <?php if( 'TOP' == $roost_server_settings['roostBarSetting'] || 'BOTTOM' == $roost_server_settings['roostBarSetting'] ){ echo( 'checked' ); } ?> />
    276                                                     <span class="roost-setting-caption">Enabling this will allow your readers to subscribe and recieve push notifications on their phone or tablet when they view your mobile site.
    277                 First-time subscribers will be prompted to install the iOS or Android Roost app in order to recieve notifications.</span>
    278 
    279                                                 </div>
    280                                                 <div class="roost-setting-wrapper">
    281261                                                    <span class="roost-label">Activate all Roost features:</span>
    282262                                                    <input type="checkbox" name="autoUpdate" class="roost-control-secondary" value="1" <?php if( true == $roost_server_settings['autoUpdate'] ){ echo( 'checked' ); } ?> />
     
    290270
    291271                                                </div>
    292 
    293272                                                <input type="Submit" class="type-submit roost-control-secondary" id="roost-middle-save" name="savesettings" value="Save Settings" />                             
    294273                                            </div>
     
    300279                    <?php } ?>
    301280                    <!--END SETTINGS SECTION-->
    302                 <div id="roostSupportTag">Have Questions, Comments, or Need a Hand? Hit us up at <a href="mailto:support@roost.me" target="_blank">[email protected]</a> We're Here to Help.</div>
     281                <div id="roostSupportTag">Have Questions, Comments, or Need a Hand? Hit us up at <a href="mailto:support@goroost.com" target="_blank">[email protected]</a> We're Here to Help.</div>
    303282            </div>
    304283        </div>
  • roost-for-bloggers/trunk/readme.txt

    r928005 r940152  
    11=== Roost Web Push for Safari ===
    22Contributors: noticesoftware, danstever
    3 Tags: safari, push, push notifications, web push notifications, Mavericks, mobile, web push, roost, roost.me, roost_me, Post, plugin, admin, posts, page, links, widget, ajax, social, wordpress, dashboard, news, notifications, services
    4 Requires at least: 3.0
     3Tags: safari, push, push notifications, web push notifications, Mavericks, mobile, web push, roost, roost.me, roost_me, goroost, goroost.com Post, plugin, admin, posts, page, links, widget, ajax, social, wordpress, dashboard, news, notifications, services
     4Requires at least: 3.8
    55Tested up to: 3.9.1
    6 Stable tag: 2.1.2
     6Stable tag: 2.1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1212== Description ==
    1313
    14 [Browser Push by Roost](http://roost.me/) - Fundamentally changing the way people consume content on the web.
     14[Browser Push by Roost](http://goroost.com/) - Fundamentally changing the way people consume content on the web.
    1515
    1616Push Plugin Features:
     
    2525**Free** Roost account included. No setup fees, no surprises, and no limitations on your site visitors.
    2626
    27 [vimeo http://vimeo.com/88533265]
     27[vimeo http://vimeo.com/99195697]
    2828
    2929== Installation ==
     
    7070
    7171= Free? Really? What's the catch? =
    72 No catch! We believe in providing a great service and making it accessible to everyone. So... It's free. (Up to 1,000,000 messages. If you hit that... We'll need to talk.)
     72No catch! We believe in providing a great service and making it accessible to everyone. So... It's free. (Up to 100,000 messages. If you hit that... We'll need to talk.)
    7373
    7474= Is it really this easy to use Safari Web Push on my site? =
     
    8080= Do you support Google Chrome or Firefox for desktop push? =
    8181Almost. We will be releasing support for Google Chrome very soon. Firefox will follow. To take advantage of them as we include support, make sure to have *Activate all Roost Features* checked.
    82 
    83 = If I'm using Mobile Push Support, Why do subscribers have to download the Roost mobile app? =
    84 In order for a device to receive a true push notification, a native mobile app must be installed. That's where Roost comes in. We are there to provide that *native bridge.* We do not pull readers into our app, but push them back to your website. Notifications also stay in the Roost app, which makes them able to be viewed at any time.
    8582
    8683= Do my readers / subscribers have to create an account with Roost? =
     
    9592
    9693== Changelog ==
     94= 2.1.3 =
     95* RoostJS now served from CDN (BAM! Blazing fast! You didn't see that one did you?)
     96* Removed mobile app setting
     97* Updated API URLs and references to goroost.com (Go Go Gadget Roosters... Or something like that.)
     98* Fixed bug when manual sending notification to eliminate multiple messages.
    9799
    98100= 2.1.2 =
     
    167169
    168170== Upgrade Notice ==
     171= 2.1.3 =
     172* RoostJS now served from CDN (BAM! Blazing fast! You didn't see that one did you?)
     173* Removed mobile app setting
     174
    169175= 2.1.2 =
    170176* Fixed a bug when sending manual notifications from the dashboard and with charts
  • roost-for-bloggers/trunk/roost.php

    r928005 r940152  
    22/**
    33 * Plugin Name: Roost Web Push
    4  * Plugin URI: http://www.roost.me/
     4 * Plugin URI: http://goroost.com/
    55 * Description: Drive traffic to your website with Safari Mavericks push notifications and Roost.
    6  * Version: 2.1.2
    7  * Author: Roost.me
    8  * Author URI: http://roost.me
     6 * Version: 2.1.3
     7 * Author: Roost
     8 * Author URI: http://goroost.com
    99 * License: GPLv2 or later
    1010 */
     
    1818$roost = new Roost();
    1919$bbPress_active = Roost_bbPress::bbPress_active();
     20
    2021if( !empty( $bbPress_active['present'] ) && !empty( $bbPress_active['enabled'] ) ) {
    2122    $roost_bbp = new Roost_bbPress();
    2223}
     24
    2325register_activation_hook( __FILE__, array( 'ROOST', 'init' ) );
    2426register_uninstall_hook( __FILE__, array( 'ROOST', 'uninstall' ) );
Note: See TracChangeset for help on using the changeset viewer.