Changeset 27

Show
Ignore:
Timestamp:
08/19/05 16:04:06 (6 years ago)
Author:
alexx
Message:
  • Add support for .node album in Meta album (not usefull for dotnode.com user, but good for other "Open .node" installation that want to import dotnode.com album)
  • Add REST api to access .node Album (must be extented later with other module of .node)
  • Add forgotten icons for meta album
  • Add dPics scripts to automagicaly resize requested image with size put in his url (<dpics script>/500x400/<file_path>.jpg => give you <file_path>.jpg in 500x400)
Location:
trunk
Files:
19 added
15 modified

Legend:

Unmodified
Added
Removed
  • trunk/actions/metalbum/add.action.php

    r24 r27  
    1 <? 
     1<?php 
     2/****************************************************** Open .node *** 
     3 * Description:    
     4 * Status:        Stable. 
     5 * Author:        Alexandre Dath <alexandre@dotnode.com> 
     6 * $Id$ 
     7 * 
     8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> 
     9 * 
     10 * This program is free software; you can redistribute it and/or modify 
     11 * it under the terms of the GNU General Public License as published by 
     12 * the Free Software Foundation; either version 2 of the License, or 
     13 * (at your option) any later version. 
     14 *  
     15 * This program is distributed in the hope that it will be useful, 
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18 * GNU General Public License for more details. 
     19 *  
     20 * You should have received a copy of the GNU General Public License 
     21 * along with this program; if not, write to the Free Software Foundation, 
     22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
     23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
     24 
    225$login = $_POST['login']; 
    326$type = $_POST['type']; 
  • trunk/actions/metalbum/delete.action.php

    r24 r27  
    1 <? 
     1<?php 
     2/****************************************************** Open .node *** 
     3 * Description:    
     4 * Status:        Stable. 
     5 * Author:        Alexandre Dath <alexandre@dotnode.com> 
     6 * $Id$ 
     7 * 
     8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> 
     9 * 
     10 * This program is free software; you can redistribute it and/or modify 
     11 * it under the terms of the GNU General Public License as published by 
     12 * the Free Software Foundation; either version 2 of the License, or 
     13 * (at your option) any later version. 
     14 *  
     15 * This program is distributed in the hope that it will be useful, 
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18 * GNU General Public License for more details. 
     19 *  
     20 * You should have received a copy of the GNU General Public License 
     21 * along with this program; if not, write to the Free Software Foundation, 
     22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
     23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
     24 
    225if(is_valid('metalbum_name', $token[3])) { 
    326        list($login, $type) = split('@', $token[3]); 
  • trunk/dotnode-data.sql

    r24 r27  
    302302INSERT INTO `metalbum` VALUES ('354a778bacabffaff3d3fd74f93ac278','flickr','alex-ikse',NULL); 
    303303INSERT INTO `metalbum` VALUES ('354a778bacabffaff3d3fd74f93ac278','interalbum','alexx',NULL); 
     304INSERT INTO `metalbum` VALUES ('354a778bacabffaff3d3fd74f93ac278','dotnode','alexx',NULL); 
    304305 
    305306-- 
  • trunk/inc/metalbum/album.inc.php

    r24 r27  
    1 <? 
     1<?php 
     2/****************************************************** Open .node *** 
     3 * Description:    
     4 * Status:        Stable. 
     5 * Author:        Alexandre Dath <alexandre@dotnode.com> 
     6 * $Id$ 
     7 * 
     8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> 
     9 * 
     10 * This program is free software; you can redistribute it and/or modify 
     11 * it under the terms of the GNU General Public License as published by 
     12 * the Free Software Foundation; either version 2 of the License, or 
     13 * (at your option) any later version. 
     14 *  
     15 * This program is distributed in the hope that it will be useful, 
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18 * GNU General Public License for more details. 
     19 *  
     20 * You should have received a copy of the GNU General Public License 
     21 * along with this program; if not, write to the Free Software Foundation, 
     22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
     23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
     24 
    225include(INCLUDESPATH.'/metalbum.class.php'); 
    326include(INCLUDESPATH.'/pager.inc.php'); 
  • trunk/inc/metalbum/view.inc.php

    r24 r27  
    1 <? 
     1<?php 
     2/****************************************************** Open .node *** 
     3 * Description:    
     4 * Status:        Stable. 
     5 * Author:        Alexandre Dath <alexandre@dotnode.com> 
     6 * $Id$ 
     7 * 
     8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> 
     9 * 
     10 * This program is free software; you can redistribute it and/or modify 
     11 * it under the terms of the GNU General Public License as published by 
     12 * the Free Software Foundation; either version 2 of the License, or 
     13 * (at your option) any later version. 
     14 *  
     15 * This program is distributed in the hope that it will be useful, 
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18 * GNU General Public License for more details. 
     19 *  
     20 * You should have received a copy of the GNU General Public License 
     21 * along with this program; if not, write to the Free Software Foundation, 
     22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
     23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
     24 
    225include(INCLUDESPATH.'/metalbum.class.php'); 
    326include(INCLUDESPATH.'/pager.inc.php'); 
  • trunk/includes/EDIT_config_server.inc.php

    r24 r27  
    4848$config['metalbum']['flickr']['api_key'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; 
    4949 
     50// It's you interalbum.com login + mms code like this : "login@mmscode" 
     51$config['metalbum']['interalbum']['api_key'] = 'xxxxxx@xxxx'; 
     52 
     53// It's your ID on dotnode.com (32 chars a-f0-9) 
     54$config['metalbum']['dotnode']['api_key'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; 
    5055?> 
  • trunk/includes/Metalbum/flickr.class.php

    r24 r27  
    1 <? 
     1<?php 
     2/****************************************************** Open .node *** 
     3 * Description:    
     4 * Status:        Stable. 
     5 * Author:        Alexandre Dath <alexandre@dotnode.com> 
     6 * $Id$ 
     7 * 
     8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> 
     9 * 
     10 * This program is free software; you can redistribute it and/or modify 
     11 * it under the terms of the GNU General Public License as published by 
     12 * the Free Software Foundation; either version 2 of the License, or 
     13 * (at your option) any later version. 
     14 *  
     15 * This program is distributed in the hope that it will be useful, 
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18 * GNU General Public License for more details. 
     19 *  
     20 * You should have received a copy of the GNU General Public License 
     21 * along with this program; if not, write to the Free Software Foundation, 
     22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
     23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
     24 
    225require_once 'Flickr/API.php'; 
    326 
  • trunk/includes/Metalbum/interalbum.class.php

    r26 r27  
    1 <? 
     1<?php 
     2/****************************************************** Open .node *** 
     3 * Description:    
     4 * Status:        Stable. 
     5 * Author:        Alexandre Dath <alexandre@dotnode.com> 
     6 * $Id$ 
     7 * 
     8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> 
     9 * 
     10 * This program is free software; you can redistribute it and/or modify 
     11 * it under the terms of the GNU General Public License as published by 
     12 * the Free Software Foundation; either version 2 of the License, or 
     13 * (at your option) any later version. 
     14 *  
     15 * This program is distributed in the hope that it will be useful, 
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18 * GNU General Public License for more details. 
     19 *  
     20 * You should have received a copy of the GNU General Public License 
     21 * along with this program; if not, write to the Free Software Foundation, 
     22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
     23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
     24 
    225require_once 'Flickr/API.php'; 
    326 
  • trunk/includes/config.inc.php

    r24 r27  
    2727define('INCLUDESPATH', BASEPATH.'/../includes'); 
    2828 
     29define('API_REST_METHODPATH', BASEPATH.'/../api/rest.method'); 
     30 
    2931define('ROOTDIR', BASEPATH.'/..'); 
    3032define('SMARTYPATH',BASEPATH.'/../smarty'); 
     
    3739define('ALBUMPATH',BASEPATH.'/albums'); 
    3840define('ALBUMTHUMBPATH',BASEPATH.'/albums/thumb'); 
     41define('ALBUMSIZEDPATH',BASEPATH.'/albums/sized'); 
    3942 
    4043define('MODERATOR_ID', '00112233445566778899001122334455'); 
  • trunk/includes/functions.inc.php

    r24 r27  
    467467                return ereg("[a-f0-9]{32}", $string); 
    468468                break; 
     469        case 'photo_id': 
     470                return is_numeric($string); 
     471                break; 
    469472        case 'metalbum_type': 
    470473                if(in_array($string, array_keys($labels['metalbum']['type']))) 
  • trunk/includes/labels.inc.php

    r24 r27  
    221221$labels['metalbum']['type'] = array( 
    222222        'interalbum' => 'interAlbum.com', 
     223        'dotnode' => '.node (dotnode.com)', 
    223224        'flickr' => 'Flickr.com' ); 
    224225 
  • trunk/includes/metalbum.class.php

    r24 r27  
    11<?php 
     2/****************************************************** Open .node *** 
     3 * Description:    
     4 * Status:        Stable. 
     5 * Author:        Alexandre Dath <alexandre@dotnode.com> 
     6 * $Id$ 
     7 * 
     8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> 
     9 * 
     10 * This program is free software; you can redistribute it and/or modify 
     11 * it under the terms of the GNU General Public License as published by 
     12 * the Free Software Foundation; either version 2 of the License, or 
     13 * (at your option) any later version. 
     14 *  
     15 * This program is distributed in the hope that it will be useful, 
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     18 * GNU General Public License for more details. 
     19 *  
     20 * You should have received a copy of the GNU General Public License 
     21 * along with this program; if not, write to the Free Software Foundation, 
     22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
     23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
    224 
    325class Metalbum { 
  • trunk/reset_data.sh

    r16 r27  
    55rm -fr data/*/?? 
    66rm -fr data/*/thumb/?? 
     7rm -fr data/*/sized/* 
    78rm -fr sessions/* 
    89:> log/* 
  • trunk/smarty/templates/metalbum/album.tpl

    r24 r27  
    4141  <td align='center'> 
    4242    <a href='/metalbum/{$url_id}/view/{$metalbum.name}/{$photo.id}'> 
    43     <img style='margin: 3px;' src='{$photo.url_thumb}' alt='photo' /></a><br /> 
    44   {$photo.title|escape}<br /> 
     43    <img style='margin: 3px;' src='{$photo.url_thumb}' alt='$photo.title|escape' /></a><br /> 
     44  {$photo.title|truncate:30|escape}<br /> 
    4545  <span class='subimage'><a href="/metalbum/{$url_id}/view/{$metalbum.name}/{$photo.id}">{t}View full photo{/t}</a></span> 
    4646  </td> 
  • trunk/smarty/templates/metalbum/view.tpl

    r24 r27  
    1 <div id='leftblock' > 
    2 <a href='/profile/{$url_id}'><img src='{$user.photo}' alt='photo' /></a><br /> 
    3 <ul class='info'> 
    4 <li><a href='/profile/{$url_id}'>{$user.info.fname|escape} {$user.info.lname|escape}</a></li> 
    5 <li>{$user.info.gender_t}{if $user.info.relationship_status_t}, {$user.info.relationship_status_t}{/if}</li> 
    6 <li>{$user.info.country}</li> 
    7 <li>&nbsp;</li> 
    8 {if $user.info.here_for_t} 
    9 <li><span class='label'>{t}Interested in{/t}:</span><br />{$user.info.here_for_t}</li> 
    10 {/if} 
    11 </ul> 
    12  
    13 {if $leftmenu} 
    14 {strip} 
    15 <ul class='menu'> 
    16 {foreach name=leftmenu from=$leftmenu item=title key=link} 
    17 {strip}<li><a href=' 
    18 {if $link[0] neq '/'} 
    19         /{$token[0]}/{$link} 
    20 {else} 
    21         {$link} 
    22 {/if} 
    23 '{if $token[1] eq $link} class='active'{/if}>{t}{$title}{/t}</a></li>{/strip} 
    24 {/foreach} 
    25 </ul> 
    26 {/strip} 
    27 {/if} 
    28 </div> 
    29  
    30 <div id='home'> 
    31 <h2>{$photo.title|escape}</h2> 
     1<h2>{$photo.title|truncate:50|escape}</h2> 
    322 
    333<a href='/metalbum/{$url_id}/album/{$metalbum.name}' class='button'>{t}Back{/t}</a><br /> 
    344<div style='text-align:center'> 
    355{if $photo} 
    36 <img src='{$photo.url_full}' alt='{$photo.description|escape}' /><br /> 
     6<img src='{$photo.url_full}' alt='{$photo.title|escape}' /><br /> 
    377{$photo.description|escape} 
    388{else} 
     
    4111</div> 
    4212<div style='text-align: right'><a href='/metalbum/{$url_id}/album/{$metalbum.name}' class='button'>{t}Back{/t}</a></div> 
    43  
    44 <br /> 
    45 <br /> 
    46 </div> 
    47 <div style="clear:both"></div>