Plugin Directory

Changeset 1180153


Ignore:
Timestamp:
06/13/2015 10:38:40 AM (11 years ago)
Author:
ivan.m89
Message:

new version - 1.8.0

Location:
fb-comments-importer
Files:
5 added
4 edited
16 copied

Legend:

Unmodified
Added
Removed
  • fb-comments-importer/nbproject/project.properties

    r1108744 r1180153  
    11include.path=${php.global.include.path}
    2 php.version=PHP_54
     2php.version=PHP_55
    33source.encoding=UTF-8
    44src.dir=.
  • fb-comments-importer/tags/1.8.0/FBComments.class.inc

    r1180151 r1180153  
    410410        $id = trim($id);
    411411        $token = $this->GenerateAccessToken();       
    412         $file = $this->GetHTTPSData('https://graph.facebook.com/v2.3/'.$id.'/comments?'.$token.'&limit=10000&fields=id,from,message,created_time,attachment,comments.limit(10000){id,from,message,created_time}');
     412        $file = $this->GetHTTPSData('https://graph.facebook.com/v2.3/'.$id.'/comments?'.$token.'&limit=10000&fields=id,from,message,created_time,attachment,comments.limit(10000){id,from,message,created_time,attachment}');
    413413        $FBobject = json_decode($file);
    414414       
     
    475475                $data['wp_date'] = $this->GenerateTimeFromString($SingleCommentData->created_time);
    476476                $data['profile_link'] = 'http://www.facebook.com/'.$SingleCommentData->from->id;
     477                if(isset($SingleCommentData->attachment->media->image->src) && isset($SingleCommentData->attachment->url)){
     478                    $data['image'] = serialize(array("image"=>$SingleCommentData->attachment->media->image->src,"url"=>$SingleCommentData->attachment->url));
     479                }
    477480                $data['double_comment_check'] = $this->IsDoubleComment($post_id, 'facebook-comment-importer-plugin__'.$SingleCommentData->id,$SingleCommentData->message,$all_comments_for_post);
     481               
    478482                $Comments[] = $data;
    479483                unset($SingleCommentData);
     
    565569                                'comment_approved' => $comments_status_value,
    566570                            );
    567                             wp_insert_comment($data);
     571                            $reply_id = wp_insert_comment($data);
     572                           
     573                            // add comment meta for images
     574                            if(isset($replay['image'])){
     575                                add_comment_meta( $reply_id, 'fb_comments_importer_comment_image', $replay['image'] );
     576                            }
    568577                            $i++;
    569578                           
  • fb-comments-importer/tags/1.8.0/index.php

    r1180151 r1180153  
    44Plugin URI: http://wp-resources.com/
    55Description: Imports Facebook comments to your Wordpress site and gives it a SEO boost.
    6 Version: 1.7.9
     6Version: 1.8.0
    77Author: Ivan M
    88*/
  • fb-comments-importer/tags/1.8.0/readme.txt

    r1180151 r1180153  
    55Requires at least: 3.0
    66Tested up to: 4.2
    7 Stable tag: 1.7.9
     7Stable tag: 1.8.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5858
    5959== Changelog ==
     60
     61= 1.8.0 2015-06-13 =
     62* Fixed bug related with import images inside replies
    6063
    6164= 1.7.9 2015-06-08 =
  • fb-comments-importer/trunk/FBComments.class.inc

    r1170988 r1180153  
    410410        $id = trim($id);
    411411        $token = $this->GenerateAccessToken();       
    412         $file = $this->GetHTTPSData('https://graph.facebook.com/v2.3/'.$id.'/comments?'.$token.'&limit=10000&fields=id,from,message,created_time,attachment,comments.limit(10000){id,from,message,created_time}');
     412        $file = $this->GetHTTPSData('https://graph.facebook.com/v2.3/'.$id.'/comments?'.$token.'&limit=10000&fields=id,from,message,created_time,attachment,comments.limit(10000){id,from,message,created_time,attachment}');
    413413        $FBobject = json_decode($file);
    414414       
     
    475475                $data['wp_date'] = $this->GenerateTimeFromString($SingleCommentData->created_time);
    476476                $data['profile_link'] = 'http://www.facebook.com/'.$SingleCommentData->from->id;
     477                if(isset($SingleCommentData->attachment->media->image->src) && isset($SingleCommentData->attachment->url)){
     478                    $data['image'] = serialize(array("image"=>$SingleCommentData->attachment->media->image->src,"url"=>$SingleCommentData->attachment->url));
     479                }
    477480                $data['double_comment_check'] = $this->IsDoubleComment($post_id, 'facebook-comment-importer-plugin__'.$SingleCommentData->id,$SingleCommentData->message,$all_comments_for_post);
     481               
    478482                $Comments[] = $data;
    479483                unset($SingleCommentData);
     
    565569                                'comment_approved' => $comments_status_value,
    566570                            );
    567                             wp_insert_comment($data);
     571                            $reply_id = wp_insert_comment($data);
     572                           
     573                            // add comment meta for images
     574                            if(isset($replay['image'])){
     575                                add_comment_meta( $reply_id, 'fb_comments_importer_comment_image', $replay['image'] );
     576                            }
    568577                            $i++;
    569578                           
  • fb-comments-importer/trunk/index.php

    r1176493 r1180153  
    44Plugin URI: http://wp-resources.com/
    55Description: Imports Facebook comments to your Wordpress site and gives it a SEO boost.
    6 Version: 1.7.9
     6Version: 1.8.0
    77Author: Ivan M
    88*/
  • fb-comments-importer/trunk/readme.txt

    r1176493 r1180153  
    55Requires at least: 3.0
    66Tested up to: 4.2
    7 Stable tag: 1.7.9
     7Stable tag: 1.8.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5858
    5959== Changelog ==
     60
     61= 1.8.0 2015-06-13 =
     62* Fixed bug related with import images inside replies
    6063
    6164= 1.7.9 2015-06-08 =
Note: See TracChangeset for help on using the changeset viewer.