Changes between Initial Version and Version 1 of email-photo-to-web-page


Ignore:
Timestamp:
Jan 28, 2013, 7:43:54 PM (7 years ago)
Author:
Stephen Mahood
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • email-photo-to-web-page

    v1 v1  
     1During 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]
     2[[BR]]
     3This 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.
     4
     5There are some dependencies that need to be installed from root on the server
     6
     7{{{
     8apt-get install php5-imagick libjs-jquery-ui libjs-jquery
     9}}}
     10
     11The following information is available in the README files after you "git" them
     12
     13In your home directory on the server enter the following command
     14
     15{{{
     16git clone git://git.mayfirst.org/jamie/get-picture-via-imap.git
     17}}}
     18
     19Afterwards copy the contents of the
     20
     21{{{
     22~/get-picture-via-imap/web
     23}}}
     24
     25to the /web directory on the server
     26
     27{{{
     28$~cp get-picture-via-imap/web/*.* /path/to/web/
     29}}}
     30
     31Once the files and directories are copied then proceed to to the subdirectory for galleria
     32
     33{{{
     34$~/path/to/web/galleria
     35}}}
     36
     37Follow the included README file
     38 Down load galleria: http://galleria.io/ and put it in this directory.
     39Then, create a symlink for galleria.js -> galleria-n.n.n.js replacing
     40n.n.n with the version of galleria that you installed.
     41
     42Do the same from the javascript director
     43
     44{{{
     45$~/path/to/web/js/
     46}}}
     47
     48 Download both jquery (http://jquery.com/) and jquery-ui (http://jqueryui.com/).
     49Add symlinks: jquery.min.js -> jquery-n.n.n.min.js
     50              jquery-ui.min.js -> jquery-ui-n.n.n.min.js
     51Replacing n.n.n with the appropriate version numbers.
     52
     53Symlink can be established with the follwing command
     54
     55{{{
     56$~/path/to/web/galleria/ln -s galleria-n.n.n.js galleria.js
     57}}}
     58
     59same should be done in the js directory for the jquery and jquery-ui
     60
     61after the above symlinks are created please create an images directory on web
     62
     63{{{
     64$~/path/to/web/images/
     65}}}
     66
     67As the script is looking to place the photos in the /images directory
     68
     69The 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
     70
     71{{{
     72username:password@mail.server.org
     73}}}
     74
     75if we are using the mayfirst server than mail.server.org --> mail.mayfirst.org
     76
     77Be 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.
     78
     79Then please visit the site and test if the emails come through by uploading the images
     80
     81
     82----
     83
     84If 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[[BR]]
     85Then copy the contents of the /web directory (excluding the images directory) to the newly created sub directory for the event.
     86
     87Then when people visit <said.site.org/photoevent> it will load the galleria software and script to display the images.
     88