]> git.mxchange.org Git - friendica.git/commitdiff
allow changing album name in photo edit page
authorFriendika <info@friendika.com>
Thu, 3 Feb 2011 23:13:38 +0000 (15:13 -0800)
committerFriendika <info@friendika.com>
Thu, 3 Feb 2011 23:13:38 +0000 (15:13 -0800)
boot.php
mod/photos.php
util/strings.php
view/de/strings.php
view/fr/strings.php
view/it/strings.php
view/photo_edit.tpl
view/theme/default/style.css
view/theme/duepuntozero/style.css

index 0dd5071685765204c50adf215504d39b43c39a8e..4fc05f81a39ff0ae32cbef58d8fe3adbff9bbd47 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -3,7 +3,7 @@
 set_time_limit(0);
 
 define ( 'BUILD_ID',               1034   );
-define ( 'FRIENDIKA_VERSION',      '2.10.0903' );
+define ( 'FRIENDIKA_VERSION',      '2.10.0904' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.1'  );
 
 define ( 'EOL',                    "<br />\r\n"     );
index 82060378e666d7fa7a54325ab2076a990a7f11e9..f892e2ce284dfce7cf8ba09bc578feb1ad2815d0 100644 (file)
@@ -244,20 +244,26 @@ foreach($_FILES AS $key => $val) {
                return; // NOTREACHED
        }
 
-       if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false))) {
+       if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false)) || (x($_POST,'albname') !== false)) {
 
-               $desc        = ((x($_POST,'desc'))    ? notags(trim($_POST['desc']))   : '');
-               $rawtags     = ((x($_POST,'newtag'))  ? notags(trim($_POST['newtag'])) : '');
-               $item_id     = ((x($_POST,'item_id')) ? intval($_POST['item_id'])      : 0);
+               $desc        = ((x($_POST,'desc'))    ? notags(trim($_POST['desc']))    : '');
+               $rawtags     = ((x($_POST,'newtag'))  ? notags(trim($_POST['newtag']))  : '');
+               $item_id     = ((x($_POST,'item_id')) ? intval($_POST['item_id'])       : 0);
+               $albname     = ((x($_POST,'albname')) ? notags(trim($_POST['albname'])) : '');
                $resource_id = $a->argv[2];
 
+               if(! strlen($albname))
+                       $albname = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y');
+               
+
                $p = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ORDER BY `scale` DESC",
                        dbesc($resource_id),
                        intval($page_owner_uid)
                );
