Home
Name Modified Size InfoDownloads / Week
README 2016-08-07 7.5 kB
_sss_1.1.0.zip 2016-08-07 31.5 kB
_sss_1.0.0.zip 2016-06-29 27.2 kB
Totals: 3 Items   66.2 kB 0
Project: SliderSupportScripts
Description: Slider Support Scripts.

Author: John Walsh
Maintainer: John Walsh

Copyright (C) 2016, John Walsh, all rights reserved.
Created: Jun 28 2016

https://sourceforge.net/projects/slidersupportscripts/


----------------------------------------------------------------------

Change log:

Version: 1.1.0 - 03/08/16

better generation and usage of data files for albums and playlists

----

Version: 1.0.0 - 28/06/16

first release


----------------------------------------------------------------------

Description:

A set of support scripts for gathering all the data (url's) needed to
create the data structures used within sliders, image galleries,
etc...

The Problem :-

I wanted a nice slider (or several) on my website, with mixed
video and image content, and I could find libraries (js) to provide
that, but where to host all the images and videos - I didn't want to
fill up the space on my small server.

There are plenty of sites where you can host your content, and each
slider library has it's own set of sites that it can serve images
and videos from.

However, I could not seam to find a central/single place that could
host both images and videos, and have them grouped by event in some
form of playlist, and that any single slider library could use.

So that meant that you have to build a data list of all the images
and videos for the slider to use, each with their own URL,
instead of being able to use (point at) a single playlist.

I decided to host my pictures on Google Photos (which can then be
accessed via the picasa website) and videos on youtube.

Hence, the need to be able to get all that data (url's) easilly...


----------------------------------------------------------------------

Prerequisites:

aquire your google API KEY from:

https://console.developers.google.com/

Credentials -> create a browser OR a server key,
they both should work in these scripts.

then enable the 'YouTube Data API'

----

NB. the original script used the youtube API and required googles
API support library, but I found a direct URL only method,
which I prefer, and does not need the googles API support library.

I've included the 'old_' script, just for interest...


SO THE BELOW IS NOT NEEDED :-

Running on Arch Linux, to get the google API support library:

# pacman -S composer

then in my 'client/script' area:

$ composer require google/apiclient:^2.0.0@RC


----------------------------------------------------------------------

Installing:

unzip

edit ./sss_user_ids.php and ./sss_sup.php

see/run the script(s) required

and/or use the '_get_all.bash' script to automate everything


----------------------------------------------------------------------

The Scripts:

get_youtube_playlists.php
get_youtube_videos.php

get_picasa_albums.php [id]
get_picasa_photos.php [id]


Each script will output the raw (PHP) data to the file a.out,
and output to stdout the data in the format choosen in 'sss_sup.php'.


_get_all.bash

edit and use to generate all the data files required


----------------------------------------------------------------------

Howto:

In order to fully script getting all the links from all your picasa
albums and youtube playlists :-

edit: sss_user_ids.php

fill in your:

$GOOGLE_API_KEY
$YOUTUBE_CHANNEL_ID
$PICASA_USER_ID


edit: sss_sup.php

choose the gallery format required
and any other parameters/options


run: _get_all.bash

that will create:
picasa_albumlist_list.php
youtube_playlist_list.php


use them to set the lists/data files you want:

edit: _get_all.bash

picasa_event_1.php, ...
youtube_event_1.php, ...


enable those sections and re-run

that will create all your data files.

Done.

--

Any time you add another album/playlist, picture/video,
just re-run _get_all.bash and/or edit to siut.

--

The data files can be included in your PHP/html web pages...

See the example code/files:

sss_unitegallery_eg.php
sss_ug_defaults.php


----------------------------------------------------------------------

Notes:

I would have considered hosting my images and videos on facebook,
as that would also be a good site to have an 'interest group' for
my activities, and there is a very nice slider for that:

http://themeflection.com/docs/faba/

BUT - facebook does not allow you to include videos in any albums.


Google photos also allows mixed (image and video) content, but
I could not find a slider that can play video from there.


SO :-

I host my videos on youtube.

I host my images on google photos.

But google photos has no API to gain access to it via any scripts.

And I found that even given the URL for an image file in google photos,
it could not always be used as a source by some slider libraries.

Picasa does have a better API for script access, and the image URL's
can be used as a source by the slider libraries.

FYI: the URL for a picasa image includes a 'folder' section that
allows you to request the image at any given size. It is the part:

  /sXXX/

where XXX is the requested side length.


But to get a mixed content slider, you need to create the list
of items as a json data object (rather than pointing at a single
album/playlist), or build the list as html elements.

Hence, the need for these scripts...

But remember, they are just 'support scripts'.

Use them to get the raw data, then edit/build your complete list
as required...


Note. if you want to keep the data in a .js file and then read it
into your web page, you need to top and tail the raw data to turn it
into a js file:

sss_data =
RAW_JSON_DATA
;


Then you can include it from the header of your html page:

<script src="./data_source.js"
  type="text/javascript">
</script>

----------

jQuery

Original 'jQuery Core' archieve:

https://code.jquery.com/jquery/


----------------------------------------------------------------------

Development History:

Version: 1.1.0

added generation of playlist and album data files in '_get_all.bash',
for easier data inclusion and usage in 'sss_sup.php'.

better enumeration when creating data files in '_get_all.bash'.

----

Version: 1.0.0

Can get the following data:

all playlists for a youtube user

all videos in a youtube playlist

all albums for a picasa user

all images in a picasa album

----

Supports output formats for:

* http://nanogallery.brisbois.fr/

https://github.com/Kris-B/nanoGALLERY
http://www.myjqueryplugins.com/jquery-plugin/nanogallery


* http://galleria.io/

https://github.com/aino/galleria/

Note: seams to be un-supported now, but still works well.

The 'pay' theme files can be downloaded from the web, if you
do some good 'file name' searching.


* http://unitegallery.net/

https://github.com/vvvmax/unitegallery/

----

Tried and found to NOT work:

* http://www.pixedelic.com/plugins/camera/

Picasa links work for thumbnails, but not for the main image.

----

Lists of other slider libraries:

* 55 Fresh jQuery Gallery And Image Sliders
February 7, 2016

http://1stwebdesigner.com/jquery-gallery/


* 500+ Best jQuery Image Gallery
June 8, 2016

http://www.jqueryrain.com/example/jquery-gallery/


* 30 Free jQuery Slider Plugins
June 22, 2014

http://webfacescript.com/30-free-jquery-slider-plugins/

----

The other slider I like the look of is WOWSlider, but I haven't got
to try it yet.


----------------------------------------------------------------------

ToDo
----


----------------------------------------------------------------------
Source: README, updated 2016-08-07