How to Create a Photo Streaming webpage for live events
During the Membership meeting in October 2012 to connect the meetings in New York City and Mexico City and member around the world a photo stream was created on http://i.mayfirst.org
This was achieved with javascript and a email checking script. So that when an email is sent with a photo to a specified address the script pulls the image and uploads it to designated site.
There are some dependencies that need to be installed from root on the server
apt-get install php5-imagick libjs-jquery-ui libjs-jquery
The following information is available in the README files after you "git" them
In your home directory on the server enter the following command
git clone git://git.mayfirst.org/jamie/get-picture-via-imap.git
Afterwards copy the contents of the
~/get-picture-via-imap/web
to the /web directory on the server
$~cp get-picture-via-imap/web/*.* /path/to/web/
Once the files and directories are copied then proceed to to the subdirectory for galleria
$~/path/to/web/galleria
Follow the included README file
Down load galleria: http://galleria.io/ and put it in this directory.
Then, create a symlink for galleria.js -> galleria-n.n.n.js replacing n.n.n with the version of galleria that you installed.
Do the same from the javascript director
$~/path/to/web/js/
Download both jquery (http://jquery.com/) and jquery-ui (http://jqueryui.com/).
Add symlinks: jquery.min.js -> jquery-n.n.n.min.js
jquery-ui.min.js -> jquery-ui-n.n.n.min.js
Replacing n.n.n with the appropriate version numbers.
Symlink can be established with the follwing command
$~/path/to/web/galleria/ln -s galleria-n.n.n.js galleria.js
same should be done in the js directory for the jquery and jquery-ui
after the above symlinks are created please create an images directory on web
$~/path/to/web/images/
As the script is looking to place the photos in the /images directory
The final configuration is the imap.cnf file. This file needs to be in the home directory as that is where the cron job will be looking for the configuration
username:password@mail.server.org
if we are using the mayfirst server than mail.server.org --> mail.mayfirst.org
Be sure to type the username and password with the : in between as the script requires it to check the emails and then process the images.
Then please visit the site and test if the emails come through by uploading the images
If you want to use the same site again for a future event please copy the contents of the /images directory and create a new folder under /web with a name for the event
Then copy the contents of the /web directory (excluding the images directory) to the newly created sub directory for the event.
Then when people visit <said.site.org/photoevent> it will load the galleria software and script to display the images.