-               if((count($p)) && ($p[0]['desc'] !== $desc)) {
-                       $r = q("UPDATE `photo` SET `desc` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d",
+               if((count($p)) && (($p[0]['desc'] !== $desc) || ($p[0]['album'] !== $albname))) {
+                       $r = q("UPDATE `photo` SET `desc` = '%s', `album` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d",
                                dbesc($desc),
+                               dbesc($albname),
                                dbesc($resource_id),
                                intval($page_owner_uid)
                        );
@@ -989,6 +995,8 @@ function photos_content(&$a) {
                        $edit_tpl = load_view_file('view/photo_edit.tpl');
                        $o .= replace_macros($edit_tpl, array(
                                '$id' => $ph[0]['id'],
+                               '$album' => $ph[0]['album'],
+                               '$newalbum' => t('New album name'), 
                                '$nickname' => $a->data['user']['nickname'],
                                '$resource_id' => $ph[0]['resource-id'],
                                '$capt_label' => t('Caption'),
index 3b12c0e54852ae930b6a107af8dc7cb36da7f039..762c68d2bbaadcf36986f1400f968b7cece56bb5 100644 (file)
@@ -303,6 +303,7 @@ $a->strings['Edit photo'] = 'Edit photo';
 $a->strings['View Full Size'] = 'View Full Size';
 $a->strings['Tags: '] = 'Tags: ';
 $a->strings['[Remove any tag]'] = '[Remove any tag]';
+$a->strings['New album name'] = 'New album name';
 $a->strings['Caption'] = 'Caption';
 $a->strings['Add a Tag'] = 'Add a Tag';
 $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping';
@@ -355,6 +356,9 @@ $a->strings['Register'] = 'Register';
 $a->strings['Please login.'] = 'Please login.';
 $a->strings['Registration revoked for '] = 'Registration revoked for ';
 $a->strings['Account approved.'] = 'Account approved.';
+$a->strings['Remove My Account'] = 'Remove My Account';
+$a->strings['This will completely remove your account. Once this has been done it is not recoverable.'] = 'This will completely remove your account. Once this has been done it is not recoverable.';
+$a->strings['Please enter your password for verification:'] = 'Please enter your password for verification:';
 $a->strings['Passwords do not match. Password unchanged.'] = 'Passwords do not match. Password unchanged.';
 $a->strings['Empty passwords are not allowed. Password unchanged.'] = 'Empty passwords are not allowed. Password unchanged.';
 $a->strings['Password changed.'] = 'Password changed.';
index 887b43394d7423616716363ee2c914e4b5272ad8..f59dcf63b9bb7101f09cbc0505b256c1d6a75ee2 100644 (file)
@@ -303,6 +303,7 @@ $a->strings['Edit photo'] = 'Foto bearbeiten';
 $a->strings['View Full Size'] = 'Betrachte Originalgröße';
 $a->strings['Tags: '] = 'Tags: ';
 $a->strings['[Remove any tag]'] = '[Tag entfernen]';
+$a->strings['New album name'] = 'Name des neuen Albums';
 $a->strings['Caption'] = 'Titel';
 $a->strings['Add a Tag'] = 'Tag hinzufügen';
 $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Beispiel: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping';
index c64bba1b7ac71ac983bfd3d791a4bce622ec598c..39e15eccfadf8561b6ff235e5eed1df633290bd3 100644 (file)
@@ -293,6 +293,7 @@ $a->strings['Edit Album'] = 'Éditer l\'album';
 $a->strings['View Photo'] = 'Voir la photo';
 $a->strings['Photo not available'] = 'Photo indisponible';
 $a->strings['Edit photo'] = 'Éditer la photo';
+$a->strings['New album name] = 'Nom du nuovel album';
 $a->strings['View Full Size'] = 'Voir en taille réelle';
 $a->strings['Tags: '] = 'Étiquettes: ';
 $a->strings['[Remove any tag]'] = '[Retirer toutes les étiquettes]';
index aa5359dbff97f090ced24000fa3cf17c6eba1598..6ae9285add4bd87dc221cbae4330da4d8367e755 100644 (file)
@@ -270,6 +270,7 @@ $a->strings['Edit photo'] = 'Modifica foto';
 $a->strings['View Full Size'] = 'Vedi dimensione intera';
 $a->strings['Tags: '] = 'Tag: ';
 $a->strings['[Remove any tag]'] = '[Rimuovi tutti i tag]';
+$a->strings['New album name'] = 'Nome nuovo album';
 $a->strings['Caption'] = 'Didascalia';
 $a->strings['Add a Tag'] = 'Aggiungi un tag';
 $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Esempio: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping';
index a40e3fef60da40b658cae407f6a4fb7b93346069..bf8563b3c252a9fcc6c56d8baeee7210ef2ab3d8 100644 (file)
@@ -3,6 +3,12 @@
 
        <input type="hidden" name="item_id" value="$item_id" />
 
+       <label id="photo-edit-albumname-label" for="photo-edit-albumname">$newalbum</label>
+       <input id="photo-edit-albumname" type="text" size="32" name="albname" value="$album" />
+
+       <div id="photo-edit-albumname-end"></div>
+
+
        <label id="photo-edit-caption-label" for="photo-edit-caption">$capt_label</label>
        <input id="photo-edit-caption" type="text" size="84" name="desc" value="$caption" />
 
index a60ea9db6d12317da0b28bda1c783b81c5824392..61782f6e37399be07f038369598c8c97117ae7f8 100644 (file)
@@ -1798,11 +1798,11 @@ a.mail-list-link {
        margin-bottom: 15px;
 }
 
-#photo-edit-caption-label, #photo-edit-tags-label {
+#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label {
        float: left;
        width: 150px;
 }
-#photo-edit-caption, #photo-edit-newtag {
+#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname {
        float: left;
        margin-bottom: 25px;
 }
@@ -1813,7 +1813,7 @@ a.mail-list-link {
        margin-bottom: 25px;
 }
 
-#photo-edit-caption-end, #photo-edit-tags-end {
+#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end {
        clear: both;
 }
 
index d27a894b76291e0e704b5b0847e27fd5ef878111..a1098f6a46f682e15d467b9d15c9d7de12583e32 100644 (file)
@@ -1673,11 +1673,11 @@ a.mail-list-link {
        margin-bottom: 15px;
 }
 
-#photo-edit-caption-label, #photo-edit-tags-label {
+#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label {
        float: left;
        width: 150px;
 }
-#photo-edit-caption, #photo-edit-newtag {
+#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname {
        float: left;
        margin-bottom: 25px;
 }
@@ -1688,7 +1688,7 @@ a.mail-list-link {
        margin-bottom: 25px;
 }
 
-#photo-edit-caption-end, #photo-edit-tags-end {
+#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end {
        clear: both;
 }