Uploading albums direction from google picasa
Uploading albums direction from google picasa
In continuation of the thread at http://board.s9y.org/viewtopic.php?f=2&t=15835, which I am moving to the plugins section since it is now mainly about plugin development.
I now have the php code working so that I can upload the image files and generate an xml file that matches the format used by picasa. What is the next step?
There are a couple specific things I am missing that s9y should be able to provide easily:
1) I need authentication. I would like to only allow s9y users to upload anything.
2) I want to be able to set the size that images are uploaded from the plugin configuration page and use that setting in the upload.
3) I need a way to get the size in pixels of the images that are uploaded. In Picasa, for a rectangular image, you specify the larger of the two dimensions and the photo is scaled down to that size. But I need a way to read the jpg and get the width and height.
4) Bonus request: when I upload an album, I'd like it if I could automatically create a draft post with the correct markup to put the new picasa album in it.
Any advice or guidance on these questions?
Thanks!
I now have the php code working so that I can upload the image files and generate an xml file that matches the format used by picasa. What is the next step?
There are a couple specific things I am missing that s9y should be able to provide easily:
1) I need authentication. I would like to only allow s9y users to upload anything.
2) I want to be able to set the size that images are uploaded from the plugin configuration page and use that setting in the upload.
3) I need a way to get the size in pixels of the images that are uploaded. In Picasa, for a rectangular image, you specify the larger of the two dimensions and the photo is scaled down to that size. But I need a way to read the jpg and get the width and height.
4) Bonus request: when I upload an album, I'd like it if I could automatically create a draft post with the correct markup to put the new picasa album in it.
Any advice or guidance on these questions?
Thanks!
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
I'm a bit short on time. More on this the next wekk, then I can have a look into code.
HTH,
Garvin
I'm a bit short on time. More on this the next wekk, then I can have a look into code.
serendipity_authenticate_author() can be used to authenticate a user if you have a password and username. If your plugin just acts from the backend, simply check:1) I need authentication. I would like to only allow s9y users to upload anything.
Code: Select all
if ($_SESSION['serendipityAuthedUser']) { ... }
Check the serendipity_event_imageselectorplus.php plugin. This one allows you to set extra thumbnail sizes, and hooks into the thumbnail creation. Your plugin could do something like that as well.2) I want to be able to set the size that images are uploaded from the plugin configuration page and use that setting in the upload.
serendipity_getImagesize() in include/functions_images.inc.php3) I need a way to get the size in pixels of the images that are uploaded. In Picasa, for a rectangular image, you specify the larger of the two dimensions and the photo is scaled down to that size. But I need a way to read the jpg and get the width and height.
You can use serendipity_updertEntry() to create a new entry. Have a look at also the imageselectorplus plugin, the "quickblog" feature. It allows one to post something like what you want.4) Bonus request: when I upload an album, I'd like it if I could automatically create a draft post with the correct markup to put the new picasa album in it.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Uploading albums direction from google picasa
Ok, I realized I have a more basic question before I can deal with the issues I asked about above.
In Picasa, when you register a custom button (which is what I am doing), you tell it a full URL to go to. When you click the button, picasa POSTs some data to the specified URL. The page that the server sends back can have fields for things like the name to give the album, must have a form with submit button, and must have some fields in the html of the form "<input type="hidden" name="<some munged text from the original POST data>">. When you click the submit button (this is all in a funny mini-browser within picasa), it converts the hidden input items with the specially formed text into files that get POST'd along with any other form data (like the album name).
So my most basic question is whether I should be writing "top-level" php files that I point picasa at (and that the "submit" points at) or whether I should have it go through something like serendipity_admin.php with some parameters that tell it to somehow call my new plugin.
If it is the former, how do I go about including some of the s9y php files so I can use some of the helper functions (image related and authentication related). If it is the latter, how do I register everything so I get called eventually?
thanks,
greg
In Picasa, when you register a custom button (which is what I am doing), you tell it a full URL to go to. When you click the button, picasa POSTs some data to the specified URL. The page that the server sends back can have fields for things like the name to give the album, must have a form with submit button, and must have some fields in the html of the form "<input type="hidden" name="<some munged text from the original POST data>">. When you click the submit button (this is all in a funny mini-browser within picasa), it converts the hidden input items with the specially formed text into files that get POST'd along with any other form data (like the album name).
So my most basic question is whether I should be writing "top-level" php files that I point picasa at (and that the "submit" points at) or whether I should have it go through something like serendipity_admin.php with some parameters that tell it to somehow call my new plugin.
If it is the former, how do I go about including some of the s9y php files so I can use some of the helper functions (image related and authentication related). If it is the latter, how do I register everything so I get called eventually?
thanks,
greg
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
There are three routes to go with.
The first is providing raw PHP files; that's okay, and if you feel comfortable with that one, there's nothing really that speaks against it. Also from within an external PHP file you can inlude the s9y framework to utilize all its functions. Simply include the core serendipity_config.inc.php file (probably do a chdir() to the core directory level first).
Second route is to do what you suggested, by directing the POST to the actual s9y framework. This is done to index.php?/plugin/XXX where XXX ist a custom name that a plugin can register through the "external_plugin" hook. Have a look at the serendipity_event_freetag plugin for example, it does that to listen on index.php/plugin/tag/bla. This way is a bit more complicated, and requires a complete serendipity event plugin to administrate the code; the upside is, that there's already a picasa event plugin so it would be expanded, without relying on an external file.
Third route is to actually use a s9y stub that was created for XML-RPC requests. The serendipity_xmlrpc.php file. This one includes the s9y framework and then redirects to a xmlrpc hook. The serendipity_event_xmlrpc plugin is currently the only plugin that listens on this hook, so you could have a look on how that exposes API hooks, and do it similar on your plugin.
For starters, I'd suggest you to go with route #1. If that works out well, I can give you help to rewrite that code to listen on a s9y event hook, and you don't need to mange with that right now.
HTH,
Garvin
There are three routes to go with.
The first is providing raw PHP files; that's okay, and if you feel comfortable with that one, there's nothing really that speaks against it. Also from within an external PHP file you can inlude the s9y framework to utilize all its functions. Simply include the core serendipity_config.inc.php file (probably do a chdir() to the core directory level first).
Second route is to do what you suggested, by directing the POST to the actual s9y framework. This is done to index.php?/plugin/XXX where XXX ist a custom name that a plugin can register through the "external_plugin" hook. Have a look at the serendipity_event_freetag plugin for example, it does that to listen on index.php/plugin/tag/bla. This way is a bit more complicated, and requires a complete serendipity event plugin to administrate the code; the upside is, that there's already a picasa event plugin so it would be expanded, without relying on an external file.
Third route is to actually use a s9y stub that was created for XML-RPC requests. The serendipity_xmlrpc.php file. This one includes the s9y framework and then redirects to a xmlrpc hook. The serendipity_event_xmlrpc plugin is currently the only plugin that listens on this hook, so you could have a look on how that exposes API hooks, and do it similar on your plugin.
For starters, I'd suggest you to go with route #1. If that works out well, I can give you help to rewrite that code to listen on a s9y event hook, and you don't need to mange with that right now.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Uploading albums direction from google picasa
Hi,
I accomplished the "index.php?/plugin/XXX" method you mentioned above. My next issue is exactly how to deal with authentication. Assuming there is no user currently logged in, should I just add two form fields for username/password on the page that is sent? The page is a form, where the user fills in things like album name, directory it will be uploaded to, etc. The upload directory will look similar to the directory specified in the "Add Media" section of s9y. Is it ok to populate a ring with available directories before the user is logged in? In other words, can I put the login fields on the same form as the other data, or put the login fields on a different page, and not send the album form until the user is authenticated? If the login fields should be on a separate page, is there a way to display the standard s9y login page, or should I just write my own? If I write my own, it needs to include the "remember me?" checkbox, so I need to know how to set the correct cookie(s) so that it is persisted.
How do I save data in the session? Do I use the standard PHP functions for writing session data, or is there a s9y specific function I can call to do that?
thanks,
greg
I accomplished the "index.php?/plugin/XXX" method you mentioned above. My next issue is exactly how to deal with authentication. Assuming there is no user currently logged in, should I just add two form fields for username/password on the page that is sent? The page is a form, where the user fills in things like album name, directory it will be uploaded to, etc. The upload directory will look similar to the directory specified in the "Add Media" section of s9y. Is it ok to populate a ring with available directories before the user is logged in? In other words, can I put the login fields on the same form as the other data, or put the login fields on a different page, and not send the album form until the user is authenticated? If the login fields should be on a separate page, is there a way to display the standard s9y login page, or should I just write my own? If I write my own, it needs to include the "remember me?" checkbox, so I need to know how to set the correct cookie(s) so that it is persisted.
How do I save data in the session? Do I use the standard PHP functions for writing session data, or is there a s9y specific function I can call to do that?
thanks,
greg
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
Actually, showing the media database structure is something that to me should not be available before a user has authenticated; it might have directory names that should be hidden to the public, so I'd enter a authentication form (serendipity[user] and serendipity[pass]) that you can later check with serendipity_authenticate_author().
There are plugins that offer authentication forms, but if your plugin should be as self-contained as possible, I'd suggest to emit your own simple <form>, yes. serendipity_authenticate_author() actually does this cookie job for you, if the form element serendipity[auto] is set.
As for sessions, you can simply write to $_SESSION[].
Regards,
Garvin
Actually, showing the media database structure is something that to me should not be available before a user has authenticated; it might have directory names that should be hidden to the public, so I'd enter a authentication form (serendipity[user] and serendipity[pass]) that you can later check with serendipity_authenticate_author().
There are plugins that offer authentication forms, but if your plugin should be as self-contained as possible, I'd suggest to emit your own simple <form>, yes. serendipity_authenticate_author() actually does this cookie job for you, if the form element serendipity[auto] is set.
As for sessions, you can simply write to $_SESSION[].
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Uploading albums direction from google picasa
I'm making good progress now. I have my plugin fully functional (at least for my own personal use). To make it more useful for general audiences, I need to do something a bit odd:
I need to provide a download link that puts a custom file in the user's picasa directory. This is what makes the button show up in picasa. I will need to custom generate the file, because it has a hard-coded URL to send the request to. The file is a zip file, containing one xml file and one image file (how the button is displayed in picasa). I was planning to always use the same image. So I need to be able to generate some xml, and then put it and another file in a zip file, and then let the user download that.
The first problem is where do I put the download link? On the plugin configuration page? Any better place?
The second problem is how do I create a zip file from within s9y (or php in general)?
Alternately, I could just provide written documentation on how to create the file, with a template that is mostly-done.
Thoughts?
What's the process for submitting the code I have? I'd like to have someone who knows php review it. I know I haven't handled the localization, and I'm guessing I have messed up stripslashes, html_entities, etc in some places.
thanks,
greg
I need to provide a download link that puts a custom file in the user's picasa directory. This is what makes the button show up in picasa. I will need to custom generate the file, because it has a hard-coded URL to send the request to. The file is a zip file, containing one xml file and one image file (how the button is displayed in picasa). I was planning to always use the same image. So I need to be able to generate some xml, and then put it and another file in a zip file, and then let the user download that.
The first problem is where do I put the download link? On the plugin configuration page? Any better place?
The second problem is how do I create a zip file from within s9y (or php in general)?
Alternately, I could just provide written documentation on how to create the file, with a template that is mostly-done.
Thoughts?
What's the process for submitting the code I have? I'd like to have someone who knows php review it. I know I haven't handled the localization, and I'm guessing I have messed up stripslashes, html_entities, etc in some places.
thanks,
greg
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
I'm not sure I understand...the plugin could take care of creating that file, couldn't it? Then a user wouldn't need to download and upload anything? Or where does the mail need to be put?
Then you could create a method "example" inside the plugin to create that file upon configuration:
Creating a ZIP file is more troublesome, you either need the PHP "zip" extension, or a ZIP class, like from PEAR.

