[patch] bulk update of custom fields
sergii
Joined: 2006-10-29
Posts: 16 |
![]() |
|||
attached is a patch for customfield module that allows one to set custom fields in all items in a given album and its sub-albums. A new form appears on a [Custom Fields] tab of "Edit Album"
|
||||
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
|||
Hey, thanks for the patch! It's tested on current svn version, right? |
||||
sergii
Joined: 2006-10-29
Posts: 16 |
![]() |
|||
No, it isn't. From the list of API changes and change history for customfield module it doesn't look like there should be any problems applying the patch to the current version. But I didn't try. |
||||
cervantes_roger
Joined: 2006-10-25
Posts: 17 |
![]() |
|||
i'm new in all this kind of things. i've been using gallery for 2 months or so. how am i supposed to apply this kind of patches??? thnx |
||||
cervantes_roger
Joined: 2006-10-25
Posts: 17 |
![]() |
|||
ok, it works for me! now I am trying to use a similar code to creat a "really advanced search" where anyone could search in every custom field. Any idea on how to do it?? I'm also posting these ideas here: http://gallery.menalto.com/node/40453 Please, someone help me! thnx |
||||
briancoy
Joined: 2005-06-24
Posts: 3 |
![]() |
|||
Any chance someone can post a link to the files already altered. I only have FTP access to the machine that the files are on and I don't know how to apply the patch files on a Windows machine. Thanks |
||||
gioiam
Joined: 2007-07-02
Posts: 5 |
![]() |
|||
Can someone please explain to me how i apply this patch? |
||||
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
|||
Damn, I really need this! How do I apply this patch? |
||||
kingstog
Joined: 2007-10-08
Posts: 13 |
![]() |
|||
I know it's probably a long shot posting this here looking at the dates but does anyone know how to apply this patch? |
||||
desiredbard
Joined: 2006-07-05
Posts: 80 |
![]() |
|||
Sergii, Servantes, How do I apply this patch? Does this patch finally enable you to mass change keywords and titles with the bulkmanage? |
||||
cervantes_roger
Joined: 2006-10-25
Posts: 17 |
![]() |
|||
Its supposed to work just by using some kind of commandline statement, that would change the lines in the original files so as to achieve these new functionalities. I was just in your same situation so I finally decided to open the patch file with the notepad and change, one by one, every line of code. It didnt work at first, but as I ve been programming for some time...got it to work. If you see the dates...there was 1 month between the "how to" and the "working!" messages. So all I can tell you is to change the code lines one by one...and it will work! |
||||
sergii
Joined: 2006-10-29
Posts: 16 |
![]() |
|||
right, you can do it manually. or you can use google: http://www.google.com/search?q=how+to+apply+a+patch you will need patch.exe program |
||||
Luke7799
Joined: 2007-07-10
Posts: 35 |
![]() |
|||
Could you please advise roughly were the following lines of code from the patch go. + I know in the patch file it has what comes before/after the code you need to insert, but I can't find where to insert it. Thanks! |
||||
sergii
Joined: 2006-10-29
Posts: 16 |
![]() |
|||
anywhere. it's javascript, so make sure to put it inside <script> tag. actually inside <script type="text/javascript"> ... javascript here ... {/literal} |
||||
Luke7799
Joined: 2007-07-10
Posts: 35 |
![]() |
|||
Thanks. |
||||
Luke7799
Joined: 2007-07-10
Posts: 35 |
![]() |
|||
Just tested it. Thanks. |
||||
sergii
Joined: 2006-10-29
Posts: 16 |
![]() |
|||
the patch was for gallery 2.1, it'll need changes for 2.2 e.g. error handling was changed, in 2.1 it used to be if ($ret) { in 2.2. it's if ($ret) { if all you see is an empty page, check httpd logs to see what went wrong, there should be php errors in there |
||||
Luke7799
Joined: 2007-07-10
Posts: 35 |
![]() |
|||
Updated new files with correct 2.2 code. Sorry, how can I check the httpd logs? |
||||
Another_Matt
Joined: 2009-08-20
Posts: 40 |
![]() |
|||
Luke, I know this is an old post but you chopped out the saveFieldValues function from CustomFieldHelper.class. Seems to work fine in g2.3. |
||||