WordPress.org

Plugin Directory

Changeset 152700


Ignore:
Timestamp:
09/07/09 10:55:20 (8 years ago)
Author:
sparun
Message:
 
Location:
wp-fb/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-fb/trunk/readme.txt

    r143898 r152700  
    99Requires at least: 2.7 
    1010 
    11 Tested up to: 2.8.3 
     11Tested up to: 2.8.4 
    1212 
    1313Stable tag: 0.1 
     
    1717== Description == 
    1818 
    19 Wp-Feedburner is a plugin which deals with everything Feedburner but for now, it will simply add your feedburner subscriber count to your Dashboard(in Right Now) irrespective of old or new feedburner URL 
     19Wp-Feedburner is a plugin which deals with everything Feedburner but for now, it will simply add your feedburner subscriber count to your Dashboard(in Right Now) irrespective of old or new feedburner URL. 
     20 
     21In order To use this plugin, you have to **register** at [FeedBurner](http://feedburner.google.com/ "Register at FeedBurner") first, to add your feed and **activate the Feed Count service**. 
    2022 
    2123== Installation == 
     
    23251. Activate the plugin through the 'Plugins' menu in WordPress 
    2426 
    25 2. Access Wp-Feedburner settings via the "settings" menu and add your Feedburner Id 
     272. Access Wp-Fb settings via the "settings" menu and add your Feedburner Id 
    2628 
    27293. Your stats should now show up in your Dashboard 
     
    2931== Frequently Asked Questions == 
    3032 
    31 1. Can I use both (old and new) feedburner Url's ? 
     33= Is this an official FeedBurner plugin? = 
    3234 
    33    Yes, Both old(starts with http://feeds.feedburner.com) and new (starts with http://feeds2.feedburner.com) are Supported. 
     35No, it is not. 
    3436 
    35 == Changelog == 
     37= Can I use both (old and new) feedburner Url's ? = 
    3638 
    37 Version 0.1 
    38 - Initial Release 
     39Yes, Both old(starts with http://feeds.feedburner.com) and new (starts with http://feeds2.feedburner.com) are Supported. 
    3940 
    4041== Screenshots == 
    4142 
    42431. Feedburner Subscriber count shown in the dashboard 
     44 
     45== Changelog == 
     46 
     47Version 0.2 - Bug Fixes 
     48 
     49Version 0.1 - Initial Release 
     50 
  • wp-fb/trunk/wp-fb.php

    r143901 r152700  
    33Plugin Name: Wp-Feedburner 
    44Plugin URI: http://sparun.in/wp-feedburner/ 
    5 Description: Wp-Feedburner is a plugin which deals with everything Feedburner.But for now,it will simply add your feedburner subscriber count to your Dashboard(in Right Now) irrespective of old or new feedburner URL. 
    6 Version: 0.1 
     5Description: Wp-Feedburner is a plugin which deals with everything Feedburner.It works on Both old and new feedburner URL. 
     6Version: 0.2 
    77Author: S.P.Arun 
    88Author URI: http://sparun.in/ 
     
    1010==== VERSION HISTROY ==== 
    1111V0.1    - Release Version 
     12V0.2    - Bug Fixes 
    1213 
    1314==== COPYRIGHT ==== 
    14 Copyright 2009  S.P.Arun   
     15Copyright 2009  S.P.Arun  (email : sparun.in@gmail.com) 
    1516 
    1617This program is free software; you can redistribute it and/or modify 
     
    3031*/ 
    3132 
    32 add_action('admin_menu', 'wp_fb' ); 
    33 add_action('admin_head', 'wp_fb_show_stats' ); 
    34 register_activation_hook(__FILE__, 'wp_fb_activate' ); 
     33add_action('admin_menu', 'wp-fb' ); 
     34add_action('admin_head', 'wp-fb_show_stats' ); 
     35register_activation_hook(__FILE__, 'wp-fb_activate' ); 
    3536 
    36 function wp_fb_activate() 
     37function wp-fb_activate() 
    3738{ 
    38     add_option('wp_fb_uri', ''); 
    39     add_option('wp_fb_old', 0); 
     39    add_option('wp-fb_uri', ''); 
     40    add_option('wp-fb_old', 0); 
    4041} 
    4142     
    42 function wp_fb() {   
     43function wp-fb() {   
    4344    //Add options page 
    44     add_options_page('Wp Feedburner Settings', 'WP-FB Settings', 8, __FILE__, 'wp_fb_settings'); 
     45    add_options_page('Wp Feedburner Settings', 'WP-Feed Burner', 8, __FILE__, 'wp-fb_settings'); 
    4546} 
    4647 
    47 function wp_fb_show_stats(){ 
    48     $feeduri = get_option('wp_fb_uri'); 
    49     $old = get_option('wp_fb_old'); 
     48function wp-fb_show_stats(){ 
     49    $feeduri = get_option('wp-fb_uri'); 
     50    $old = get_option('wp-fb_old'); 
    5051     
    5152    if($old == 'on'){ 
     
    5758    } 
    5859     
    59     try { 
    60         $ch = curl_init(); //Use cURL 
    61         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    62         curl_setopt($ch, CURLOPT_URL, $url); 
    63         $data = curl_exec($ch); 
    64         curl_close($ch); 
    65         $xml = new SimpleXMLElement($data); //Read the returned XML 
    66         $count = $xml->feed->entry['circulation']; //Get our subscriber count 
    67          
    68         if($count > 0){ 
    69             ?> 
    70             <script type="text/javascript"> 
    71             jQuery(document).ready(function(){ 
    72                 jQuery('#dashboard_right_now table tbody').before('<tr><td class="first b b-feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>"><? echo $count; ?></a></td><td class="t feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>">FeedBurner Subscribers</a></td></tr>'); 
    73             }); 
    74             </script> 
    75             <? 
    76         } else { 
    77             ?> 
    78             <script type="text/javascript"> 
    79             jQuery(document).ready(function(){ 
    80                 jQuery('#dashboard_right_now table tbody').before('<tr><td class="first b b-feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>">0</a></td><td class="t feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>">FeedBurner Subscribers</a></td></tr>'); 
    81             }); 
    82             </script> 
    83             <? 
     60    if(phpversion() >= '5.2.0') { 
     61        try { 
     62            $ch = curl_init(); //Use cURL 
     63            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
     64            curl_setopt($ch, CURLOPT_URL, $url); 
     65            $data = curl_exec($ch); 
     66            curl_close($ch); 
     67            $xml = new SimpleXMLElement($data); //Read the returned XML 
     68            $count = $xml->feed->entry['circulation']; //Get our subscriber count 
     69             
     70            if($count > 0){ 
     71                ?> 
     72                <script type="text/javascript"> 
     73                jQuery(document).ready(function(){ 
     74                    jQuery('#dashboard_right_now table tbody').append('<tr><td class="first b b-feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>"><? echo $count; ?></a></td><td class="t feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>">FeedBurner Subscribers</a></td></tr>'); 
     75                }); 
     76                </script> 
     77                <? 
     78            } else { 
     79                ?> 
     80                <script type="text/javascript"> 
     81                jQuery(document).ready(function(){ 
     82                    jQuery('#dashboard_right_now table tbody').append('<tr><td class="first b b-feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>">0</a></td><td class="t feed"><a href="http://feeds2.feedburner.com/<? echo $feeduri; ?>">FeedBurner Subscribers</a></td></tr>'); 
     83                }); 
     84                </script> 
     85                <? 
     86            } 
    8487        } 
     88        catch(Exception $e) {} 
    8589    } 
    86     catch(Exception $e) {} 
    8790} 
    8891 
    89 function wp_fb_settings(){ 
     92function wp-fb_settings(){ 
    9093    global $wpdb; 
    9194     
    9295    if(isset($_POST['feeduri'])){ 
    93         update_option('wp_fb_uri', $_POST['feeduri']); 
    94         update_option('wp_fb_old', $_POST['old']); 
     96        update_option('wp-fb_uri', $_POST['feeduri']); 
     97        update_option('wp-fb_old', $_POST['old']); 
    9598        ?> 
    9699        <script type="text/javascript"> 
     
    102105    if($_GET['update']) echo '<div class="updated"><p><strong>'.__('Settings saved').'</strong></p></div>'; 
    103106     
    104     $feeduri = get_option('wp_fb_uri'); 
    105     $old = get_option('wp_fb_old'); 
     107    $feeduri = get_option('wp-fb_uri'); 
     108    $old = get_option('wp-fb_old'); 
    106109    ?> 
    107110    <div class="wrap"> 
     
    112115            <tbody> 
    113116                <tr> 
    114                     <th><label for="feeduri">Feedburner Id</label></th> 
     117                    <th><label for="feeduri">Enter your Feedburner Id</label></th> 
    115118                    <td> 
    116119                        <input id="feeduri" type="text" name="feeduri" value="<?php echo $feeduri; ?>"  /> 
    117                         <span class="setting-description">The bit that comes after the Feeburner URL.(If your Feed is http://feeds2.feedburner.com/s_p_arun or http://feeds.feedburner.com/s_p_arun , then "s_p_arun is your feedburner ID)" </span> 
     120                        <span class="setting-description">The part that comes after the Feeburner URL.(If your Feed is http://feeds2.feedburner.com/s_p_arun or http://feeds.feedburner.com/s_p_arun , then "s_p_arun" is your feedburner ID) </span> 
    118121                    </td> 
    119122                </tr> 
    120123                <tr> 
    121                     <th><label for="old">Check this If you use old feedburner URL</label></th> 
     124                    <th><label for="old">Check this Box If you are using old feedburner URL</label></th> 
    122125                    <td> 
    123126                        <input id="old" type="checkbox" name="old" <? if($old == 'on'){ echo 'checked="checked"'; } ?>  /> 
Note: See TracChangeset for help on using the changeset viewer.