Love cards with eCards plugin

It is not the right time of the year, Saint Valentine is far away. But a love message has no time, every day can be the right moment to send a love message.

Using eCards plugin, in this post I show how to setup a very simple page where reader can sends e-cards with love as a theme. Can you do the same? Yes, it’s incredible easy.

(more…)

WordPress and PHP magic quotes: you want to run me crazy!

Not understanding how WordPress manages the magic quotes of PHP (PHP is no more supporting magic quotes gpc from version 6, and when this version will be released we see a lot of sites hacked…) I followed the WordPress startup code.

The code is all in wp-settings.php. These my conclusions:

  • $_REQUEST is redefined as a pure merge of $_GET and $_POST and can have or not magic quotes, to use it you need to check the “magic_quote_gpc()” function
  • $_GET, $_POST, $_COOKIE and $_SERVER arrays are forced with escaped values so to have the real values you need to strip the slashes

(more…)

Tutorial: Write a Sitemap Plugin Day 8

Today I complete two easy tasks:

  • intercept the URL http://www.myblog.com/sitemap.xml to serve the sitemap (it will work only with WordPress on Apache and permalink active)
  • ping Google when something happens in WordPress (eg. a post changed)

The two modifications are very easy. The first is a matter to do a little parsing of request uri:

substr($_SERVER[‘REQUEST_URI’], strlen($_SERVER[‘REQUEST_URI’])-11) == ‘sitemap.xml’

and to add a checkbox in the options panel to enable this feature.

(more…)