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