Regards,
Garvin
I'm not sure I understand...the plugin could take care of creating that file, couldn't it? Then a user wouldn't need to download and upload anything? Or where does the mail need to be put?
Then you could create a method "example" inside the plugin to create that file upon configuration:
Code: Select all
function example() {
global $serendipity;
$file = $serendipity['serendipityPath'] . '/uploads/picasa.xml';
if (!file_exists($file)) {
$fp = fopen(, 'w');
fwrite($fp, 'stuff');
fclose($fp);
}
}
That would be me, if you can put up a link here to download the plugin I could review and hopefully commit itWhat's the process for submitting the code I have? I'd like to have someone who knows php review it. I know I haven't handled the localization, and I'm guessing I have messed up stripslashes, html_entities, etc in some places.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Uploading albums direction from google picasa
Sorry, I wasn't clear in my previous post. The file needs to be put on the user's desktop PC, in a directory in their picasa installation (usually C:\Program Files\Google\Picasa\buttons\something.pbz). This is what picasa uses to add a button within the UI, and clicking the button is what does the upload using this new code to s9y.
You can get my version of the plugin from http://www.wreck.org/~greg/serendipity_ ... sa.php.txt. You should be able to diff that against the latest checked in version. It is mostly new code; I didn't have to touch much of the existing code at all. Let me know what you think. And remember, this is my first time writing php, so if you see something and think "why in the hell did he do that?", it is probably because I didn't know any better
You can get my version of the plugin from http://www.wreck.org/~greg/serendipity_ ... sa.php.txt. You should be able to diff that against the latest checked in version. It is mostly new code; I didn't have to touch much of the existing code at all. Let me know what you think. And remember, this is my first time writing php, so if you see something and think "why in the hell did he do that?", it is probably because I didn't know any better
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
Great! Your code doesn't look bad at all, good work.
There are some minor suggestions though:
- Serendipity uses language constants for easy translation. Currently you hardcoded your strings (i.e. for the configuration items) directly inside the plugin. It would be great if you can outsource those strings as constants in the lang_en.inc.php file, like the plugin does as well.
- You use a custom stripslashesIfNeeded() function. Actually, serendipity itself does the stripslashing already inside the include/compat.inc.php file, so you wouldn't need that. Actually, your code currently would strip the slashes a second time, which might even create problems with really wanted escape strings?
- You use HTML output inside the plugin. That's not too bad, as it's easy to implement right now. The perfect route to go would be to create a small smarty .tpl file itself that would be rendered. This would allow users to easily change that form to look like their liking, without needing to change the PHP code. To replace your HTML, you would actually simply put it into a smarty template (raw HTML), save it as "picasa_plugin.tpl" for example, and then use this PHP code to display the template:
This code creates the smarty framework, gets the path to the template file (if a user has put such a file into his own template directory, that template would be used), change the inclusion settings to allow for files outside the main s9y template directory, and then render the template inside the $content variable that you can echo.
On later instances where you use PHP code, I'd assign the values that you need into a larger PHP array, and iterate that inside the .tpl file with {foreach from=$php item="smartyitem"} or something like that.
But remember; this is just a final touchup that would be nice. If you're not much into this, we could use your code first and finetune this in a second step, maybe I could even put some time into it.
Very well done! Did you have some fun doing this, or was it evil chores?
Regards,
Garvin
Great! Your code doesn't look bad at all, good work.
There are some minor suggestions though:
- Serendipity uses language constants for easy translation. Currently you hardcoded your strings (i.e. for the configuration items) directly inside the plugin. It would be great if you can outsource those strings as constants in the lang_en.inc.php file, like the plugin does as well.
- You use a custom stripslashesIfNeeded() function. Actually, serendipity itself does the stripslashing already inside the include/compat.inc.php file, so you wouldn't need that. Actually, your code currently would strip the slashes a second time, which might even create problems with really wanted escape strings?
- You use HTML output inside the plugin. That's not too bad, as it's easy to implement right now. The perfect route to go would be to create a small smarty .tpl file itself that would be rendered. This would allow users to easily change that form to look like their liking, without needing to change the PHP code. To replace your HTML, you would actually simply put it into a smarty template (raw HTML), save it as "picasa_plugin.tpl" for example, and then use this PHP code to display the template:
Code: Select all
serendipity_smarty_init();
$filename = 'picasa_plugin.tpl';
$tfile = serendipity_getTemplateFile($filename, 'serendipityPath');
if (!$tfile || $tfile == $filename) {
$tfile = dirname(__FILE__) . '/' . $filename;
}
$inclusion = $serendipity['smarty']->security_settings[INCLUDE_ANY];
$serendipity['smarty']->security_settings[INCLUDE_ANY] = true;
$content = $serendipity['smarty']->fetch('file:'. $tfile, null, null, false);
$serendipity['smarty']->security_settings[INCLUDE_ANY] = $inclusion;
On later instances where you use PHP code, I'd assign the values that you need into a larger PHP array, and iterate that inside the .tpl file with {foreach from=$php item="smartyitem"} or something like that.
But remember; this is just a final touchup that would be nice. If you're not much into this, we could use your code first and finetune this in a second step, maybe I could even put some time into it.
Very well done! Did you have some fun doing this, or was it evil chores?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Uploading albums direction from google picasa
Fixed.garvinhicking wrote:- Serendipity uses language constants for easy translation. Currently you hardcoded your strings (i.e. for the configuration items) directly inside the plugin. It would be great if you can outsource those strings as constants in the lang_en.inc.php file, like the plugin does as well.
Fixed.garvinhicking wrote:- You use a custom stripslashesIfNeeded() function. Actually, serendipity itself does the stripslashing already inside the include/compat.inc.php file, so you wouldn't need that. Actually, your code currently would strip the slashes a second time, which might even create problems with really wanted escape strings?
I'm not feeling motivated enough to figure out how to write the smarty template to do this, so I'll leave that task to somebody else, if they want to tackle it. I'm just not too concerned with the look of a "utility" page, one that viewers of the blog never see. But that's just me. Everyone has their own itch to scratch. I've scratched minegarvinhicking wrote:- You use HTML output inside the plugin. That's not too bad, as it's easy to implement right now. The perfect route to go would be to create a small smarty .tpl file itself that would be rendered. This would allow users to easily change that form to look like their liking, without needing to change the PHP code. To replace your HTML, you would actually simply put it into a smarty template (raw HTML), save it as "picasa_plugin.tpl" for example, and then use this PHP code to display the template:
This code creates the smarty framework, gets the path to the template file (if a user has put such a file into his own template directory, that template would be used), change the inclusion settings to allow for files outside the main s9y template directory, and then render the template inside the $content variable that you can echo.Code: Select all
serendipity_smarty_init(); $filename = 'picasa_plugin.tpl'; $tfile = serendipity_getTemplateFile($filename, 'serendipityPath'); if (!$tfile || $tfile == $filename) { $tfile = dirname(__FILE__) . '/' . $filename; } $inclusion = $serendipity['smarty']->security_settings[INCLUDE_ANY]; $serendipity['smarty']->security_settings[INCLUDE_ANY] = true; $content = $serendipity['smarty']->fetch('file:'. $tfile, null, null, false); $serendipity['smarty']->security_settings[INCLUDE_ANY] = $inclusion;
On later instances where you use PHP code, I'd assign the values that you need into a larger PHP array, and iterate that inside the .tpl file with {foreach from=$php item="smartyitem"} or something like that.
But remember; this is just a final touchup that would be nice. If you're not much into this, we could use your code first and finetune this in a second step, maybe I could even put some time into it.
I enjoyed it. I'm happy that uploading my photos is now a one-step process instead of many steps. And learning php wasn't so bad. The syntax is so similar to C that it was easy.garvinhicking wrote:Very well done! Did you have some fun doing this, or was it evil chores?
All my latest revisions are in the same place (http://wreck.org/~greg). Feel free to take another look, and if they look good, submit them.
thanks,
greg
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
Great stuff. Much appreciated!
I'll see whether I can come up with a smarty template in the future, but if it works out well for you currently, the main itch is scratched.
I've just committed your plugin so I hope we'll get some other people's feedback soon
Regards,
Garvin
Great stuff. Much appreciated!
I've just committed your plugin so I hope we'll get some other people's feedback soon
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Uploading albums direction from google picasa
There's one other thing that I would like included with the plugin, which is instructions on how to make picasa work with someone's s9y blog. I'm not sure what the best way to present this information to the user of the plugin is though.
1) Download the file http://www.wreck.org/~greg/mysite.com.pbz. Perhaps this should be included in s9y/plugins/serendipity_event_picasa, so the user always has access, since it won't be on my site forever.
2) Rename the file to have a .zip extension.
3) Extract the .pbf file from the zip file.
4) Open it in a text editor. It is an xml file. Replace every instance of "mysite.com" with the name of the site that hosts your blog. Replace "mysite.com/serendipity/index.php" with the actual path to your index.php in your s9y blog.
5) Put the pbf file back into the .zip.
6) Rename the .zip file back to .pbz.
7) Put the .pbz file in the buttons directory of your picasa installation, which is typically "C:\Program Files\Google\Picasa\buttons".
Launch picasa, and the button should be present. If it is not, you should be able to find it in Tools >> Configure Buttons...
If you put that somewhere that plugin users can read it, someone other than me will be able to actually figure out how to use the new functionality. Let me know if you need any clarification on any of that.
thanks,
greg
1) Download the file http://www.wreck.org/~greg/mysite.com.pbz. Perhaps this should be included in s9y/plugins/serendipity_event_picasa, so the user always has access, since it won't be on my site forever.
2) Rename the file to have a .zip extension.
3) Extract the .pbf file from the zip file.
4) Open it in a text editor. It is an xml file. Replace every instance of "mysite.com" with the name of the site that hosts your blog. Replace "mysite.com/serendipity/index.php" with the actual path to your index.php in your s9y blog.
5) Put the pbf file back into the .zip.
6) Rename the .zip file back to .pbz.
7) Put the .pbz file in the buttons directory of your picasa installation, which is typically "C:\Program Files\Google\Picasa\buttons".
If you put that somewhere that plugin users can read it, someone other than me will be able to actually figure out how to use the new functionality. Let me know if you need any clarification on any of that.
thanks,
greg
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
You could use the serendipity "example()" method inside a plugin. That is called inside the configuration panel, and there you could also simply "echo" what you need to show the user on screen?
Can't the file directly be named ".zip"?
Is Picasa requiring that file to be a ZIP and saved as ".pbz"? It would be great if you could directly upload the XML file, because then s9y could dynamically create that file and offer it for download to the user. Creating a ZIP is a bit harder, because it relies on either PHP extensions or additional PHP code classes for zipping...
Regards,
Garvin
You could use the serendipity "example()" method inside a plugin. That is called inside the configuration panel, and there you could also simply "echo" what you need to show the user on screen?
Definitely, the example file should be added to the plugin and refered to like /plugins/serendipity_event_picasa/...1) Download the file http://www.wreck.org/~greg/mysite.com.pbz. Perhaps this should be included in s9y/plugins/serendipity_event_picasa, so the user always has access, since it won't be on my site forever.
Can't the file directly be named ".zip"?
Is Picasa requiring that file to be a ZIP and saved as ".pbz"? It would be great if you could directly upload the XML file, because then s9y could dynamically create that file and offer it for download to the user. Creating a ZIP is a bit harder, because it relies on either PHP extensions or additional PHP code classes for zipping...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Uploading albums direction from google picasa
Hi!
You could use the serendipity "example()" method inside a plugin. That is called inside the configuration panel, and there you could also simply "echo" what you need to show the user on screen?
Can't the file directly be named ".zip"?
Is Picasa requiring that file to be a ZIP and saved as ".pbz"? It would be great if you could directly upload the XML file, because then s9y could dynamically create that file and offer it for download to the user. Creating a ZIP is a bit harder, because it relies on either PHP extensions or additional PHP code classes for zipping...
Regards,
Garvin
You could use the serendipity "example()" method inside a plugin. That is called inside the configuration panel, and there you could also simply "echo" what you need to show the user on screen?
Definitely, the example file should be added to the plugin and refered to like /plugins/serendipity_event_picasa/...1) Download the file http://www.wreck.org/~greg/mysite.com.pbz. Perhaps this should be included in s9y/plugins/serendipity_event_picasa, so the user always has access, since it won't be on my site forever.
Can't the file directly be named ".zip"?
Is Picasa requiring that file to be a ZIP and saved as ".pbz"? It would be great if you could directly upload the XML file, because then s9y could dynamically create that file and offer it for download to the user. Creating a ZIP is a bit harder, because it relies on either PHP extensions or additional PHP code classes for zipping...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/