Custom Fields Module for Gallery3

unmeto

Joined: 2011-09-08
Posts: 2
Posted: Tue, 2011-10-11 13:14

Hello please help

I am using Gallery 3 with the custom fields module. I have everything working as it should but need to add a picture to one of the custom fields. Is there a way I can do this with the custom fields script? Thank you in advance for any help.

 
TAZattitude

Joined: 2009-04-27
Posts: 74
Posted: Tue, 2011-11-22 19:21

I have it installed, works great! Thank you

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Tue, 2011-11-22 21:10

TAZattitude am glad you like it :)

Dog Photos | Gallery2 Themes Demo

 
dcharro

Joined: 2011-12-15
Posts: 1
Posted: Thu, 2011-12-15 14:09
HarryF wrote:
Could you please check the issue with the "next" button in the search results. I'd like to do combined searches with tags and custom fields. But it doesn't work yet.
Thanks in advance.

HarryF, I have the same problem. I think I´ve got found the error.
You must change "g-custom-fields-form-hidden" for "g-search-form" at the end of the file js/search_form.js
Something like that:


// Submit search form after hacking values into it
function custom_fields_paging(page)
{
  newPageInput = '<input name="page" value="' + page + '" type="hidden"/>';
  $("#g-search-form").append(newPageInput);
  $("#g-search-form").submit();
  return false;
}
 
hyperblue

Joined: 2012-01-18
Posts: 2
Posted: Wed, 2012-01-18 03:07

How can you make a custom field "required" at upload album creation?

 
Goodnight Irene
Goodnight Irene's picture

Joined: 2012-01-19
Posts: 2
Posted: Thu, 2012-01-19 08:29

This module is working wonderfully, thank you for its development. I am fairly new and very limited with programming but have managed to create a manageable gallery for a non-profit. There are only two titles I would like to customize: 1) The title "Custom Data" on the side block 2) "Custom Fields Input" in the search form, this would be best to state: For inclusive search combinations. I have searched throughout the Custom Fields directory to no avail and this is not something to be found in the Administrative end. Where exactly can I change this? Your assistance would be greatly appreciated. Thanks in advance.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2012-01-20 04:31

Most text can be changed using the translation interface.
I have not tried with this module but it should be able to change text even English to English.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
BillWill

Joined: 2008-08-28
Posts: 205
Posted: Mon, 2012-01-23 21:13

Hello -

I installed this mod, then at the top there was a message:

The Custom Fields module has an advanced Search replacement for the default Search module. Deactivate the Search module now.

Well, I didn't know which search would be deactiviated. The default? the custom field search?

Rather than track down the answer, I decided to deactivate the mod itself and come back to it later.

So now I can't get rid of the message! I've reactivated, deactivated the module several times, and eventually went as far as deleting the folder containing the mod, yet the message is still there.

It already created a huge index upon the first install, so no doubt the contents of that index is somewhere, either in the database or the file system.

How do I get rid of this module and all the stuff it has left behind?

Thanks,
bw

Gallery 3.0.2
PHP - 5.3.8 cgi-fcgi
Apache/2.2.21 (Unix)
mysqli 5.0.92
Clean Canvas theme

Toolkits = Exif, Gd, ImageMagick

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-01-24 02:30

You can truncate the messages table with your DB admin tool.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Goodnight Irene
Goodnight Irene's picture

Joined: 2012-01-19
Posts: 2
Posted: Wed, 2012-01-25 03:58
floridave wrote:
Most text can be changed using the translation interface.
I have not tried with this module but it should be able to change text even English to English.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

WOW! It worked - from English to English! Thank YOU DAVE! That is a really awesome tool!

 
BillWill

Joined: 2008-08-28
Posts: 205
Posted: Sat, 2012-02-04 12:01

Thanks, Dave.

I went in as you suggested to the messages table and deleted the message that keeps appearing.

While in I also found eight tables with custom_fields as a prefix (including a huge one), so I removed them as well.

custom_fields_freetext_map
custom_fields_freetext_multilang
custom_fields_properties
custom_fields_properties_multilang
custom_fields_records
custom_fields_selection
custom_fields_selection_map
custom_fields_selection_multilang

