Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: utils.php, filename to keyword instead to title  (Read 3749 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.019 seconds with 19 queries.