Blog Export Feature Suggestion



I have a feature suggestion for the export. I found that I would really love to export the f-spot database to my Wordpress blog. I don't know if there is any desire to do this or not, but there is a potential to expand this greatly to include other blog support.

First, the export feature in f-spot would be very similar to the stand-alone gallery export. However, only the hq, mq, and thumbs folders would be needed. It could also present the user with some options as to customize the interface, but those could all be tackled later. The photos.db would have to be copied elsewhere and have the photos table modified to include the path from the document root (specified in a dialog).

The Wordpress part would need a PHP library to query the database as to make expansion and inclusion easier. I mocked up a sample page that pulled in the Wordpress content and added the photos to display. In this example, it has basic lightbox support if available and tries to follow the layout of the already existing folder export. I didn't have time to have it link the thumbnails but it would be the same as how they are used in the stand-alone version (reference by same name under thumbs/). Clearly this is just an example but it shows how f-spot database access can be added to a blog in the same manner of PennAve. Also, the concept where each folder is a gallery would be more than sufficient for this interface.

Note that this does not technically need to be a full-fledged Wordpress plugin. It could be to manage the available options, such as lightbox support or document root (etc), but in my example, it was just a PHP page under the Wordpress root. This is similar to how the fGallery plugin works (can use mod_rewrite for short URLs).

I do not have the time to do the initial development of this myself (full-time employee + grad student) else I would as I have a strong desire to use f-spot and Wordpress in harmony. There are a ton of features that could be added in the future, such as a widget that acts similar to the Flickr tags. I would possibly be able to submit development ideas/suggestions, patches, and possibly minor features in the future, but I need someone to start the ground work on this for me.

Below is the Wordpress example (http://s1n.dyndns.org/wordpress/wp-content/plugins/f-spot.php):

<?php include("../../wp-blog-header.php "); ?>
<?php get_header(); ?>

<div id="content" class="narrowcolumn">

                <div class="entry">
                        <?php
                           $db = new PDO('sqlite: photos.db');
                           foreach($db->query('SELECT * from photos') as $row) {
                              print "<a href="" href="http://s1n.dyndns.org/wordpress/wp-content/pictures/"> http://s1n.dyndns.org/wordpress/wp-content/pictures/".$row['name']." rel=lightbox style='text-align:center; -moz-border-radius:5px; margin:6px; display:block; border: 1px solid #727272; float:left;'><img src="" . "/wordpress/wp-content/pictures/". $row['name'] . " title='Test Title' style='width:140px; height:140px; padding:4px; border:0px'/></a>";
                           }
                        ?>
                </div>
</div>
<?php get_sidebar(); ?>

<?php get_footer(); ?>


Thanks,

Jason


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]