I have updated kpicasa-gallery-php4mod according to kpicasa-gallery 0.1.5 to make it work with my wordpress is 2.6.1.
here is the patch.
diff -Naur kpicasa-gallery-php4mod.0.1.4/kpg.class.php kpicasa-gallery-php4mod.0.1.5/kpg.class.php
--- kpicasa-gallery-php4mod.0.1.4/kpg.class.php 2008-02-26 23:52:28.000000000 +0100
+++ kpicasa-gallery-php4mod.0.1.5/kpg.class.php 2008-10-03 04:20:04.000000000 +0200
@@ -1,6 +1,5 @@
<?php
-
if ( !class_exists('KPicasaGallery') )
{
class KPicasaGallery
@@ -16,7 +15,7 @@
$this->thumbnailSize = get_option( 'kpg_thumbnailSize' );
$this->showOnlyAlbums = is_array( $showOnlyAlbums ) ? $showOnlyAlbums : array();
$this->cacheTimeout = 60 * 60 * 1;
-
+
if ( !strlen( $this->username ) )
{
if ( $this->checkError( new WP_Error('kpicasa_gallery-username-required', "<strong>Error:</strong> you must go to the admin section and set your Picasa Web Album Username in the Options section.") ) )
@@ -117,7 +116,7 @@
$stop = $start + $this->nbAlbumsPerPage - 1;
}
else
- {
+ {
$start = 0;
$stop = count( $xml["ENTRY"] ) - 1;
if ($stop < 0) { $stop = 0; }
diff -Naur kpicasa-gallery-php4mod.0.1.4/kpicasa_gallery.php kpicasa-gallery-php4mod.0.1.5/kpicasa_gallery.php
--- kpicasa-gallery-php4mod.0.1.4/kpicasa_gallery.php 2008-02-26 23:52:28.000000000 +0100
+++ kpicasa-gallery-php4mod.0.1.5/kpicasa_gallery.php 2008-10-03 04:39:38.000000000 +0200
@@ -2,7 +2,7 @@
/*
Plugin Name: kPicasa Gallery PHP4MOD
Description: Display your Picasa Web Galleries in a post or in a page.
-Version: 0.1.4
+Version: 0.1.5
Author: David Trattnig
Author URI: http://www.bitfusion.org/blog
@@ -16,7 +16,7 @@
2008-02-26 0.1.4 Upgrade to kPicasa Gallery 0.1.4
Fixed Image Summary Issue
Fixed Advanced Album Range Feature
-
+2008-10-03 0.1.5 Upgrade to kPicasa Gallery 0.1.5
TODO
---------------------------------------------------------------------------
@@ -160,7 +160,7 @@
{
if ( function_exists('add_options_page') )
{
- add_options_page('kPicasa Gallery Plugin Options', 'kPicasa Gallery', 8, KPICASA_GALLERY_DIR.'/param.php');
+ add_options_page('kPicasa Gallery Plugin Options', 'kPicasa Gallery', 8, dirname(__FILE__).'/param.php');
}
}
diff -Naur kpicasa-gallery-php4mod.0.1.4/param.php kpicasa-gallery-php4mod.0.1.5/param.php
--- kpicasa-gallery-php4mod.0.1.4/param.php 2008-02-26 23:52:28.000000000 +0100
+++ kpicasa-gallery-php4mod.0.1.5/param.php 2008-10-03 04:39:43.000000000 +0200
@@ -37,7 +37,7 @@
update_option( 'kpg_thumbnailSize', $thumbnailSize );
// Put an options updated message on the screen
- print '<div id="message" class="updated fade"><p><strong>Options saved.</strong></p></div>';
+ print '<div id="message" class="updated fade"><p><strong>Settings saved.</strong></p></div>';
}
$albumPerPage = $albumPerPage > 0 ? $albumPerPage : '';
@@ -51,14 +51,9 @@
print '<form name="form1" method="post" action="'.str_replace( '%7E', '~', $_SERVER['REQUEST_URI']).'">';
print '<input type="hidden" name="kpg_save" value="Y">';
-print '<p class="submit">';
-print '<input type="submit" name="Submit" value="Update Options »" />';
-print '</p>';
-
// General settings
-print '<fieldset class="options">';
-print '<legend>General settings</legend>';
-print '<table class="optiontable">';
+print '<h3>General settings</h3>';
+print '<table class="form-table">';
print '<tr valign="top">';
print '<th scope="row">Picasa Web Albums Username:</th>';
@@ -76,12 +71,10 @@
print '</tr>';
print '</table>';
-print '</fieldset>';
// Album List
-print '<fieldset class="options">';
-print '<legend>Album List</legend>';
-print '<table class="optiontable">';
+print '<h3>Album List</h3>';
+print '<table class="form-table">';
print '<tr valign="top">';
print '<th scope="row">Number of albums to show per page:</th>';
@@ -95,12 +88,10 @@
print '</tr>';
print '</table>';
-print '</fieldset>';
// Picture List
-print '<fieldset class="options">';
-print '<legend>Picture List</legend>';
-print '<table class="optiontable">';
+print '<h3>Picture List</h3>';
+print '<table class="form-table">';
print '<tr valign="top">';
print '<th scope="row">Number of pictures to show per page:</th>';
@@ -113,12 +104,10 @@
print '</tr>';
print '</table>';
-print '</fieldset>';
// Thumbnail size
-print '<fieldset class="options">';
-print '<legend>Thumbnail size</legend>';
-print '<table class="optiontable">';
+print '<h3>Thumbnail size</h3>';
+print '<table class="form-table">';
print '<tr valign="top">';
print '<th scope="row">Select the size for photo thumbnails:</th>';
@@ -135,10 +124,8 @@
print '</tr>';
print '</table>';
-print '</fieldset>';
-
print '<p class="submit">';
-print '<input type="submit" name="Submit" value="Update Options »" />';
+print '<input type="submit" name="Submit" value="Save Changes" />';
print '</p>';
print '</form>';
diff -Naur kpicasa-gallery-php4mod.0.1.4/readme.txt kpicasa-gallery-php4mod.0.1.5/readme.txt
--- kpicasa-gallery-php4mod.0.1.4/readme.txt 2008-02-26 23:52:28.000000000 +0100
+++ kpicasa-gallery-php4mod.0.1.5/readme.txt 2008-10-03 04:39:39.000000000 +0200
@@ -1,7 +1,7 @@
=== kPicasa Gallery PHP4MOD ===
Tags: picasa, gallery, photo, image, picture, php4
Requires at least: 2.2
-Tested up to: 2.3.2
+Tested up to: 2.6.0
Stable tag: trunk
Display your Picasa Web Galleries in a post or in a page.
http://wordpress.org/extend/plugins/kpicasa-gallery-php4mod/