Fork me on GitHub

Tuesday, October 9, 2007

Minor bug with 0.703.5

Some people report problems logging in FlatPress; this may happen with 0.703.5 when the FP files have been unpacked right in the webroot / of your server; to fix FP’s bad behavious, open defaults.php and search the line

define('BLOG_ROOT', dirname($_SERVER['PHP_SELF']) . '/');

and change it as follows:

define('BLOG_ROOT', ('/'==($v=dirname($_SERVER['PHP_SELF']))? $v : $v.'/') ); 

save, upload, and you’re done

Themes updated, two small plugins

While on the forum people are releasing some really nice themes, SamyWeb has managed to finish to update all the old ones on FPThemes which has finally moved to a new address (

So if you own one of those themes, update to the newer version (all legacy compatibility will be soon dropped!) :)

Kudos to Samy! w00t!

Also look at the wiki to discover other user submitted themes!

The forum is also an occasion to show to you people how the internals of FP work, maybe with some examples, so I’ve wiki-fied two plugins I’ve posted as examples, but that you could find useful; one is emoticons, a very quick implementation, and another one is favicon.

You can find them here

Sunday, October 7, 2007

News, and WordPress exporter (yes, really)

I know I promised you I would have release sooner some alpha, but I’ve read some nasty things about url hijacking and how this things can be down with ease just with a little bit of JavaScript.

If you do how to do it, people can really POST things to your blog, just by making you click a bad URL!

And that’s bad considering that you can write some PHP in FP (the widget and the plugin panels)!

So I’ve been working on improving the security of FlatPress, implementing, (or I should rather say merely importing :P), some functions seen already in WordPress.

As you may or may not know, the name of FlatPress it’s not only a marketing operation (even though it sounds like it is), but it was meant as an homage to a well known good platform from which

1) we took inspiration
2) we took code!

And so, as the license allow us to do it, I’ve took something more than the autop() functions, the formatting functions in general, the whole plugin system :) I’ve took the nonce security measure.

To know what nonces are, read this post. The implementation is almost the same; there are just a few small changes to reflect how FP handles some things.

WordPress exporter

By the way, you read there’s a WordPress exporter, and you read well.




No, I didn’t just change theme! :)

I don’t think FP must be just a “passage” in your blogger life, you might go on living well with FlatPress if you like it; however I don’t want you people to be forced to stay with something that one day or another you might not like anymore, or that - who knows? - or that I myself might not have time or will to take further.

Sure FlatPress is open source, so, that day you could decide to fork it, and develop your own something press; but you might not be a coder, and you might not want to become one.

So, here’s the whole point of this: it’s a matter about choice, and you’re the one to choose, and as you are the one to choose, I shouldn’t choose for you; so, you can export to WordPress, open phpMyAdmin and import the sql dump.

That should do.

Remember this is just a quick solution, too, I didn’t take deep tests, but it should work

Get the script.

Oh, just a further notice, this script should work for SimplePHPBlog, too. You’ll have of course to pass through FlatPress, because FP core libraries :D

By the way, if you’re using SPB and wanted to change, you can now choose between FlatPress (almost no efforts) and WordPress :)

Have fun!