forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: veki on June 17, 2010, 09:09:45 pm

Title: [Solved]: utils.php, filename to keyword instead to title
Post by: veki 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
Title: [SOLVED] Re: utils.php, filename to keyword instead to title
Post by: veki 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
Title: Re: [Solved]: utils.php, filename to keyword instead to title
Post by: Joachim Müller 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.
Title: Re: [Solved]: utils.php, filename to keyword instead to title
Post by: veki 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