Google Picasa Webalbum Module

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Google Picasa Webalbum Module

Post by marcus@localhorst » Wed 13. Oct 2010, 17:43

Howdy,
I wrote a module/Contentpart to include Picasa Webalbum into phpwcms as easy & customizable as contentpart images <div> but without uploading the pictures into filecenter.
The reason was that a client contributed/organized his pictures via Picasa and the Webalbum and shared it to me.
I was too lazy to download and upload every single picture and include it into phpwcms, so I wrote this over the last days.
I gave my best, and I hope you'll find it useful.
Report bugs and share your thoughts.
It should be pretty self-explanatory.
You should know where to find Picasa Userid, Albumid and Authkey in an url of a photoalbum ;-)

Install: drop zip content (mod_picasa) into include/inc_module/ folder - thats all! Now you can select it from article contentpart drop down.

Infos and download here

Code: Select all

Features

    * retrieve content from any Picasa Webalbum which is public or shared with an authkey.
    * get caption and description from the webalbum
    * use nearly the same logic like phpwcms internal images < div > contentpart and you can use the same templates so integrate it seamless.
    * adjustable picture size, square cropped images, selection of images from album, custom sort via drag n drop
    * extendable to render nearly every available data from webalbum (exif, location etc)

ToDo

    * Testing, debugging
    * improvements

Changelog

# v 0.4 beta
- fixed a bug in serilization of selected images.
please note, if you update, you have to reselect your images, sorry.
- set standard values if no thumbsize is given in backend

# v 0.3 beta
- sort images via drag'n'drop in backend
- more imageinfos in backend
- english translation file

# v 0.2 beta
init release 
Last edited by marcus@localhorst on Thu 4. Nov 2010, 20:24, edited 3 times in total.

novallis
Posts: 121
Joined: Tue 7. Dec 2004, 11:23
Location: Hassloch, Germany

Re: Google Picasa Webalbum Module

Post by novallis » Thu 14. Oct 2010, 07:30

Hy Marcus,

sounds very interessting.
Professionell designed.
A good chance to building and using galleries from picasa and safe webspace.

Thanks for sharing with us.

Best regards,
- Ralf
(novallis)

User avatar
update
Moderator
Posts: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Google Picasa Webalbum Module

Post by update » Thu 14. Oct 2010, 13:19

Unbelievable :D
It's mostly all about webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Re: Google Picasa Webalbum Module

Post by marcus@localhorst » Thu 14. Oct 2010, 22:09

updated to v0.3 beta
sorting via drag n drop is now possible. some more infos about the pics in backend, english translation file

User avatar
baklavoni
Posts: 170
Joined: Mon 23. Oct 2006, 00:48
Location: Bosnia and Herzegovina

Re: Google Picasa Webalbum Module

Post by baklavoni » Tue 26. Oct 2010, 12:39

Good work!
I've tested it, and it is working like a charm :)
There is no page like home page...

User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Re: Google Picasa Webalbum Module

Post by marcus@localhorst » Thu 4. Nov 2010, 20:28

updated the module because of a strange behaviour.
When dumping my online phpwcms tables and import them locally, the picasa CPs were empty, because of some strange behaviour in unserialize the array.
So I had to rewrite this part.
This means, if you update to the new version 0.4 beta you have to reselect your images, sorry.

User avatar
Jensensen
Posts: 2995
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Google Picasa Webalbum Module

Post by Jensensen » Fri 5. Nov 2010, 22:30

Hi marcus,

yesterday I started working with this very excellent tool. That's the following relates to v0.3 beta.
As you will see, my provider has disabled (php.ini) URL file-access for security reason.

I get errors:


in the BE

Code: Select all

{STATUS_MESSAGE}

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /is/htdocs/something/www/include/inc_module/mod_picasa/inc/picasaAPI.php on line 51

Warning: file_get_contents(http://picasaweb.google.com/data/feed/api/user/another_something/album/Impressionen_01?kind=photo&max-results=1000&start-index=1&thumbsize=110c&prettyprint=true&v=2) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /is/htdocs/something/www/include/inc_module/mod_picasa/inc/picasaAPI.php on line 51

Max. Images:
Fatal error: Cannot use string offset as an array in /is/htdocs/something/www/include/inc_module/mod_picasa/inc/cnt.form.php on line 303
however some files e.g. 40bcbdb67698f0e8c263e9f873e45201 (0 byte) have been created in
/is/htdocs/something/www/content/rss


when I substitute the function
file-get-contents

Code: Select all

/**
 * !!! have a look here !!!!
 * http://de.php.net/manual/de/function.file-get-contents.php
*/
function curl_get_contents ($url) {
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($curl, CURLOPT_URL, $url);
	$html = curl_exec($curl);
	curl_close($curl);
	
	if ($html) return $html;
	else return FALSE;
}
the files that were created in /is/htdocs/something/www/content/rss
have round about 70kbyte



now in the BE only one error message remains next to the input field - Max. Images:

Code: Select all

Fatal error: Cannot use string offset as an array in /is/htdocs/something/www/include/inc_module/mod_picasa/inc/cnt.form.php on line 303

NOW, when I delete the file in /.../rss
I'm able to edit and save the contentpart ONE time. After saving the error occures again.

NOW I delete the file in /.../rss once again BUT then I call the page in the FE
and everything works perfect - once. After a reload, the output of the CP (in FE) gives me the error message:
error parsing feed


I could need some help. Thank you.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.

User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Re: Google Picasa Webalbum Module

Post by marcus@localhorst » Sat 6. Nov 2010, 11:48

please send me the link to the album via pm and the content of your file in /rss ... the xml seems to be invald and not parsable by the picasa API.
I will take a look at it in the next days. cheers m.

User avatar
Jensensen
Posts: 2995
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Google Picasa Webalbum Module

Post by Jensensen » Mon 25. Apr 2011, 04:00

unbelievable great tool - but i still get the same errors. works perfect only for one request.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.

User avatar
Jensensen
Posts: 2995
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Google Picasa Webalbum Module

Post by Jensensen » Tue 7. Jun 2011, 00:30

since some days ago additional settings in the htaccess file are no longer necessary. they have been ignored anyway.
the web hoster by now allows controlling special values for certain php-variables.
since fopen is allowed, the script works perfect, by default.

Gold medal for Marcus!
Many thanks for sharing this tool.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.

phalancs
Posts: 792
Joined: Thu 19. Feb 2004, 05:09
Location: Germany

Re: Google Picasa Webalbum Module

Post by phalancs » Tue 9. Aug 2011, 14:09

Thanx!!! It Rocks!!!
2008

Post Reply