Plugin Directory

Changeset 685357


Ignore:
Timestamp:
03/21/2013 08:19:36 PM (13 years ago)
Author:
bmsterling
Message:

Change from using ZIP to XML do to some servers not being able to extract zips
Update install instructions to be clearer
Check to see if folders are there in the event of reactivating a plugin
Clean up readme

Location:
wurfl-capabilities/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wurfl-capabilities/trunk/README.txt

    r685270 r685357  
    55Requires at least: 3.5
    66Tested up to: 3.5.1
    7 Stable tag: 0.3.3
     7Stable tag: 0.3.4
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Using WURFL to expose capabilities of your users browser.  **FTP access is needed to upload the wurfl database**
     11Using WURFL to expose capabilities of your users browser.  NOTE: please see installation instructions before activating.
    1212
    1313== Description ==
     
    1717Some initial methods that are exposed are:
    1818
    19 *   is\_wireless\_device
    20 *   is_tablet
    21 *   is_touch
    22 *   supports_borderradius
    23 *   supports_gradients
    24 *   pointing_method
    25 *   getCapability (points to the WURFL API method of the same name, pass in the param of capability you\'d like to get.  See the help doc link for those param names)
     19*   `is_wireless_device`
     20*   `is_tablet`
     21*   `is_touch`
     22*   `supports_borderradius`
     23*   `supports_gradients`
     24*   `pointing_method`
     25*   `getCapability` (points to the WURFL API method of the same name, pass in the param of capability you'd like to get. See the help doc link for those param names)
    2626
    2727
    2828<strong>Example usage:</strong> `$wurflcap->is_touch();`
    2929
    30 
    3130If something fails, please provide step by step instructions on how to reproduce so that I may address the issue in a timely manner.
    3231
    3332
    34 Please be aware of the licensing at <a href=\"http://wurfl.sourceforge.net/license.php\" target=\"_blank\">http://wurfl.sourceforge.net/license.php</a>
     33Please be aware of the licensing at [http://wurfl.sourceforge.net/license.php](http://wurfl.sourceforge.net/license.php)
    3534
    3635*WURFL is the registered trademark of ScientiaMobile, Inc., Reston, VA, USA*
     
    4140
    42411.  Download and extract the plugin to your plugins directory (wp-content/plugins)
    43 2.  Download the most recent WURFL database from <a href=\"http://sourceforge.net/projects/wurfl/files/WURFL/\" target=\"_blank\">http://sourceforge.net/projects/wurfl/files/WURFL/</a>
    44 3.  Place the downloaded zip file in the WURFL Capabilities plugin's folder
    45 4.  Rename the zip file to **wurfl.zip**
    46 5.  Active the plugin. Note: activation may, depending on your server, take about a minute, do not refresh or close your browser. The WURFL API is caching the data based off the XML that is in zip file.
     422.  Download the most recent WURFL database from [http://sourceforge.net/projects/wurfl/files/WURFL/](http://sourceforge.net/projects/wurfl/files/WURFL/)
     433.  Extract the downloaded zip file and place the XML file into the WURFL Capabilities plugin's folder
     444.  Active the plugin. Note: activation may, depending on your server, take about a minute, do not refresh or close your browser. The WURFL API is caching the data based off the XML file.
     45
     46**Side note:** At this point, do to the point that I can't include the XML file, any future updates to the plugin via the automatic update in wordpress would delete the XML file you installed.  You will need to follow the same flow for updating.
    4747
    4848== Frequently Asked Questions ==
     
    5050= How do I update the database? =
    5151
    52 Follow steps 2 to 4 of the installation steps, the WURFL API checkes the zip for last modifed and, if changed, will update the cache. Again, be aware the initial change will probably take about a minute depending on your server.
     52Follow steps 2 and 3 of the installation steps, the WURFL API checkes the xml for last modifed and, if changed, will update the cache. Again, be aware the initial change will probably take about a minute depending on your server.
     53
     54== Changelog ==
     55
     56= 0.3.4 =
     57*   Change from using ZIP to XML do to some servers not being able to extract zips
     58*   Update install instructions to be clearer
     59*   Check to see if folders are there in the event of reactivating a plugin
     60*   Clean up readme
  • wurfl-capabilities/trunk/WURFLCap.php

    r685270 r685357  
    3232        $new_file_path = WURFL_BASE_DIR;
    3333       
    34         if (!file_exists(WURFL_PLUGIN_DIR.'/wurfl.zip')){
    35             wp_die("wurfl.zip file not found");
     34        if (!file_exists(WURFL_PLUGIN_DIR.'/wurfl.xml')){
     35            wp_die("wurfl.zip file not found, please read the readme file for installation instructions.");
    3636        }
    3737
     
    4848        $cache       = WURFL_CACHE_DIR;
    4949       
    50         if (!mkdir($persistence, 0755, true)) {
    51             wp_die('Permission denied, make sure you have write permission to '.$new_file_path.' folder.');
    52             // return array(
    53                 // 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
    54             // );
    55         }
    56        
    57         if (!mkdir($cache, 0755, true)) {
    58             wp_die('Permission denied, make sure you have write permission to '.$new_file_path.' folder.');
    59             // return array(
    60                 // 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
    61             // );
    62         }
    63        
     50        if (!file_exists($persistence)) {
     51            if (!mkdir($persistence, 0755, true)) {
     52                wp_die('Permission denied, make sure you have write permission to '.$persistence.' folder.');
     53                // return array(
     54                    // 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
     55                // );
     56            }
     57        }
     58       
     59        if (!file_exists($cache)) {
     60            if (!mkdir($cache, 0755, true)) {
     61                wp_die('Permission denied, make sure you have write permission to '.$cache.' folder.');
     62                // return array(
     63                    // 'error' => 'Permission denied, make sure you have write permission to '.$new_file_path.' folder.'
     64                // );
     65            }
     66        }
    6467    } // end activate
    6568
     
    152155
    153156        // Set location of the WURFL File
    154         $wurflConfig->wurflFile(WURFL_PLUGIN_DIR.'/wurfl.zip');
     157        $wurflConfig->wurflFile(WURFL_PLUGIN_DIR.'/wurfl.xml');
    155158
    156159        // Set the match mode for the API ('performance' or 'accuracy')
  • wurfl-capabilities/trunk/wurfl-capabilities.php

    r685270 r685357  
    55    Plugin URI: https://github.com/bmsterling/WURFL-Capabilities
    66    Description: Using WURFL to expose capabilities of your users browser.
    7     Version: 0.3.3
     7    Version: 0.3.4
    88    Author: Benjamin Sterling
    99    Author URI: http://www.benjaminsterling.com
Note: See TracChangeset for help on using the changeset viewer.