Gallery 3.0.2
PHP - 5.3.8 cgi-fcgi
Apache/2.2.21 (Unix)
mysqli 5.0.92
Clean Canvas theme

Toolkits = Exif, Gd, ImageMagick

 
Robot

Joined: 2003-05-17
Posts: 11
Posted: Wed, 2012-03-28 09:24

Love the module. Any way to display 'custom fields' in the photo view?

 
djtropez

Joined: 2011-06-22
Posts: 31
Posted: Fri, 2012-03-30 11:04

hi everybody, i have a problem when i serch a custom field integer i don't show nothing.....there is someone that have the same problem?

 
mircoh

Joined: 2012-06-27
Posts: 1
Posted: Wed, 2012-06-27 11:53

Where is the download link?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2012-06-27 14:44

I fixed the first post of this thread.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Wed, 2012-06-27 16:55

Thanks a bunch Floridave, how come it ended up broken after so long?

Gallery3 Themes

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2012-06-27 17:08

I don't know. Could be that this thread has more than one page and that screwed it up?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
superpaik

Joined: 2012-07-18
Posts: 2
Posted: Wed, 2012-07-18 17:41

Hi,

I don't see the code for this module in here http://codex.gallery2.org/Gallery3:Modules:custom_fields

Am I doing something wrong?
I need the code, since I need this functionality to my album page.

Thanks,
Jordi.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2012-07-18 22:41

http://gallery.menalto.com/node/101988#comment-379742
it is attached to that post.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
superpaik

Joined: 2012-07-18
Posts: 2
Posted: Thu, 2012-07-19 15:42

Thanks,

I didn't see the link. Sorry.

Jordi.

 
michaelnyden

Joined: 2012-04-16
Posts: 27
Posted: Tue, 2012-07-31 00:41

the custom_fields_records table data has all the same data exactly as my search_records table, but when I search with the custom_fields module in place and the search module deactivated, I get very little records when I know many more should be returned. It appears to only be searching titles, not tags...any ideas/thoughts?

When I put the regular search module back and deactivate the custom fields module, I get all my results...I've even tried removing clearing all the data from custom_fields_records table and importing it from my search_records, so that I am sure it matches directly rather than just relying on the update index maintenance feature...but still very little results...not sure what is wrong with the search query/algorithm on the custom_fields module. Please help!

 
michaelnyden

Joined: 2012-04-16
Posts: 27
Posted: Thu, 2012-09-06 18:32

I figured out the problem with the search results it was the short search fix module that was screwing things up.

On another note, does anyone know how to automatically hard code the search query variable for the custom_fields module?

I know how to do it for the regular search: http://gallery.menalto.com/node/107568 but since I am a newbie to PHP, I'm not sure how to do it in the custom_fields module...basically I want to do exactly what they have in that aforementioned thread, put a "+" automatically on the backend on the front of each term in the search query so that all searches such as hotel lobby will be automatically +hotel +lobby without the user having to put in the + and without them seeing it.

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Fri, 2013-03-08 16:47

Hey guys, I know this is an old thread, but this is what the documentation has listed as the discussion thread for this module. I am having a problem with uploading photos when the Custom Fields Module is enabled. The odd part is that it was working fine but only in the last 2 week or so began to fail. I had posted in the support forum for help but havent heard back from anyone yet. You can see that thread here: http://galleryproject.org/node/111004#comment-402180

Essentially what the problem boils down to is that I get an error claiming that the photo is too large to upload no matter what it's size is. I have a my memory_limit set at 128M, my post_max_size at 10M and upload_max_filesize = 12M, and the photos are well under 1 MB. Regardless uploads work work fine when I have this module disabled. At first I thought it was limited to chrome on windows, but I've since found that it will fail out on FF/Safari/Chrome on osx as well (see my other thread for further details there). My Apache logs and the gallery3 log dont seem to show anything, though I probably need to step up how verbose the logging is on everything as a next step. Chrome developer console shows the server returning an 400 error, and according to the documentation found here: http://codex.galleryproject.org/Gallery3:Troubleshooting:Uploading an 400 error is caused by the following:

