Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: utils.php, filename to keyword instead to title  (Read 3196 times)

0 Members and 1 Guest are viewing this topic.

veki

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
[Solved]: utils.php, filename to keyword instead to title
« on: June 17, 2010, 09:09:45 pm »

I want to copy filenames to keywords instead fo to title as defined in Admin tools. I found that in utils.php after line 155 there is code for copying from filename to title. But, I want to do the same for copying from filename to keyword. Does anyone know how can I edit utils.php in order to do so.

my URL is:
http://kpgtyu.org/pressarhiva

thanks,

veki
« Last Edit: June 21, 2010, 01:57:51 pm by Joachim Müller »
Logged

veki

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
[SOLVED] Re: utils.php, filename to keyword instead to title
« Reply #1 on: June 20, 2010, 01:40:43 pm »

I have succeded to do that by using UPDATE command in MySQL.
Indeed, it may be helpful to have that as one of admin tools too.

Veki
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: utils.php, filename to keyword instead to title
« Reply #2 on: June 21, 2010, 01:59:50 pm »

There won't be any new features in that file for cpg1.4.x. You're welcome to suggest code to add this feature for those who need it or come up with a plugin.
Logged

veki

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: [Solved]: utils.php, filename to keyword instead to title
« Reply #3 on: June 24, 2010, 09:02:25 pm »

hello,

I think that it would be sufficient to write that in FAQ section.
For example:
How to copy data from Title field in your albums to Keywords field?
It is possible to do that by copying data from "title" column in your database in table cpg_pictures to destination column "keywords".
You can do that by using command UPDATE.
you can do that from command prompt by logging first and issuing command UPDATE as it will be described bellow.  indeed, you can do the same by using  entering UPDATE command in SQL tab/field in your phpMyAdmin.
The command goes as follows:
UPDATE mydatabase_name SET keywords=title
after that command all rows in "column" keywords will be populated with data from column "title".
if you want to do that according to some condtion please use clause WHERE after SET and define your conditions. please check MySQL documentation for that.


Best wishes,

veki
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.