ARTLUNG
this is the website of joe crawford. code. occasional comics. toy robots. san diego.

ArtLung posts tagged with “PHP” ·


  • Updated Open Graph Protocol Tools Plugin
    I updated my Open Graph Protocol Tools plugin, on GitHub and on WordPress.org‘s SVN. It’s been a long time since I updated the plugin, shamefully long time actually. But hopefully I’ve addressed all the existing issues and if any new ones come up I can knock them out quickly.

  • Visualizing and Emerging Blog Content
    As I mentioned, I’ve been doing extensive reclamation of my blog archives in such a way that old headers get displayed. So you can see that in action for the Blog Archives from September 2002. The first row is is a set of buttons: back one year, back one month, archives for the current year,…

  • Random Affirmation
    Small project that, on click, loads new affirmations. A photo from Leah, some jQuery with AJAX, and voila. I like it. If anyone has suggestions for a “random thing of the day” type thing, please let me know. The JavaScript I code to attach the behavior is: $.ajax( {type: "POST" , url: "generate-affirmation.php" , beforeSend:…

  • “Fun” with Gallery 1.5.3, 1.5.10, 2, 3RC1; Leahpeah photos
    I mentioned moving Leah over to WordPress a few days ago, and that went well. I’ve been migrating over her prior content and deleting unused content a bit since then. In rooting through the site, I came across this: … which we put in place when there were folks deeplinking some larger images on her…

  • Blog Migration, Lura.net
    Speaking of blog migrations from Blogger to WordPress, here’s a successful one: Initially Lura was hosted under Windows and IIS. PHP was installed on her former server, but it did not really respond appropriately and the various IIS/WordPress/”mod_rewrite” hacks did not seem to work. So I advised her to move to PHP/Apache. Things went pretty…

  • WordPress Graphical Post Count Visualization
    I’m playing with a new theme for my blog, and wanted a better way to let people quickly scan for how many posts I had. So I used a background image of black, offset with background-position in css to let a graph “show through” to show the count. I’ve also posted the PHP and CSS…
  • Dead PHP3 Code
    People don’t write PHP like this anymore, or, if they do, they get hurt badly. This is old code of mine. Timestamp is January 29, 2002. Yeesh. <? $where_they_are = ‘http://’ . $SERVER_NAME . $REQUEST_URI; if ($HTTP_REFERER!=”) { $recipientlist=’joe@artlung.com’; $emailsubject=”visit to $SERVER_NAME via ” . $HTTP_REFERER; $emailbody=”someone came to $where_they_are via $HTTP_REFERER ip address: $REMOTE_ADDR…
  • Destructured Assignment in Ruby, PHP, and JavaScript
    Stupid code tricks in Ruby, PHP, and JavaScript
  • Turn off Magic Quotes in PHP via .htaccess
    #.htaccess SETTINGS TO TURN OFF # STUPID MAGIC QUOTES IN PHP # I HATE MAGIC QUOTES PROBLEMS php_flag magic_quotes_gpc off UPDATE: See Magic Quotes, and note: This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.
  • Trailing commas in an array OK in PHP
    I was editing some code today and saw what looked like an error to me, but nothing was broken on the code I was looking at it, so I was prompted to look it up. And indeed, in PHP: “Having a trailing comma after the last defined array entry, while unusual, is a valid syntax.”…