Your temp directory is not writable
Your temp directory is full
Your max size setting for upload size is to low.

there is no documentation as to which "temp" folder is being referred to here. If its /var/www/gallery/var/temp - i've cleared that, and its got the same permissions and ownership as the rest of the var directory.

I'm at a loss! Any help?

PHP 5.3.10
Gallery 3.0.4
Apache 2.2.22

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Fri, 2013-03-08 16:57

The default tmp dir on linux is: /tmp

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Fri, 2013-03-08 20:37

well in that case, /tmp at my OS root directory is empty.

Nick

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Fri, 2013-03-08 21:13

it is also very much writable, and has plenty of space.

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Thu, 2013-03-14 01:54

Hi Kydan,

The module should not affect maximum uploadable photo size in any way, as it doesn't deal with that simply.
Are you definitely sure this is the only difference compared to when it works?

Dog Photos | Gallery2 Themes Demo

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Thu, 2013-03-14 02:42

Joe7rocks,

Yep, the only thing I'll change is whether that module is enabled or not. With it on, I get the size error, regardless of the size. With it off, they upload fine, and then I can turn the module back on, edit the photo, and add the custom fields. Also, if I upload using the server-add module and then manually edit the photos it works fine, but that should also be unrelated. the Chrome dev tool shows a 400 Error being returned by the server, but what little is suggested in the documentation does not help. There is nothing in /gallery3/var/logs, nor in the apache error.log/access.log. I can screen capture/dump anything you want to help.

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Tue, 2013-03-19 20:23

bumping this again. Anyone else have some ideas?

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Tue, 2013-03-19 21:24

Is your Gallery accessible online?
would like to see this happen

Dog Photos | Gallery2 Themes Demo

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Wed, 2013-03-20 14:46

yep, I'll make you a test user to upload on. Check the PM for details.

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Mon, 2013-03-25 18:04

Joe7rocks,

FYI, I sent you another PM with the updated info. Let me know what else you need!

Thanks

Kydan

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Thu, 2013-03-28 08:50

Hi Kydan,

Just checked your install again.
Seems like there is a JS error on the page, right when the upload form loads: TypeError: $(...).gallery_autocomplete(...) is undefined
Likely that's causing interruption of some kind, but could succeed with an upload IF I've filled in the form! See : http://ajlc.csr.oberlin.edu/gallery3/index.php/testalbumByJoe

Dog Photos | Gallery2 Themes Demo

 
kydan

Joined: 2013-02-25
Posts: 13
Posted: Thu, 2013-03-28 14:21

sweet, I'll give it a look! Thanks for your help.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-03-28 14:45
Quote:
upload form loads: TypeError: $(...).gallery_autocomplete(...) is undefined

Just a FYI that if you are using the latest git version on the 3.1 branch there has been some changes that have not made it back to custom 3rd party themes. autnocomplete code would be one of them.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2013-04-03 23:38

@joerocks: Thanks for the work on the module. Great concept and works as intended.

