Plugin Directory

Changeset 1109426


Ignore:
Timestamp:
03/10/2015 12:41:14 PM (11 years ago)
Author:
expresscurate
Message:

new version v2.0.7 with changes:

  • Miscellaneous bug fixes and improvements.
Location:
expresscurate/trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • expresscurate/trunk/ExpressCurate.php

    r1106118 r1109426  
    55  Plugin URI: http://www.expresscurate.com/products
    66  Description: ExpressCurate plugin is a content curation tool for WordPress. It enables you to create and publish high quality content within minutes.
    7   Version: 2.0.6
     7  Version: 2.0.7
    88  Author: ExpressCurate
    99  Author URI: http://www.expresscurate.com
  • expresscurate/trunk/ExpressCurate_FeedManager.php

    r1106118 r1109426  
    781781            foreach ($bookmarks as $key => $bookmark) {
    782782                $date_array = date_parse($bookmark['bookmark_date']);
    783                 $bookmark_date = strtotime(date('Y-m-d', mktime($date_array['month'], $date_array['day'], $date_array['year'])));
     783                $bookmark_date = strtotime(date('Y-m-d', mktime(0,0,0,$date_array['month'], $date_array['day'], $date_array['year'])));
    784784                if ($bookmark_date >= $start && $bookmark_date <= $end) {
    785785                    $count++;
  • expresscurate/trunk/ExpressCurate_HtmlParser.php

    r1106118 r1109426  
    1515  private $domain;
    1616  private $fragment;
     17  private $protocol;
    1718  private $path;
    1819  private $html;
     
    3031        $this->path = 'http://' . parse_url($this->url, PHP_URL_HOST) . "/" . $path . "/";
    3132        $this->fragment = parse_url($this->url, PHP_URL_FRAGMENT);
     33        $this->protocol = parse_url($this->url, PHP_URL_SCHEME);
    3234    }
    3335
     
    125127//$this->html = preg_replace('/[\r|\n]+/msi', '', $this->html);
    126128    $this->html = preg_replace('/<--[\S\s]*?-->/msi', '', $this->html);
    127     $this->html = preg_replace('/<noscript[^>]*>[\S\s]*?' .
     129    /*$this->html = preg_replace('/<noscript[^>]*>[\S\s]*?' .
     130            '<\/noscript>/msi', '', $this->html);*/
     131    $this->html = preg_replace('/<noscript[^>]*>[\s]*?' .
    128132            '<\/noscript>/msi', '', $this->html);
    129133    $this->html = preg_replace('~>\s+<~', '><', $this->html);
     
    157161          $src = $src;
    158162        } else if (strpos($src, '//') === 0) {
    159           $src = $this->fragment . $src;
     163          if(isset($this->fragment)){
     164              $src = $this->fragment . $src;
     165          }
     166          else{
     167              $src = $this->protocol.":" . $src;
     168          }
    160169        } elseif (strpos($src, '/') === 0) {
    161170          $src = $this->domain . $src;
  • expresscurate/trunk/ExpressCurate_Tracker.php

    r1106118 r1109426  
    99 */
    1010
    11 class ExpressCurate_Tracker {
     11class ExpressCurate_Tracker
     12{
    1213
    1314    private static $instance;
     
    1718    private $hash;
    1819
    19     function __construct() {
     20    function __construct()
     21    {
    2022        $this->hash = site_url();
    2123    }
    2224
    23     public static function getInstance() {
    24         if ( ! ( self::$instance instanceof self ) ) {
     25    public static function getInstance()
     26    {
     27        if (!(self::$instance instanceof self)) {
    2528            self::$instance = new self();
    2629        }
    27        
     30
    2831        return self::$instance;
    2932    }
    30    
    31     public function getSiteHash() {
     33
     34    public function getSiteHash()
     35    {
    3236        return $this->hash;
    3337    }
    34    
    35     public function trackPage($page) {
     38
     39    public function trackPage($page)
     40    {
    3641        $this->pages[] = $page;
    3742    }
    38    
    39     public function trackPath($path) {
     43
     44    public function trackPath($path)
     45    {
    4046        $this->paths[] = $path;
    4147    }
    4248
    43     public function track() {
    44          global $expresscurate_track_page;
    45          global $pagenow;
    46          // create hash to keep tracking anonymous
    47          
    48          ?>
    49          
    50          <script type="text/javascript">
    51          var expresscurate_track_hash = '<?php echo $hash; ?>';
     49    public function track()
     50    {
     51        global $expresscurate_track_page;
     52        global $pagenow;
     53        // create hash to keep tracking anonymous
    5254
    53          if (typeof ga !== 'function') {
    54              (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    55              (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    56              m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    57              })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    58          }
    59          
    60          ga('create', 'UA-47364718-4', 'auto', {
    61              'name': 'expresscurate',
    62              //'cookieDomain': 'none',
    63              'cookieDomain': 'tracking.expresscurate.com',
    64              'cookieName': 'expresscurate',
    65              'cookieExpires': 20000
    66          });
    67          ga('expresscurate.set', 'forceSSL', true);
    68          ga('expresscurate.set', 'anonymizeIp', true);
    69          ga('expresscurate.send', 'pageview', {
    70              'page': '/site/<?php echo $this->hash; ?>'
    71          });
    72          ga('expresscurate.send', 'pageview', {
    73              'page': '/site/wp/<?php echo $this->hash; ?>'
    74          });
    75          <?php if ($expresscurate_track_page) {?>
    76          ga('expresscurate.send', 'pageview', {
    77              'page': '/page/<?php echo $expresscurate_track_page; ?>'
    78          });
    79          <?php } ?>
    80          
    81          <?php
    82          if (!empty($this->pages)) {
    83              foreach($this->pages as $page) {
    84          ?>
    85          ga('expresscurate.send', 'pageview', {
    86              'page': '/page/<?php echo $page; ?>'
    87          });
    88          ga('expresscurate.send', 'pageview',{
    89              'page': '/action/wp/<?php echo $page; ?>/open';
    90          });
    91          <?php } } ?>
    92          
    93          <?php
    94          if (!empty($this->paths)) {
    95              foreach($this->paths as $path) {
    96          ?>
    97          ga('expresscurate.send', 'pageview', {
    98              'page': '<?php echo $path; ?>'
    99          });
    100          <?php } }
    101          if((get_option('expresscurate_post_status') && get_option('expresscurate_post_status')=="publish") && ($pagenow=="post-new.php" || $pagenow=="post.php")){
    102              ?>
    103              ga('expresscurate.send', 'pageview', {
    104                  'page': '/post-edit/publish'
    105              });
    106          <?php
    107             update_option('expresscurate_post_status','');
    108          }
    109          ?>
    110          </script>
    111          <?php
     55        ?>
     56
     57        <script type="text/javascript">
     58            var expresscurate_track_hash = '<?php echo $hash; ?>',
     59                siteSendAnalytics = false,
     60                siteWpSendAnalytics = false;
     61
     62            if (typeof ga !== 'function') {
     63                (function (i, s, o, g, r, a, m) {
     64                    i['GoogleAnalyticsObject'] = r;
     65                    i[r] = i[r] || function () {
     66                        (i[r].q = i[r].q || []).push(arguments)
     67                    }, i[r].l = 1 * new Date();
     68                    a = s.createElement(o),
     69                        m = s.getElementsByTagName(o)[0];
     70                    a.async = 1;
     71                    a.src = g;
     72                    m.parentNode.insertBefore(a, m)
     73                })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
     74            }
     75
     76            ga('create', 'UA-47364718-4', 'auto', {
     77                'name': 'expresscurate',
     78                //'cookieDomain': 'none',
     79                'cookieDomain': 'tracking.expresscurate.com',
     80                'cookieName': 'expresscurate',
     81                'cookieExpires': 20000
     82            });
     83            ga('expresscurate.set', 'forceSSL', true);
     84            ga('expresscurate.set', 'anonymizeIp', true);
     85            ga('expresscurate.send', 'pageview', {
     86                'page': '/site/<?php echo $this->hash; ?>',
     87                'hitCallback': function () {
     88                    siteSendAnalytics = true;
     89                }
     90            });
     91            ga('expresscurate.send', 'pageview', {
     92                'page': '/site/wp/<?php echo $this->hash; ?>',
     93                'hitCallback': function () {
     94                    siteWpSendAnalytics = true;
     95                }
     96            });
     97            <?php if ($expresscurate_track_page) {?>
     98            ga('expresscurate.send', 'pageview', {
     99                'page': '/page/<?php echo $expresscurate_track_page; ?>'
     100            });
     101            <?php } ?>
     102
     103            <?php
     104            if (!empty($this->pages)) {
     105                foreach($this->pages as $page) {
     106            ?>
     107            ga('expresscurate.send', 'pageview', {
     108                'page': '/page/<?php echo $page; ?>'
     109            });
     110            ga('expresscurate.send', 'pageview', {
     111                'page': '/action/wp/<?php echo $page; ?>/open';
     112            })
     113            ;
     114            <?php } } ?>
     115
     116            <?php
     117            if (!empty($this->paths)) {
     118                foreach($this->paths as $path) {
     119            ?>
     120            ga('expresscurate.send', 'pageview', {
     121                'page': '<?php echo $path; ?>'
     122            });
     123            <?php } }
     124            if((get_option('expresscurate_post_status') && get_option('expresscurate_post_status')=="publish") && ($pagenow=="post-new.php" || $pagenow=="post.php")){
     125                ?>
     126            ga('expresscurate.send', 'pageview', {
     127                'page': '/post-edit/publish'
     128            });
     129            <?php
     130               update_option('expresscurate_post_status','');
     131            }
     132            ?>
     133        </script>
     134    <?php
    112135    }
    113136}
  • expresscurate/trunk/css/expresscurate.css

    r1106118 r1109426  
    25112511}
    25122512#expresscurate_wordCount_dialog{
    2513     max-height: 210px !important;
    25142513    height: auto !important;
    25152514    max-width: 700px !important;
  • expresscurate/trunk/css/quotes-style.css

    r1066998 r1109426  
    2323    position: absolute;
    2424    display: inline-block;
    25     background-position: 0 0;
     25    background-position: 0 10px;
    2626    content: "";
    2727    clear: both;
  • expresscurate/trunk/js/Buttons.js

    r1106118 r1109426  
    160160        messageHtml += $('.attachment-post-thumbnail').length ? '' : '<p class="lengthSuggestion red">Your post currently doesn’t have a featured image. Adding a featured image is a good way to improve conversion rates by creating visual associations with your posts.</p>';
    161161
     162        var arrOutboundLinks = false,
     163            arrInboundLink = false;
     164        $(tinyMCE.activeEditor.dom.getRoot()).find('a').each(
     165            function () {
     166                var link = getRootUrl($(this).attr("href")),
     167                    patIfRelative = /^https?:\/\//i;
     168                if (!patIfRelative.test(link) || link == getRootUrl(window.location)) {
     169                    arrInboundLink = true;
     170                } else {
     171                    arrOutboundLinks = true;
     172                }
     173            });
     174        messageHtml += arrInboundLink ? '' : '<p class="lengthSuggestion blue">This page contains no inbound links, add some where appropriate.</p>';
     175        messageHtml += arrOutboundLinks ? '' : '<p class="lengthSuggestion blue">This page contains no outbound links, add some where appropriate.</p>';
     176
    162177        ed.windowManager.open({
    163178            title: 'Post Analysis',
     
    166181            html: messageHtml
    167182        });
     183    }
     184
     185    function getRootUrl(url) {
     186        return url.toString().replace(/^(.*\/\/[^\/?#]*).*$/, "$1");
    168187    }
    169188
     
    207226                return co.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g, function (a, im) {
    208227                    var cls = getAttr(im, 'class');
    209                     if (cls.indexOf('expresscurate_FacebookEmbed') != -1){
     228                    if (cls.indexOf('expresscurate_FacebookEmbed') != -1) {
    210229                        return '<p>[' + tinymce.trim(getAttr(im, 'title')) + ']</p>';
    211230                    }
     
    214233            },
    215234            init: function (ed, url) {
    216                /* var t = this;
    217                 t.url = url;
    218                 //replace shortcode before editor content set
    219                 ed.onBeforeSetContent.add(function (ed, o) {
    220                     o.content = t.visualizeShortcode(o.content);
    221                 });
    222                 //replace shortcode as its inserted into editor
    223                 ed.onExecCommand.add(function (ed, cmd) {
    224                     if (cmd === 'mceInsertContent') {
    225                         tinyMCE.activeEditor.setContent(t.visualizeShortcode(tinyMCE.activeEditor.getContent()));
    226                     }
    227                 });
    228                 //replace the image back to shortcode on save
    229                 ed.onPostProcess.add(function (ed, o) {
    230                     if (o.get)
    231                         o.content = t.recoverShortcode(o.content);
    232                 });*/
     235                /* var t = this;
     236                 t.url = url;
     237                 //replace shortcode before editor content set
     238                 ed.onBeforeSetContent.add(function (ed, o) {
     239                 o.content = t.visualizeShortcode(o.content);
     240                 });
     241                 //replace shortcode as its inserted into editor
     242                 ed.onExecCommand.add(function (ed, cmd) {
     243                 if (cmd === 'mceInsertContent') {
     244                 tinyMCE.activeEditor.setContent(t.visualizeShortcode(tinyMCE.activeEditor.getContent()));
     245                 }
     246                 });
     247                 //replace the image back to shortcode on save
     248                 ed.onPostProcess.add(function (ed, o) {
     249                 if (o.get)
     250                 o.content = t.recoverShortcode(o.content);
     251                 });*/
    233252
    234253                // Register buttons - trigger above command when clicked
     
    278297                    classes: "btn expresscurateCostom expresscurateAddKeyword"
    279298                });
    280                /* ed.addButton('sochalPost', {
    281                     title: 'Add post',
    282                     icon: 'icon expresscurateSocial mce-expresscurateCostom',
    283                     type: 'menubutton',
    284                     cmd: 'sochalPost',
    285                     menu: [
    286                         {
    287                             text: 'facebook',
    288                             icon: 'icon expresscurateSocial mce-expresscurateCostom',
    289                             onclick: function () {
    290                                 ed.windowManager.open({
    291                                     title: 'Facebook embed',
    292                                     body: [{
    293                                         type: 'textbox',
    294                                         name: 'facebookEmbed'
    295                                     }],
    296                                     onsubmit: function (e) {
    297                                         var $elem=$(e.data.facebookEmbed)[2],
    298                                             url=$($elem).data('href');
    299                                         ed.insertContent('[facebook src="'+url+'"]');
    300                                     }
    301                                 });
    302                             }
    303                         },
    304                         {
    305                             text: 'twitter',
    306                             icon: 'icon expresscurateSocial mce-expresscurateCostom',
    307                             onclick: function () {
    308                                 ed.windowManager.open({
    309                                     title: 'Twitter embed',
    310                                     body: [{
    311                                         type: 'textbox',
    312                                         name: 'twitterEmbed'
    313                                     }],
    314                                     onsubmit: function (e) {
    315                                         var $elem=$(e.data.twitterEmbed)[0],
    316                                             url=$($elem).find('> a').attr('href');
    317                                         ed.insertContent('[embed]'+url+'[/embed]');
    318                                     }
    319                                 });
    320                             }
    321                         }
    322                     ]
    323                 });*/
    324299                ed.onKeyDown.add(function (ed, e) {
    325300                    if (e.altKey && e.keyCode === 75) {
  • expresscurate/trunk/js/Dialog.js

    r1106118 r1109426  
    7979        $.each(paragraphs, function (index, value) {
    8080            if (value['value'].length > shortestParagraphLength) {
    81                 $sorted[index] = value['value'];
     81                $sorted.push(value['value']);
    8282            }
    8383        });
     
    568568            $("#expresscurate_loading").show();
    569569            submitExpresscurateForm();
    570             $(document).ajaxComplete(function () {
    571 
    572             });
    573570        });
    574571        $('#expresscurate_source').keypress(function (e) {
    575572            if (e.keyCode === 13 || e.keyCode === 40) {
     573                $("#expresscurate_loading").show();
    576574                submitExpresscurateForm();
    577575                return false;
  • expresscurate/trunk/js/Utils.js

    r1106118 r1109426  
    152152
    153153    function track(action, curate) {
    154         /*ga('expresscurate.send', 'pageview', {
    155          'page': '/site/' + expresscurate_track_hash
    156          });
    157          ga('expresscurate.send', 'pageview', {
    158          'page': '/site/wp/' + expresscurate_track_hash
    159          });*/
     154        if (!siteSendAnalytics) {
     155            ga('expresscurate.send', 'pageview', {
     156                'page': '/site/' + expresscurate_track_hash
     157            });
     158        }
     159        if (!siteWpSendAnalytics) {
     160            ga('expresscurate.send', 'pageview', {
     161                'page': '/site/wp/' + expresscurate_track_hash
     162            });
     163        }
    160164        if (curate) {
    161165            ga('expresscurate.send', 'pageview', {
     
    185189
    186190        }
     191        /*support submit*/
     192        $('#expresscurate_support_form').on('click', '.feedbackButton, .askButton', function () {
     193            expresscurateSupportSubmit();
     194        });
    187195        /*settings page tabs*/
    188196        if ($('.expresscurate_settings').length) {
  • expresscurate/trunk/js/keywords/SEOControlCenter.js

    r1106118 r1109426  
    250250            }
    251251        });
     252        $('#expresscurate_widget_wrapper .mark').on('click', function (e) {
     253                ExpressCurateKeywords.markEditorKeywords();
     254        });
    252255
    253256        /*insert keyword in content*/
  • expresscurate/trunk/readme.txt

    r1106118 r1109426  
    55Requires at least: 3.9
    66Tested up to: 4.1
    7 Stable tag: 2.0.6
     7Stable tag: 2.0.7
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl.html
     
    8181
    8282= How To Get Started =
    83 [Download ExpressCurate plugin](http://downloads.wordpress.org/plugin/expresscurate.2.0.6.zip "Your favorite content marketing tools") for WordPress. 
     83[Download ExpressCurate plugin](http://downloads.wordpress.org/plugin/expresscurate.2.0.7.zip "Your favorite content marketing tools") for WordPress. 
    8484You can also [download](http://www.expresscurate.com/p/products/wordpress-theme "Your favorite WordPress Theme") a **free** [ExpressCurate WordPress theme](http://www.expresscurate.com/p/products/wordpress-theme "Your favorite WordPress Theme"). It will give your curated content a modern online news look.
    8585
     
    129129== Changelog ==
    130130
     131= 2.0.7 =
     132* Miscellaneous bug fixes and improvements.
     133
    131134= 2.0.6 =
    132135* Miscellaneous bug fixes and improvements.
  • expresscurate/trunk/templates/dashboard.php

    r1106118 r1109426  
    7979                                                  placeholder="Message"></textarea>
    8080                                                  <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label>
    81                                                 <a class="feedbackButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Send</a>
     81                                                <a class="feedbackButton send greenBackground" href="#">Send</a>
    8282                                            </form>
    8383                                        </div>
     
    142142                              placeholder="Message"></textarea>
    143143                            <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label>
    144                             <a class="feedbackButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Send</a>
     144                            <a class="feedbackButton send greenBackground" href="#">Send</a>
    145145                        </form>
    146146                    </div>
  • expresscurate/trunk/templates/dashboard/bookmarks_widget.php

    r1106118 r1109426  
    22$feedManager = new ExpressCurate_FeedManager();
    33$bookmarks = $feedManager->get_bookmarks();
     4if (!empty($bookmarks)){
     5    $sorted_bookmarks = array_reverse($bookmarks);
     6}
    47$last_7_days = $feedManager->count_bookmarks_by_days($bookmarks, 7);
    58$bookmarks_count = count($bookmarks);
    6 $bookmarks = array_slice($bookmarks, 0, 5);
     9$sorted_bookmarks = array_slice($sorted_bookmarks, 0, 5);
     10
    711?>
    812<div class="expresscurate_dashboard expresscurate_Styles expresscurate_dashboard_bookmarks ">
     
    2024    <ul class="list">
    2125        <?php
    22         if (!empty($bookmarks)) {
     26        if (!empty($sorted_bookmarks)) {
    2327            $i = 0;
    24             foreach ($bookmarks as $key => $item) {
     28            foreach ($sorted_bookmarks as $key => $item) {
    2529                ?>
    2630                <li>
  • expresscurate/trunk/templates/dashboard/feed_widget.php

    r1106118 r1109426  
    77        <?php
    88        $feeds = $feedManager->get_feed_list();
    9         if(!empty($feeds)){
     9        if(!empty($feeds) && !empty($feeds['content'])){
    1010            $content_list = array_slice($feeds['content'], 0, 5);
    1111            $i = 0;
     
    2323        ?>
    2424    </ul>
    25 
    26     <a class="settingsLink" href="admin.php?page=expresscurate_feed_list">More Content</a>
     25    <?php  if(!empty($feeds) && !empty($feeds['content'])){ ?>
     26        <a class="settingsLink" href="admin.php?page=expresscurate_feed_list">More Content(<?php echo count($feeds['content']); ?>)</a>
     27    <?php  } ?>
    2728</div>
  • expresscurate/trunk/templates/faq.php

    r1106118 r1109426  
    6969                  placeholder="Question"></textarea>
    7070        <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label>
    71         <a class="askButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Ask</a>
     71        <a class="askButton send greenBackground" href="#">Ask</a>
    7272      </form>
    7373    </div>
  • expresscurate/trunk/templates/support.php

    r1106118 r1109426  
    5656                    placeholder="<?php echo $msg_placeholder?>"></textarea>
    5757            <label for="expresscurate_support_message" class="expresscurate_errorMessage"></label>
    58           <a class="feedbackButton send greenBackground" href="#" onclick="ExpressCurateUtils.expresscurateSupportSubmit();">Send</a>
     58          <a class="feedbackButton send greenBackground" href="#">Send</a>
    5959        </form>
    6060    </div>
  • expresscurate/trunk/templates/widget.php

    r1106118 r1109426  
    66     class="expresscurate_widget_wrapper expresscurate_Styles expresscurate_preventTextSelection">
    77    <label>Keywords <span class="rotate"><a href="#"></a></span>
    8         <span class="mark" onclick="ExpressCurateKeywords.markEditorKeywords();return false;"><span>mark keywords</span></span>
     8        <span class="mark"><span>mark keywords</span></span>
    99    </label>
    1010    <?php
Note: See TracChangeset for help on using the changeset viewer.