Changeset 767483
- Timestamp:
- 09/05/2013 05:40:41 PM (13 years ago)
- Location:
- realtidbits-comments/trunk
- Files:
-
- 2 added
- 2 edited
-
readme.txt (modified) (2 diffs)
-
realtidbits-comments.php (modified) (3 diffs)
-
widgets/rtb-popularcomments.php (added)
-
widgets/rtb-recentcomments.php (added)
Legend:
- Unmodified
- Added
- Removed
-
realtidbits-comments/trunk/readme.txt
r766571 r767483 4 4 Requires at least: 2.5 5 5 Tested up to: 3.5 6 Stable tag: 1.1.3. 56 Stable tag: 1.1.3.6 7 7 8 8 The RealTidbits comment system replaces your WordPress comment system with comments powered by RealTidbits. … … 19 19 20 20 == Changelog == 21 22 = 1.1.3.6 = 23 * Added Most Popular Comments widget 24 * Improved Recent Comments Widget 21 25 22 26 = 1.1.3.5 = -
realtidbits-comments/trunk/realtidbits-comments.php
r766571 r767483 5 5 Description: The RealTidbits comment system replaces your WordPress comment system with comments powered by RealTidbits. 6 6 Author: RealTidbits <support@realtidbits.com> 7 Version: 1.1.3. 57 Version: 1.1.3.6 8 8 Author URI: http://realtidbits.com/ 9 9 */ 10 10 11 define('RTB_COMMENTS_VERSION', '1.1.3. 5');11 define('RTB_COMMENTS_VERSION', '1.1.3.6'); 12 12 13 13 … … 35 35 36 36 require_once("widgets/rtb-audiorecorder.php"); 37 require_once("widgets/rtb-recentcomments.php"); 38 require_once("widgets/rtb-popularcomments.php"); 37 39 38 40 function rtb_load_widgets() { 39 41 register_widget( 'rtb_audiorecorder_widget' ); 42 register_widget( 'rtb_recentcomments_widget' ); 43 register_widget( 'rtb_popularcomments_widget' ); 40 44 } 41 45 add_action( 'widgets_init', 'rtb_load_widgets' ); … … 445 449 add_filter('plugin_action_links', 'rtb_plugin_action_links', 10, 2); 446 450 447 448 //error_reporting(E_ALL);449 add_action("widgets_init", array('RTB_Comments_widget', 'register'));450 register_activation_hook( __FILE__, array('RTB_Comments_widget', 'activate'));451 register_deactivation_hook( __FILE__, array('RTB_Comments_widget', 'deactivate'));452 class RTB_Comments_widget {453 function activate(){454 $data = array( 'option1' => 'Default value' ,'option2' => 55);455 if ( ! get_option('widget_name')){456 add_option('widget_name' , $data);457 } else {458 update_option('widget_name' , $data);459 }460 }461 function deactivate(){462 delete_option('widget_name');463 }464 function control(){465 $data = get_option('widget_name');466 ?>467 <p><label>Number of Comments<input name="widget_name_option1"468 type="text" value="<?php echo $data['option1']; ?>" /></label></p>469 <!--<p><label>Option 2<input name="widget_name_option2"470 type="text" value="<?php echo $data['option2']; ?>" /></label></p>-->471 <?php472 if (isset($_POST['widget_name_option1'])){473 $data['option1'] = attribute_escape($_POST['widget_name_option1']);474 $data['option2'] = attribute_escape($_POST['widget_name_option2']);475 update_option('widget_name', $data);476 }477 }478 function widget($args, $instance=null){479 extract($args, EXTR_SKIP);480 $title = apply_filters('widget_title', $instance['title'] ); // Title481 echo $args['before_widget'];482 if ( $title ) {483 echo $before_title . $title . $after_title;484 } else {485 echo $before_title . 'Recent Comments' . $after_title;486 }487 //include dirname(__FILE__) . '/widget.php';488 $x = get_option('widget_name');489 if(is_numeric($x['option1'])) { $itemsPerPage = $x['option1']; } else { $itemsPerPage = '10'; };490 ?>491 <!-- RealTidbits.Comments -->492 <div id="rtb-latest-comments">Loading comments...</div>493 <script type="text/javascript">494 Backplane.init({495 "serverBaseURL" : "http://api.echoenabled.com/v1",496 "busName": "<?php echo get_option('rtb_comments_backplane_busname'); ?>"497 });498 </script>499 <style type="text/css">500 #rtb-latest-comments .echo-streamserver-controls-stream-item-markers,501 #rtb-latest-comments .echo-streamserver-controls-stream-item-tags,502 #rtb-latest-comments .echo-streamserver-controls-stream-item-buttons,503 #rtb-latest-comments .echo-streamserver-controls-stream-item-modeSwitch {504 display:none !important;505 }506 </style>507 <script type="text/javascript">508 jQuery(document).ready(function() {509 Echo.Loader.initApplication({510 "script": "http://cdn.echoenabled.com/sdk/v3/streamserver.pack.js",511 "component": "Echo.StreamServer.Controls.Stream",512 "backplane": {513 "busName": "<?php echo get_option('rtb_comments_backplane_busname'); ?>",514 "serverBaseURL": "https://api.echoenabled.com/v1"515 },516 "config": {517 "target": document.getElementById('rtb-latest-comments'),518 "appkey": "<?php echo get_option('rtb_comments_appkey'); ?>",519 "query": "childrenof:" + document.location.protocol + "//" + document.location.hostname + "/* type:'http://activitystrea.ms/schema/1.0/comment' -markers:page sortOrder:reverseChronological children state:Untouched,ModeratorApproved user.state:Untouched,ModeratorApproved itemsPerPage:<?php echo $itemsPerPage?> -source:Twitter,Facebook",520 "stream": {521 "queryParams": {522 "main": {"source": "-source:Twitter,Facebook -provider:'Idea Melt'", "bozo": true, "premod": true, "type": "type:'http://activitystrea.ms/schema/1.0/comment'"}523 }524 },525 "item": {526 "reTag": false,527 "limits": {528 "maxBodyCharacters": 300529 }530 },531 "liveUpdates": {532 "enabled" : false533 },534 "itemsPerPage": <?php echo $itemsPerPage?>,535 "children": {536 "sortOrder": "chronological"537 },538 "plugins": [539 {540 "name": "Whirlpools",541 "after" : 2,542 "clickable": true543 },544 {"name": "CommunityFlag"},545 {"name": "Curation"},546 {"name": "UserBan"},547 {"name": "UserPrivileges"},548 {549 "name": "Reply",550 "actionString": "Write reply here...",551 "nestedPlugins": [{552 "name": "FormAuth",553 "submitPermissions": "forceLogin"554 }]555 }556 ]557 }558 });559 });560 </script>561 562 <!-- End of RealTidbits.Comments -->563 564 <?php565 566 echo $args['after_widget'];567 }568 function register(){569 register_sidebar_widget('RealTidbits Recent Comments', array('RTB_Comments_widget', 'widget'));570 register_widget_control('RealTidbits Recent Comments', array('RTB_Comments_widget', 'control'));571 }572 }573 574 451 // Javascript Files 575 452
Note: See TracChangeset
for help on using the changeset viewer.