Changeset 685357
- Timestamp:
- 03/21/2013 08:19:36 PM (13 years ago)
- Location:
- wurfl-capabilities/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (4 diffs)
-
WURFLCap.php (modified) (3 diffs)
-
wurfl-capabilities.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wurfl-capabilities/trunk/README.txt
r685270 r685357 5 5 Requires at least: 3.5 6 6 Tested up to: 3.5.1 7 Stable tag: 0.3. 37 Stable tag: 0.3.4 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 Using WURFL to expose capabilities of your users browser. **FTP access is needed to upload the wurfl database**11 Using WURFL to expose capabilities of your users browser. NOTE: please see installation instructions before activating. 12 12 13 13 == Description == … … 17 17 Some initial methods that are exposed are: 18 18 19 * is\_wireless\_device20 * is_tablet21 * is_touch22 * supports_borderradius23 * supports_gradients24 * pointing_method25 * 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) 26 26 27 27 28 28 <strong>Example usage:</strong> `$wurflcap->is_touch();` 29 29 30 31 30 If something fails, please provide step by step instructions on how to reproduce so that I may address the issue in a timely manner. 32 31 33 32 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>33 Please be aware of the licensing at [http://wurfl.sourceforge.net/license.php](http://wurfl.sourceforge.net/license.php) 35 34 36 35 *WURFL is the registered trademark of ScientiaMobile, Inc., Reston, VA, USA* … … 41 40 42 41 1. 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. 42 2. Download the most recent WURFL database from [http://sourceforge.net/projects/wurfl/files/WURFL/](http://sourceforge.net/projects/wurfl/files/WURFL/) 43 3. Extract the downloaded zip file and place the XML file into the WURFL Capabilities plugin's folder 44 4. 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. 47 47 48 48 == Frequently Asked Questions == … … 50 50 = How do I update the database? = 51 51 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. 52 Follow 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 32 32 $new_file_path = WURFL_BASE_DIR; 33 33 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."); 36 36 } 37 37 … … 48 48 $cache = WURFL_CACHE_DIR; 49 49 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 } 64 67 } // end activate 65 68 … … 152 155 153 156 // Set location of the WURFL File 154 $wurflConfig->wurflFile(WURFL_PLUGIN_DIR.'/wurfl. zip');157 $wurflConfig->wurflFile(WURFL_PLUGIN_DIR.'/wurfl.xml'); 155 158 156 159 // Set the match mode for the API ('performance' or 'accuracy') -
wurfl-capabilities/trunk/wurfl-capabilities.php
r685270 r685357 5 5 Plugin URI: https://github.com/bmsterling/WURFL-Capabilities 6 6 Description: Using WURFL to expose capabilities of your users browser. 7 Version: 0.3. 37 Version: 0.3.4 8 8 Author: Benjamin Sterling 9 9 Author URI: http://www.benjaminsterling.com
Note: See TracChangeset
for help on using the changeset viewer.