A few thoughts (especially since you're already in the process of reworking the module):

- (1) It would be great if the user (Gallery owner) has the option of deciding whether or not to use the module's search in place of Gallery's. I couldn't find a way to easily disable the module's search. (I see the option to have fields be searchable or non-searchable, but couldn't find a way to basically say 'I'm satisfied with Gallery's search as it is without custom_fields playing any role whatsoever.')

- (2) Related to #1 (but not really), I've seen a couple of posts from people about using the short_search_fix module with the custom_fields module. The two don't interface and that is an issue for a small subset of users. I initially thought that playing with the module order would help, but that didn't do it for my testing. Is there a way that custom_fields can append itself to the default search instead of replacing it outright? Is there some other solution that comes to mind? (I don't really know much about module development, so not sure i can offer any real guidance here; there may be a much easier way to address this.) Sample thread: http://galleryproject.org/node/111210

- (3) The main promise that I see for the module is the ability to pull information directly into any place the page. For that to happen, there has to be a call of some sort. For me, I'd look through the database and try to pull the field id to add to a db query--but that's likely a bit much for the average user. Is it possible to add a field ID number to the admin interface so that you could more easily see what code/query will return the results of that field for an item? (In a super ideal world, I'd be able to do something like %custom_field_title_4% to pull the title/name of custom field #4 and something like %custom_field_4-8% to pull the field content of, say, custom field #4 for gallery item #8.)

I'm not sure that any of this is clear. Let me know if you don't get what I'm saying.

 
Sangie
Sangie's picture

Joined: 2010-10-31
Posts: 28
Posted: Mon, 2013-04-29 21:02

I love this module as well. Any plans to allow drag-and-drop sorting so you can control what order the items are listed? Right now it just seems to be order of creation.

Also, for free text fields, is it possible to use commas to make separate linkable words? So let's say I have a list of names, can each name be clickable?

Thanks again for this great module =)

 
Brandan

Joined: 2010-09-05
Posts: 8
Posted: Mon, 2013-12-16 07:58

For some reason this has been harder to install than other mods. I finally have it in and mostly working. The parts that work are great. My problem is when viewing a picture instead of having one entry in the side menu it has 10. Any ideas what would cause that? The problem is there both with my theme and the default one.

Problem solved by removing everything from the sidebar, then putting them back in place. Now it works. Great mod even if it does take 2 hours to get working. It is well worth it :P

 
pjgust

Joined: 2014-02-03
Posts: 1
Posted: Mon, 2014-02-03 12:49

Hi,

Sorry to come late to the game. I administer a Gallery2 site and we're looking to move to Gallery3 at the same time we change ISPs. Our Gallery2 site uses custom fields. How can I import our Gallery2 site into Gallery3 and retain all our custom field information. I would be impractical for us to re-enter it for 25K+ images.

Thanks in advance for any advice!

 
bandiet

Joined: 2014-03-06
Posts: 2
Posted: Thu, 2014-03-06 22:17

Very convenient module!
Is there a way to hide some fields (like the email-adress or phone number of the photographer) from the beholders?

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Thu, 2014-03-06 22:43

Hello guys, am frankly happy most of you find the module a useful one :)

Sangie: the order of fields is sortable in the admin panel.

Brandan: that's an odd behaviour you were facing, never seen that before

pjgust: have replied to you in private too, but for the record: there is no migration code available as of now to do that work. Could be scripted though, if you are into it, am happy to give you a helping hand!

bandiet: so what you want is hiding some custom fields from viewers but still have them for item owners/admins?

Dog Photos | Gallery2 Themes Demo

 
joe7rocks
joe7rocks's picture

Joined: 2004-10-07
Posts: 560
Posted: Thu, 2014-03-06 22:46

tempg: sorry man, missed your message back then.
If you are still interested, please give me a shout, would need more info from you to elaborate on that

 
Sangie
Sangie's picture

Joined: 2010-10-31
Posts: 28
Posted: Fri, 2014-03-07 05:19

My other question was allowing multiple items per field that I could separate with commas or semicolons, like if there's an art piece I Could list multiple artists that collaborated on it and they'd be separate links so you could click that and see everything they've had a part in. That would be great =)

 
bandiet

Joined: 2014-03-06
Posts: 2
Posted: Fri, 2014-03-07 11:50

Exactly, some of the custom fields should be visible only for admin users or special user group (maybe 'editors').

 
zwurbel

Joined: 2014-03-17
Posts: 1
Posted: Mon, 2014-03-17 15:15

Thanks for this great Module, I really love it, but I seem to have the same problem as Sangie as I don't see how to change the order of my custom fields.
Help would really be appreciated as it would be a real pain to delete them all and set them up again in the correct order.

Thanks for the support

Cheers
Axel

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2014-03-27 09:34

Hello,
I once tested and found that I do not need it the module. I have it disabled in the admin section and deleted via FTP. In the database, but are still tables available, I had to manually delete.
Is this normal or tables can also be deleted when disable?

Are these the associated tables or are there more?

custom_fields_freetext_map
custom_fields_freetext_multilang
custom_fields_properties
custom_fields_properties_multilang
custom_fields_records
custom_fields_selection
custom_fields_selection_map
custom_fields_selection_multilang

In the table modules, the module is registered even after delete in FTP.