[Solved]: utils.php, filename to keyword instead to title [Solved]: utils.php, filename to keyword instead to title
 

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]

Main Menu

[Solved]: utils.php, filename to keyword instead to title

Started by veki, June 17, 2010, 09:09:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

veki

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

veki

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

Joachim Müller

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.

veki

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