PDA

View Full Version : [1.5B52] How to update the photo headers globally?


loupgarou
26th of November 2003 (Wed), 23:04
Somehow I set the default exhibition data wrong so that every photo's header description = New Photo.

is there some functionality that can default it back to filename.ext for all the 441 photos in my gallery.

http://files.tdsuo.com/gallery/index.php

--

loupgarou
26th of November 2003 (Wed), 23:16
also one more thing:
how can viewers give feedback on individual photos?
*I thought that was what i saw on 1.22*

Pekka
27th of November 2003 (Thu), 05:49
loupgarou wrote:
Somehow I set the default exhibition data wrong so that every photo's header description = New Photo.

is there some functionality that can default it back to filename.ext for all the 441 photos in my gallery.

http://files.tdsuo.com/gallery/index.php

--


If you have made database backups then you just restore that backup.

If you do not have backups, then currently the only way is to go through each photo in photo editor and
- clear the header line
- save the photo

A quickest way to do this in Windows PC is to click header line with mouse, press CTRL-A, then BACKSPACE, then RETURN.

That will revert the name to default setting (as in default photodata editor).

also one more thing:
how can viewers give feedback on individual photos?
*I thought that was what i saw on 1.22*

Photo feedback is 1.5 feature. In Misc Settings editor you have on/off switches plus you must make there a selection of exhibitions which have this feature active.

loupgarou
27th of November 2003 (Thu), 07:45
solved:

for others who might need it.

Dos prompt
c:\> cd\mysql\bin

c:\> mysql -u userid -ppassword --tee=test.txt


mysql> use gallery;
Database changed
mysql> select concat("update ee_photo_eng set ee_photo_header = '" , ee_photo_filename , "' where ee_photo_id = " , ee_photo_id , ";") from ee_photo;

output:
+--------------------------------------------------------------------------------------------------------------------------+
| concat("update ee_photo_eng set ee_photo_header = '" , ee_photo_filename , "' where ee_photo_id = " , ee_photo_id , ";") |
+--------------------------------------------------------------------------------------------------------------------------+
| update ee_photo_eng set ee_photo_header = 'IMG_4481.JPG' where ee_photo_id = 1; |
| update ee_photo_eng set ee_photo_header = 'IMG_4510.JPG' where ee_photo_id = 2; |
| update ee_photo_eng set ee_photo_header = 'IMG_4542.JPG' where ee_photo_id = 3; |
etc....
-

mysql>exit;


open up text.txt

and paste the data into mysql

Pekka
27th of November 2003 (Thu), 10:46
Just FYI: As soon as I found out that user manipulates the EE database with any other means than EE editors (UNLESS I specifically tell to do so and I tell how to do it), I can't give any more support for that installation. Chance of messing up relations with "homemade" tools or SQL commands is great and I can not spend time trying to support and troubleshoot something with various problems due external SQL manipulation. Sorry.

If you have a special need and wish for a special tool for it I will add them to my todo list. If the wish is simple one I will most likely get you the code in few hours.

PhpMyAdmin Backups are of course ok.

loupgarou
30th of November 2003 (Sun), 07:50
found a bug.

when you create a new exhibition, it doesn't follow the settings in the "default for new exhibition" with regards to the header issue.

Pekka
30th of November 2003 (Sun), 15:23
loupgarou wrote:
found a bug.

when you create a new exhibition, it doesn't follow the settings in the "default for new exhibition" with regards to the header issue.



Thanks, will try to get that fixed for release.