3 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
4 // +--------------------------------------------------------------------+
5 // | Luca's Website (L'SWS) |
6 // +--------------------------------------------------------------------+
7 // | This file is part of L'SWS. |
9 // | L'SWS is free software; you can redistribute it and/or modify it |
10 // | under the terms of the GNU General Public License as published by |
11 // | the Free Software Foundation; either version 2 of the License, or |
12 // | (at your option) any later version. |
14 // | L'SWS is distributed in the hope that it will be useful, but |
15 // | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 // | General Public License for more details. |
19 // | You should have received a copy of the GNU General Public License |
20 // | along with Hooks; if not, write to the Free Software Foundation, |
21 // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 // +--------------------------------------------------------------------+
23 // | Created: dom feb 2 17:53:45 ART 2003 |
24 // | Authors: Leandro Lucarella <luca@lugmen.org.ar> |
25 // +--------------------------------------------------------------------+
30 // ConfiguraciĆ³n local:
31 putenv('LC_ALL=es_AR');
32 setlocale(LC_ALL, 'es_AR');
37 ini_set('display_errors', true);
38 ini_set('html_errors', false);
39 error_reporting(E_ALL);
41 // Creates album object.
42 require_once 'Hook/Album.php';
43 $album =& new Hook_Album();
46 $in = fopen('php://stdin', 'r');
49 echo 'Enter the album name for the menu: ';
50 $name = chop(fgets($in, 4096));
53 require_once 'Hook/Menu.php';
54 Hook_Menu::setName($name);
56 // Gets the description.
57 echo "Enter the album description ('.' in single line to finish):\n";
59 while (($buff = chop(fgets($in, 4096))) !== '.') {
64 // Writes the description.
65 $album->setDescription($desc);
70 // Creates a symlink to the parent's index.php.
71 symlink('../index.php', 'index.php');
72 symlink('../photo.php', 'photo.php');
74 // Creates the thumbnails.
75 echo "Generating thumbnails, this could take a while, please wait...\n";
76 $album->createThumbs();