0x47f8e536

Asaph 1.0

After two Beta versions of Asaph, here is what I call Asaph 1.0. This is the first proper release, even featuring a readme file and licensing information (GPL v3).

If you're new to Asaph, watch the screencast (QuickTime, 5mb) to see what's it all about.

Stickney Theme for AsaphMany issues with the RSS-Feed and bugs when editing posts from the admin menu were fixed in this release. I also included another template theme called Stickney which can be activated in the config file.

Download: Asaph version 1.0 - ZIP ~50kb

If you're updating from a beta version, simply replace all your files (keep the data/ directory!) and edit your settings in lib/asaph_config.class.php. The database layout didn't change, so there's no need to invoke the installer.

Read the Asaph project page to learn more.

Read complete post »

Javascript, PHP, Web Technology, Asaph / 2008.04.06 - 16:59 / Comments (26)
0x47ea9a4e

Asaph Beta 2

Based on the wonderful feedback I got on my last post, I just put together a new beta version of Asaph. It fixes the most common problems people had with the last one. This includes:

  • Usage of cURL or url fopen wrappers, based on what's available
  • magic_quotes are now reverted automatically
  • The RSS Feed should now display images properly
  • Lots of smaller bugfixes

Again, to install just unpack the zip, enter your database settings in lib/asaph_config.class.php, upload it to your webserver and point your browser to admin/install.php.

If you already installed the previous version, just replace all the files and skip the install step, as the database layout didn't change.

Asaph version 1.0 - ZIP ~50kb - Updated: Asaph version 1.0

I have some more plans and ideas for future versions of Asaph. Don't hold your breath though - this will take some time :)

Read complete post »

Javascript, PHP, Web Technology, Asaph / 2008.03.26 - 19:47 / Comments (24)

Asaph Over the past few weeks I developed Asaph - a small blogging system, that allows you to instantly post links and images directly from any page on the web. This makes Asaph the most fun to use application if you want to collect and show all the cool things you found elsewhere. Asaph is not a full blown blog and it does not aim to be one - it just does this one task, but it's pretty good at it.

Watch a screencast to learn what makes Asaph worth using:
About Asaph - Quicktime Movie ~5mb

My own Asaph blog can be found at asaph.phoboslab.org.

Asaph is currently in Beta stage. It needs PHP5 and MySQL4 to run. To install, just unpack the zip, enter your database settings in lib/asaph_config.class.php, upload it to your webserver and point your browser to admin/install.php.

Asaph version 1.0 - ZIP ~50kb - Updated: Asaph version 1.0

Feedback is much appreciated!

Read complete post »

Javascript, PHP, Web Technology, Asaph / 2008.03.21 - 21:40 / Comments (97)
0x4739e38c

Image Clouds

As Tag Clouds become more and more common in blogging systems, one wonders why this intuitive approach hasn't been used for other media types like images or videos (or video previews).

The idea to scale elements in their relevance of importance is not new, however it wasn't possible to do this with images in websites so far. HTML and CSS offer no direct mechanism to position images of different sizes in a pleasing way.

To solve this problem, I developed a simple PHP script that calculates sizes of DIVs based on their importance and arranges them in a fixed-width grid, while closely maintaining their order. The grid is pre-generated by PHP with a width of 768px in order to fit on small screens, but scales with the help of JavaScript to fit in any browser window.

Here's a demo of how this actually looks in action: Grid-Solver Demo

There are also some real-life examples (both NSFW!) of this technique at pr0gramm.com and pornsnotdead.com.

Read complete post »

Javascript, PHP, CSS / 2007.11.13 - 18:49 / Comments (3)

Escaping of SQL parameters in PHP is an needlessly tedious and error-prone process. Calling the right escaping function for every parameter that might be dangerous is a difficult task in a big project. This is just dangerous and calls for SQL-Injection-Attacks.

It's obvious we need a uniform query function that automatically does the escaping for us. Perl-style parameter binding seems to be just the right choice. You can write your query, insert placeholders in the form of :n and pass the parameters to our function. The function automatically detects the datatype of the parameter for us and escapes it if needed.

query( 
    'SELECT posts 
        FROM blog 
        WHERE 
            status = :2
            AND created = :1',
    POST_STATUS_ACTIVE,
    '2007-08-02'
);

Read complete post »

PHP, MySQL, Security / 2007.08.21 - 23:09 / Comments (3)

Ever tried to display syntax highlighted program code with PHP? There are some solutions, which are either totally overblown, produce horrible markup or need an external program.

I obviously didn't like any of these, so I wrote my own syntax highlighting function for PHP. This function works great for a whole number of C-Style languages, but can also be used for SQL and many others. Read on for some examples and the highlighting code itself.

Read complete post »

PHP / 2007.08.02 - 21:42 / Comments (2)