WordPress.org

Plugin Directory

Changeset 611973


Ignore:
Timestamp:
10/13/12 15:30:18 (18 months ago)
Author:
SteveAtty
Message:

Version 2.8 - move to wp_get plus other tweaks

Location:
canalplan-ac
Files:
13 edited
19 copied

Legend:

Unmodified
Added
Removed
  • canalplan-ac/tags/2.8/admin-pages/cp-admin-diagnostics.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Diagnstics 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Diagnostics for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/tags/2.8/admin-pages/cp-admin-fav.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Favourites 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Favourites admin for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/tags/2.8/admin-pages/cp-admin-general.php

    r576472 r611973  
    11<?php 
    2  
    3  
    42/* 
    53Extension Name: Canalplan General Settings 
     
    103101            'sslverify' => false 
    104102    ); 
    105     //$response = wp_remote_get(CANALPLAN_BASE."/data/canalplan_wp.sqlite" ,$params); 
    106     //var_dump($response['body']); 
    107     $handle=fopen("http://www.canalplan.org.uk/data/canalplan_wp.sqlite","rb"); 
     103    $response = wp_remote_get(CANALPLAN_BASE."/data/canalplan_wp.sqlite" ,$params); 
    108104    $handle2=fopen("../wp-content/uploads/canalplan_data.sqlite","w"); 
    109     $contents = ''; 
    110     while (!feof($handle)) { 
    111       $contents = fread($handle, 8192); 
    112        fwrite($handle2,$contents); 
    113     } 
    114     fclose($handle); 
     105    //var_dump($response['response']); 
     106    if ($response['response']['code']==200) { 
     107    //  echo "Retrieving data using remote get"; 
     108        $data = $response['body']; 
     109        $handle2=fopen("../wp-content/uploads/canalplan_data.sqlite","w"); 
     110        fwrite($handle2, $data); 
     111    } else { 
     112    //  echo "Retrieving data using fopen"; 
     113        $handle=fopen(CANALPLAN_BASE."/data/canalplan_wp.sqlite","rb");; 
     114        $contents = ''; 
     115        while (!feof($handle)) { 
     116          $contents = fread($handle, 8192); 
     117          fwrite($handle2,$contents); 
     118        } 
     119        fclose($handle); 
     120    } 
    115121    fclose($handle2); 
    116122    $dbhandle = new PDO("sqlite:../wp-content/uploads/canalplan_data.sqlite"); 
  • canalplan-ac/tags/2.8/admin-pages/cp-admin-google.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Google options 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Favourites admin for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/tags/2.8/admin-pages/cp-admin-home.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Home Mooring 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Home Mooring admin page for the Canalplan AC Plugin 
    87Author: Steve Atty 
    98*/ 
    10  
    119 
    1210require_once ('admin.php'); 
  • canalplan-ac/tags/2.8/admin-pages/cp-admin-menu.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Menu 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 2.2 
     5Version: 2.8 
    76Description: Menu Page for the Canalplan AC Plugin 
    87Author: Steve Atty 
     
    1716<h2><?php _e('CanalPlan AC Integration Overview') ?> </h2> 
    1817This plugin allows you to integrate your blog with <a href="<?php echo CANALPLAN_BASE; ?>">Canalplan AC</a> 
    19  
    2018<p><a href="?page=canalplan-ac/admin-pages/cp-admin-general.php"> General Options </a> <br /> 
    2119This sets up various general options for the Canalplan plugin such as the Distance Format and your Canalplan AC link code</p> 
  • canalplan-ac/tags/2.8/admin-pages/cp-admin-update.php

    r409641 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Bulk update 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Bulk notifier page for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/tags/2.8/admin-pages/cp-import_route.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Import Route 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Import Route page for the Canalplan AC Plugin 
    87Author: Steve Atty 
    98*/ 
    10  
    11  
    129require_once('admin.php'); 
    1310$title = __('CanalPlan Import Route'); 
  • canalplan-ac/tags/2.8/admin-pages/cp-manage_route.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Manage Route 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Manage Route Page for the Canalplan AC Plugin 
    87Author: Steve Atty 
    98*/ 
    10  
    119 
    1210require_once('admin.php'); 
  • canalplan-ac/tags/2.8/canalplan.php

    r576472 r611973  
    44Plugin URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    55Description: Provides features to integrate your blog with <a href="http://www.canalplan.eu">Canalplan AC</a> - the Canal Route Planner. 
    6 Version: 2.7 
     6Version: 2.8 
    77Author: Steve Atty 
    88Author URI: http://blogs.canalplan.org.uk/steve/ 
     
    3030define ('CANALPLAN_GAZ_URL',CANALPLAN_BASE.'/gazetteer/'); 
    3131define ('CANALPLAN_MAX_POST_PROCESS',20); 
    32 define('CANALPLAN_CODE_RELEASE','2.7 r00'); 
     32define('CANALPLAN_CODE_RELEASE','2.8 r00'); 
    3333 
    3434global $table_prefix, $wp_version,$wpdb,$db_prefix; 
     
    571571 
    572572function blroute(){ 
    573     $routeid = $_REQUEST['routeid']; 
     573    $routeid = $_GET['routeid']; 
    574574    $routeid = preg_replace('{/$}', '', $routeid); 
    575575    if (!isset($routeid)){$routeid=0;} 
     
    930930 
    931931add_action('activated_plugin','save_error'); 
     932if (!is_admin()){ 
    932933add_filter('the_content','blogroute_insert'); 
    933934add_filter('the_excerpt','blogroute_insert'); 
    934935add_action('wp_head', 'canalplan_header'); 
    935936add_action('wp_footer', 'canalplan_footer'); 
     937} 
    936938add_action('admin_menu', 'canalplan_add_custom_box'); 
    937939add_action('init', 'canal_init'); 
  • canalplan-ac/tags/2.8/canalplan_widget.php

    r576472 r611973  
    3838        echo "</iframe>"; 
    3939        $latfile='https://www.google.com/latitude/apps/badge/api?user='.$instance['google'].'&type=json'; 
     40        #var_dump($latfile); 
    4041        $llines = file_get_contents($latfile); 
    4142        $lcontents=utf8_encode($llines); 
     
    112113 
    113114} 
    114  
    115115/* register widget when loading the WP core */ 
    116116add_action('widgets_init', 'canalplan_widgets'); 
     
    121121} 
    122122 
    123  
    124  
    125123?> 
  • canalplan-ac/tags/2.8/readme.txt

    r576472 r611973  
    44Tags: crosspost, Canalplan 
    55Requires at least: 3.0 
    6 Tested up to: 3.4.1 
    7 Stable tag: 2.7 
     6Tested up to: 3.4.2 
     7Stable tag: 2.8 
    88 
    99== Description == 
     
    2323== Installation == 
    2424 
    25 1. [Download] (http://wordpress.org/extend/plugins/canalplan-ac/) the latest version of Wordbooker. 
     251. [Download] (http://wordpress.org/extend/plugins/canalplan-ac/) the latest version of the Canaplan AC Plugin. 
    26261. Unzip the ZIP file. 
    27271. Upload the `canalplan` directory to the `/wp-content/plugins/` directory. 
     
    5353== Changelog == 
    5454 
    55 = Version 2.7 24/07/2012 = 
     55= Version 2.8 13/10/2012 = 
     56- Changed a couple of fixed URLS to use constants to make url changes easier. 
     57- Added a couple of conditional checks to make things tidy. 
     58- Moved Data Pull from Canalplan to use wp_get - so fopen is not needed any more which makes things better. 
     59 
     60= Version 2.7 21/07/2012 = 
    5661- Server work to reduce DB download size.  
    5762- Recode data loader to use smaller fetch requests 
  • canalplan-ac/trunk/admin-pages/cp-admin-diagnostics.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Diagnstics 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Diagnostics for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/trunk/admin-pages/cp-admin-fav.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Favourites 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Favourites admin for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/trunk/admin-pages/cp-admin-general.php

    r576472 r611973  
    11<?php 
    2  
    3  
    42/* 
    53Extension Name: Canalplan General Settings 
     
    103101            'sslverify' => false 
    104102    ); 
    105     //$response = wp_remote_get(CANALPLAN_BASE."/data/canalplan_wp.sqlite" ,$params); 
    106     //var_dump($response['body']); 
    107     $handle=fopen("http://www.canalplan.org.uk/data/canalplan_wp.sqlite","rb"); 
     103    $response = wp_remote_get(CANALPLAN_BASE."/data/canalplan_wp.sqlite" ,$params); 
    108104    $handle2=fopen("../wp-content/uploads/canalplan_data.sqlite","w"); 
    109     $contents = ''; 
    110     while (!feof($handle)) { 
    111       $contents = fread($handle, 8192); 
    112        fwrite($handle2,$contents); 
    113     } 
    114     fclose($handle); 
     105    //var_dump($response['response']); 
     106    if ($response['response']['code']==200) { 
     107    //  echo "Retrieving data using remote get"; 
     108        $data = $response['body']; 
     109        $handle2=fopen("../wp-content/uploads/canalplan_data.sqlite","w"); 
     110        fwrite($handle2, $data); 
     111    } else { 
     112    //  echo "Retrieving data using fopen"; 
     113        $handle=fopen(CANALPLAN_BASE."/data/canalplan_wp.sqlite","rb");; 
     114        $contents = ''; 
     115        while (!feof($handle)) { 
     116          $contents = fread($handle, 8192); 
     117          fwrite($handle2,$contents); 
     118        } 
     119        fclose($handle); 
     120    } 
    115121    fclose($handle2); 
    116122    $dbhandle = new PDO("sqlite:../wp-content/uploads/canalplan_data.sqlite"); 
  • canalplan-ac/trunk/admin-pages/cp-admin-google.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Google options 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Favourites admin for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/trunk/admin-pages/cp-admin-home.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Home Mooring 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Home Mooring admin page for the Canalplan AC Plugin 
    87Author: Steve Atty 
    98*/ 
    10  
    119 
    1210require_once ('admin.php'); 
  • canalplan-ac/trunk/admin-pages/cp-admin-menu.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Menu 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 2.2 
     5Version: 2.8 
    76Description: Menu Page for the Canalplan AC Plugin 
    87Author: Steve Atty 
     
    1716<h2><?php _e('CanalPlan AC Integration Overview') ?> </h2> 
    1817This plugin allows you to integrate your blog with <a href="<?php echo CANALPLAN_BASE; ?>">Canalplan AC</a> 
    19  
    2018<p><a href="?page=canalplan-ac/admin-pages/cp-admin-general.php"> General Options </a> <br /> 
    2119This sets up various general options for the Canalplan plugin such as the Distance Format and your Canalplan AC link code</p> 
  • canalplan-ac/trunk/admin-pages/cp-admin-update.php

    r409641 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Bulk update 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Bulk notifier page for the Canalplan AC Plugin 
    87Author: Steve Atty 
  • canalplan-ac/trunk/admin-pages/cp-import_route.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Import Route 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Import Route page for the Canalplan AC Plugin 
    87Author: Steve Atty 
    98*/ 
    10  
    11  
    129require_once('admin.php'); 
    1310$title = __('CanalPlan Import Route'); 
  • canalplan-ac/trunk/admin-pages/cp-manage_route.php

    r576472 r611973  
    11<?php 
    2  
    32/* 
    43Extension Name: Canalplan Manage Route 
    54Extension URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    6 Version: 0.9 
     5Version: 2.8 
    76Description: Manage Route Page for the Canalplan AC Plugin 
    87Author: Steve Atty 
    98*/ 
    10  
    119 
    1210require_once('admin.php'); 
  • canalplan-ac/trunk/canalplan.php

    r576472 r611973  
    44Plugin URI: http://blogs.canalplan.org.uk/canalplanac/canalplan-plug-in/ 
    55Description: Provides features to integrate your blog with <a href="http://www.canalplan.eu">Canalplan AC</a> - the Canal Route Planner. 
    6 Version: 2.7 
     6Version: 2.8 
    77Author: Steve Atty 
    88Author URI: http://blogs.canalplan.org.uk/steve/ 
     
    3030define ('CANALPLAN_GAZ_URL',CANALPLAN_BASE.'/gazetteer/'); 
    3131define ('CANALPLAN_MAX_POST_PROCESS',20); 
    32 define('CANALPLAN_CODE_RELEASE','2.7 r00'); 
     32define('CANALPLAN_CODE_RELEASE','2.8 r00'); 
    3333 
    3434global $table_prefix, $wp_version,$wpdb,$db_prefix; 
     
    571571 
    572572function blroute(){ 
    573     $routeid = $_REQUEST['routeid']; 
     573    $routeid = $_GET['routeid']; 
    574574    $routeid = preg_replace('{/$}', '', $routeid); 
    575575    if (!isset($routeid)){$routeid=0;} 
     
    930930 
    931931add_action('activated_plugin','save_error'); 
     932if (!is_admin()){ 
    932933add_filter('the_content','blogroute_insert'); 
    933934add_filter('the_excerpt','blogroute_insert'); 
    934935add_action('wp_head', 'canalplan_header'); 
    935936add_action('wp_footer', 'canalplan_footer'); 
     937} 
    936938add_action('admin_menu', 'canalplan_add_custom_box'); 
    937939add_action('init', 'canal_init'); 
  • canalplan-ac/trunk/canalplan_widget.php

    r576472 r611973  
    3838        echo "</iframe>"; 
    3939        $latfile='https://www.google.com/latitude/apps/badge/api?user='.$instance['google'].'&type=json'; 
     40        #var_dump($latfile); 
    4041        $llines = file_get_contents($latfile); 
    4142        $lcontents=utf8_encode($llines); 
     
    112113 
    113114} 
    114  
    115115/* register widget when loading the WP core */ 
    116116add_action('widgets_init', 'canalplan_widgets'); 
     
    121121} 
    122122 
    123  
    124  
    125123?> 
  • canalplan-ac/trunk/readme.txt

    r576472 r611973  
    44Tags: crosspost, Canalplan 
    55Requires at least: 3.0 
    6 Tested up to: 3.4.1 
    7 Stable tag: 2.7 
     6Tested up to: 3.4.2 
     7Stable tag: 2.8 
    88 
    99== Description == 
     
    2323== Installation == 
    2424 
    25 1. [Download] (http://wordpress.org/extend/plugins/canalplan-ac/) the latest version of Wordbooker. 
     251. [Download] (http://wordpress.org/extend/plugins/canalplan-ac/) the latest version of the Canaplan AC Plugin. 
    26261. Unzip the ZIP file. 
    27271. Upload the `canalplan` directory to the `/wp-content/plugins/` directory. 
     
    5353== Changelog == 
    5454 
    55 = Version 2.7 24/07/2012 = 
     55= Version 2.8 13/10/2012 = 
     56- Changed a couple of fixed URLS to use constants to make url changes easier. 
     57- Added a couple of conditional checks to make things tidy. 
     58- Moved Data Pull from Canalplan to use wp_get - so fopen is not needed any more which makes things better. 
     59 
     60= Version 2.7 21/07/2012 = 
    5661- Server work to reduce DB download size.  
    5762- Recode data loader to use smaller fetch requests 
Note: See TracChangeset for help on using the changeset viewer.