Changeset 384111
- Timestamp:
- 05/12/2011 05:08:00 PM (15 years ago)
- Location:
- reet-pe-tweet/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
reet-pe-tweet.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
reet-pe-tweet/trunk/readme.txt
r384100 r384111 29 29 2. Activate the plugin through the 'Plugins' menu in WordPress 30 30 3. Place your widget. Make sure you set a Twitter user name. 31 4. If you get errors on activating/first loading your page, make sure your wp-content/uploads folder is there and writeable. 31 32 32 33 == Frequently Asked Questions == … … 67 68 == Screenshots == 68 69 70 1. The Widget control panel 71 2. Widget in place and unstyled on the 2010 theme, with replies off and "via" links on. 69 72 70 73 == Changelog == 71 74 75 = 0.2 = 76 * Fixed error whereby cache would be emptied and error shown if connection to Twitter lost 77 * Fixed error with dates and times on some versions of PHP 78 72 79 = 0.1 = 73 80 * Plugin released -
reet-pe-tweet/trunk/reet-pe-tweet.php
r384100 r384111 4 4 * Plugin URI: http://www.maltpress.co.uk/services-2/wordpress-plugin-development/reet-pe-tweet/ 5 5 * Description: Displays latest tweets from a particular user. 6 * Version: 0. 16 * Version: 0.2 7 7 * Author: Adam Maltpress 8 8 * Author URI: http://www.maltpress.co.uk … … 148 148 $content = $tweet['text']; 149 149 $timeCreated = strtotime($tweet['created_at'][0]); 150 $timeCreated = mktime($timeCreated); 150 151 $source = $tweet['source']; 151 152 $in_reply = $tweet['in_reply_to_user_id']; … … 285 286 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 286 287 287 $twit_output = curl_exec($ch); 288 // now write the data to the file 289 $filewrite = fopen($cache_final_path, 'w') or die("can't open file"); 290 curl_setopt($ch, CURLOPT_FILE, $filewrite); 291 $data = curl_exec($ch); 292 // close everything 293 curl_close($ch); 294 fclose($filewrite); 288 //check connection to Twitter 289 if(curl_exec($ch) === false) 290 { 291 292 curl_close($ch); 293 $ch = curl_init(); 294 curl_setopt($ch, CURLOPT_URL, $cache_url); 295 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 296 $twit_output = curl_exec($ch); 297 curl_close($ch); 298 } 299 else 300 { 301 $twit_output = curl_exec($ch); 302 // now write the data to the file 303 $filewrite = fopen($cache_final_path, 'w') or die("can't open file"); 304 curl_setopt($ch, CURLOPT_FILE, $filewrite); 305 $data = curl_exec($ch); 306 // close everything 307 curl_close($ch); 308 fclose($filewrite); 309 } 310 295 311 } 296 312 }
Note: See TracChangeset
for help on using the changeset viewer.