Plugin Directory

Changeset 1350001


Ignore:
Timestamp:
02/13/2016 05:07:09 PM (10 years ago)
Author:
ivan.m89
Message:

release 2.2

Location:
fb-comments-importer/tags/2.2
Files:
5 added
17 copied

Legend:

Unmodified
Added
Removed
  • fb-comments-importer/tags/2.2/FBComments.class.inc

    r1324806 r1350001  
    137137    }
    138138   
    139        
     139   
    140140    public function GetFbPageItems($api_url){
    141141       
    142142        $data = $this->GetHTTPSData($api_url);
    143         $obj = json_decode($data);
    144        
     143        $obj = json_decode($data);       
     144
    145145        // parse and prepare data from api
    146146        if($obj->data){
     
    279279     */
    280280    public function fetchGroupPostsUnlimited($api_url,$fb_page_id,$limit,$token,$fields = 'id,message,created_time,picture,type,name,source,link'){
    281    
     281       
    282282        // API URI
    283283        if($api_url=='null'){
     
    386386        $num = $wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."commentmeta WHERE comment_id = '" . $cid . "' AND meta_value = '" . $mv . "'");
    387387        if(!$num){
    388         return "0";
     388            return "0";
    389389    } else {
    390                 return $num;
     390            return $num;
    391391    }
    392392    }
     
    403403        $num = $wpdb->get_var( "SELECT comment_ID FROM ".$wpdb->prefix."comments WHERE comment_post_ID = '" . $postid . "' AND comment_agent = '" . $user_agent . "'");
    404404        if(!$num){
    405         return "0";
     405            return "0";
    406406    } else {
    407                 return $num;
     407            return $num;
    408408    }
    409409    }
     
    426426        $id = trim($id);
    427427        $token = $this->GenerateAccessToken();       
    428         $file = $this->GetHTTPSData('https://graph.facebook.com/v2.4/'.$id.'/comments?'.$token.'&limit=10000&fields=id,from,message,created_time,attachment,comments.limit(10000){id,from,message,created_time,attachment}');
     428        $file = $this->GetHTTPSData('https://graph.facebook.com/v2.5/'.$id.'/comments?'.$token.'&limit=10000&fields=id,from,message,created_time,attachment,comments.limit(10000){id,from,message,created_time,attachment}');
    429429        $FBobject = json_decode($file);
    430430       
     
    447447                    $data['wp_date'] = $this->GenerateTimeFromString($SingleCommentData->created_time);
    448448                    $data['profile_link'] = 'http://www.facebook.com/'.$SingleCommentData->from->id;
    449 
     449                   
    450450                    if(isset($SingleCommentData->attachment->media->image->src) && isset($SingleCommentData->attachment->url)){
    451451                        $data['image'] = serialize(array("image"=>$SingleCommentData->attachment->media->image->src,"url"=>$SingleCommentData->attachment->url));
     
    457457                    }
    458458                    if(isset($SingleCommentData->comments->data)){
    459                     $data['replies'] = $this->GetCommentsRepliesFromObject($SingleCommentData->comments->data,$post_id,$all_comments_for_post);
     459                        $data['replies'] = $this->GetCommentsRepliesFromObject($SingleCommentData->comments->data,$post_id,$all_comments_for_post);
    460460                    } else {
    461461                        $data['replies'] = null;
  • fb-comments-importer/tags/2.2/index.php

    r1324806 r1350001  
    44Plugin URI: http://wp-resources.com/
    55Description: Imports Facebook comments to your Wordpress site and gives it a SEO boost.
    6 Version: 2.1
     6Version: 2.2
    77Author: Ivan M
    88*/
     
    141141           
    142142            if(!$website_base_url){
    143             $wp_site_url = get_site_url();
     143                $wp_site_url = get_site_url();
    144144                update_option('commentes_importer_website_base_url', $wp_site_url);
    145145            }
  • fb-comments-importer/tags/2.2/js/script.js

    r1324806 r1350001  
    22    jQuery.ajax({
    33        type: "GET",
    4         url: "https://graph.facebook.com/"+id+"/comments?limit=5000&fields=id&"+token,
     4        url: "https://graph.facebook.com/v2.5/"+id+"?fields=comments.summary(true).limit(0)&"+token,
    55        async: true,
    66        success: function(resp) {
    7            
    8             num = resp.data.length;
     7            num = resp.comments.summary.total_count;
    98            jQuery("#countcomm_"+id).html('['+num+']');
    109        }
  • fb-comments-importer/tags/2.2/readme.txt

    r1324806 r1350001  
    55Requires at least: 3.0
    66Tested up to: 4.3
    7 Stable tag: 2.1
     7Stable tag: 2.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5858
    5959== Changelog ==
     60
     61= 2.2 2015-02-13 =
     62* readme update
     63* fixed problem with checking comments number (api call updated)
     64* Switched to latest API version (2.5)
    6065
    6166= 2.1 2015-09-28 =
  • fb-comments-importer/tags/2.2/templates/home.php

    r1324806 r1350001  
    33<div class="infodiv_fbcommentsimp padding_5px">
    44    <form action="#" method="POST">
    5     Limit: <input type="text" name="limit" value="<?php echo $limit;?>"> <input type="submit" value="Show">  (<b>Note:</b> Number of results can be smaller than submitted limit. Plugin will show only results from which we can import comments)
     5        Limit: <input type="text" name="limit" value="<?php echo $limit;?>"> <input type="submit" value="Show">  (<b>Note:</b> Number of results can be smaller than submitted limit. Plugin will show only results from which we can import comments)
    66    </form>
    77</div>
Note: See TracChangeset for help on using the changeset viewer.