Some twitter fixes
-
I have some fixes for the twitter support. 1st change makes it tolerant of entering your twittername with space at the beginning or end:
--- functions.php.orig 2010-06-01 19:08:09.000000000 -0400 +++ functions.php 2010-06-01 19:09:27.000000000 -0400 @@ -207,8 +207,7 @@ } } function generatetwitter($twittername){ - -$username = $twittername; // Your twitter username. +$username = trim($twittername); // Your twitter username. if ($username == ""){ $username = "wordpress"; }
2nd change makes the server automatically create the twitter cache file if it doesn’t exist, and alerts you if the file can’t be written by the server:
@@ -252,7 +251,7 @@ if($mtime== null ||(time()-$mtime)>(9*60)){// 9 minutes or older? $content=@file_get_contents($feed); if(strlen($content)>0){ - $cache_static=@fopen($twitter_cache_file,'wb'); + $cache_static=fopen($twitter_cache_file,'wb'); @fwrite($cache_static,$content); @fclose($cache_static); }
Both of these changes are in functions.php … if you can’t figure out the diff format, just change the line that is marked “-” at the beginning to the version that is marked “+”.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Some twitter fixes’ is closed to new replies.