WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: iti on February 22, 2013, 04:29:30 PM

Title: Picasa albums on your site - droplet
Post by: iti on February 22, 2013, 04:29:30 PM
If anyone is interested in embedding picasa albums in WB pages  with a help of a simple droplet let me know. I have it working. look here: http://dagnoy.com/pages/en/our-fish/koi.html (http://dagnoy.com/pages/en/our-fish/koi.html). you can show any number of albums ([[picasaAlbums?albums=album1;album2;album3]]).   jquery.pwi-min.js, jquery.colorbox-min.js and 1.8.2/jquery.min.js are used. slightly modified. jquery.pwi-min.js.
Title: Re: Picasa albums on your site - droplet
Post by: Re-Mi on March 02, 2013, 10:41:08 AM
Hi,

I'm interested in this. could you post the droplet code and how to get it working

Greetz,
Title: Re: Picasa albums on your site - droplet
Post by: bupaje on April 16, 2013, 08:36:47 PM
I'd be interested in seeing this as well.
Title: Re: Picasa albums on your site - droplet
Post by: Re-Mi on April 16, 2013, 10:48:02 PM
Hi it works, i didn't have time to explore it any further, i will post the code i received from the developer all the credits will go to him.

I built a droplet based of PWI (thanks!) with these details:

Quote
Name : picasaAlbums
desc: to integrate Picasa albums in WB

Code: [Select]
$string = $albums;
$string  = str_replace(array(' ',' '),'',$string) ;
$array = explode(';', $string);
 
$newArray = array();
foreach ($array as $value) {

    $value = '"'.$value .'",';
    $newArray[$value] = $value;
   
}

unset($value);
$array = $newArray;

//print_r($array);exit;


$albs= implode($array);
$albs=substr_replace($albs ,"",-1);

return('<script type="text/javascript">
$(document).ready(function() {$("#pic").pwi({username:"* YOUR USER CODE*",albums:['.$albs.']

Quote
you call it on the pages: [[picasaAlbums?albums=album1;album2;album3]]

in your index you need to call:

Code: [Select]
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="/include/jquery/picasa/jquery.colorbox/jquery.colorbox-min.js"></script>
<script src="/include/jquery/picasa/jquery.pwi-min.js" type="text/javascript"></script>

Quote
I did modify a bit  jquery.pwi-min.js. see:
http://dagnoy.com/include/jquery/picasa/jquery.pwi-min.js
color-box code I use:
http://dagnoy.com/include/jquery/picasa/jquery.colorbox/jquery.colorbox-min.js

files avail on:http://code.google.com/p/pwi/

instructions :1. create the album(s) and drag and drop photos from your computer (if you use Chrome or Firefox)
2. album naming: please NO SPACES!!! So for example, you write 'AlbumName' instead of 'Album Name' as picasa album name. A space will be added between any two Capital letters  later by the program. So if you write album name as 'MyAlbum' it will show on websit 'My Album'. So make sure you have Capital letter where you want a space!
3. make the album public. IMPORTANT!!!
4. go to each photo and add caption if needed. you can also add album description.

5.Go to admin yoursite.com/admin and log in.
6. make a new page
7.paste this paragraph in it:   [[picasaAlbums?albums= album1 ; Album2  ]] 
8.Change the album1;Album2 to the EXACT names of the picasa albums (no spaces!!)
9. you can add many albums but you MUST put ; between each and the next, BUT NEVER AFTER THE LAST!.
10. save page and you should see the albums in new page.

Again all credits goes to iti (http://www.WebsiteBaker.org/forum/index.php?action=profile;u=6646)

Kind regards,

Michel
Title: Re: Picasa albums on your site - droplet
Post by: bupaje on April 17, 2013, 02:20:08 AM
Thanks for posting it and tip of the hat to the developer. I will test it this weekend.