Changeset 1350001
- Timestamp:
- 02/13/2016 05:07:09 PM (10 years ago)
- Location:
- fb-comments-importer/tags/2.2
- Files:
-
- 5 added
- 17 copied
-
. (added)
-
FBComments.class.inc (copied) (copied from fb-comments-importer/trunk/FBComments.class.inc) (7 diffs)
-
advert.png (copied) (copied from fb-comments-importer/trunk/advert.png)
-
advert_3.png (copied) (copied from fb-comments-importer/trunk/advert_3.png)
-
css (added)
-
css/css.css (copied) (copied from fb-comments-importer/trunk/css/css.css)
-
index.php (copied) (copied from fb-comments-importer/trunk/index.php) (2 diffs)
-
js (added)
-
js/script.js (copied) (copied from fb-comments-importer/trunk/js/script.js) (1 diff)
-
manual_import.php (copied) (copied from fb-comments-importer/trunk/manual_import.php)
-
paypal.png (copied) (copied from fb-comments-importer/trunk/paypal.png)
-
readme.txt (copied) (copied from fb-comments-importer/trunk/readme.txt) (2 diffs)
-
templates (added)
-
templates/about_pro.php (copied) (copied from fb-comments-importer/trunk/templates/about_pro.php)
-
templates/fetch_all_tpl.php (copied) (copied from fb-comments-importer/trunk/templates/fetch_all_tpl.php)
-
templates/home.php (copied) (copied from fb-comments-importer/trunk/templates/home.php) (1 diff)
-
templates/img (added)
-
templates/img/screen1.png (copied) (copied from fb-comments-importer/trunk/templates/img/screen1.png)
-
templates/img/screen2.png (copied) (copied from fb-comments-importer/trunk/templates/img/screen2.png)
-
templates/img/screen3.png (copied) (copied from fb-comments-importer/trunk/templates/img/screen3.png)
-
templates/import_done_tpl.php (copied) (copied from fb-comments-importer/trunk/templates/import_done_tpl.php)
-
update_form.php (copied) (copied from fb-comments-importer/trunk/update_form.php)
Legend:
- Unmodified
- Added
- Removed
-
fb-comments-importer/tags/2.2/FBComments.class.inc
r1324806 r1350001 137 137 } 138 138 139 139 140 140 public function GetFbPageItems($api_url){ 141 141 142 142 $data = $this->GetHTTPSData($api_url); 143 $obj = json_decode($data); 144 143 $obj = json_decode($data); 144 145 145 // parse and prepare data from api 146 146 if($obj->data){ … … 279 279 */ 280 280 public function fetchGroupPostsUnlimited($api_url,$fb_page_id,$limit,$token,$fields = 'id,message,created_time,picture,type,name,source,link'){ 281 281 282 282 // API URI 283 283 if($api_url=='null'){ … … 386 386 $num = $wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."commentmeta WHERE comment_id = '" . $cid . "' AND meta_value = '" . $mv . "'"); 387 387 if(!$num){ 388 return "0";388 return "0"; 389 389 } else { 390 return $num;390 return $num; 391 391 } 392 392 } … … 403 403 $num = $wpdb->get_var( "SELECT comment_ID FROM ".$wpdb->prefix."comments WHERE comment_post_ID = '" . $postid . "' AND comment_agent = '" . $user_agent . "'"); 404 404 if(!$num){ 405 return "0";405 return "0"; 406 406 } else { 407 return $num;407 return $num; 408 408 } 409 409 } … … 426 426 $id = trim($id); 427 427 $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}'); 429 429 $FBobject = json_decode($file); 430 430 … … 447 447 $data['wp_date'] = $this->GenerateTimeFromString($SingleCommentData->created_time); 448 448 $data['profile_link'] = 'http://www.facebook.com/'.$SingleCommentData->from->id; 449 449 450 450 if(isset($SingleCommentData->attachment->media->image->src) && isset($SingleCommentData->attachment->url)){ 451 451 $data['image'] = serialize(array("image"=>$SingleCommentData->attachment->media->image->src,"url"=>$SingleCommentData->attachment->url)); … … 457 457 } 458 458 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); 460 460 } else { 461 461 $data['replies'] = null; -
fb-comments-importer/tags/2.2/index.php
r1324806 r1350001 4 4 Plugin URI: http://wp-resources.com/ 5 5 Description: Imports Facebook comments to your Wordpress site and gives it a SEO boost. 6 Version: 2. 16 Version: 2.2 7 7 Author: Ivan M 8 8 */ … … 141 141 142 142 if(!$website_base_url){ 143 $wp_site_url = get_site_url();143 $wp_site_url = get_site_url(); 144 144 update_option('commentes_importer_website_base_url', $wp_site_url); 145 145 } -
fb-comments-importer/tags/2.2/js/script.js
r1324806 r1350001 2 2 jQuery.ajax({ 3 3 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, 5 5 async: true, 6 6 success: function(resp) { 7 8 num = resp.data.length; 7 num = resp.comments.summary.total_count; 9 8 jQuery("#countcomm_"+id).html('['+num+']'); 10 9 } -
fb-comments-importer/tags/2.2/readme.txt
r1324806 r1350001 5 5 Requires at least: 3.0 6 6 Tested up to: 4.3 7 Stable tag: 2. 17 Stable tag: 2.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 58 58 59 59 == 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) 60 65 61 66 = 2.1 2015-09-28 = -
fb-comments-importer/tags/2.2/templates/home.php
r1324806 r1350001 3 3 <div class="infodiv_fbcommentsimp padding_5px"> 4 4 <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) 6 6 </form> 7 7 </div>
Note: See TracChangeset
for help on using the changeset viewer.