![]() |
|
search by owner - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: search by owner (/thread-10282.html) Pages:
1
2
|
search by owner - BigLouis87 - 08-08-2012 I need to write a user page that shows all the images that a user owns, a sort of search by tags (clicking on the word) but by owner. I need it to collect every image a user uploads on my site. search by owner - acrylian - 08-08-2012 Probably there should be a search field for the owner as there is one for the author of Zenpage items. You have two ways to get them instead: search by owner - BigLouis87 - 08-08-2012 I cannot use the tag "author_bob" because I'm already using tags to classify images, that tag would appear among the other "true" tags. uhm... I already use the object model to assign the owner to the image while uploading (using search by owner - acrylian - 08-08-2012 If you want to hide a tag, you can of course use custom tag display functions to filter that. (we have alway a get variant to each print one and of course the object model). Modifying the search is surely an option but not recommended because of upgrade. The best would be to open a ticket so it is actually added. Probably it was just forgotten or something. My colleague will be able to answer this I guess. search by owner - BigLouis87 - 08-08-2012 Thank you for the replies, I partially solved with a This worked for me, but if you said Stephan could have a cleaner and more general way to get it, I'll wait. However, it will be a nice feature having it among the search fields, in a future release. search by owner - sbillard - 08-08-2012 The simplest way to implent this is to add I am sure that it is just an oversite that it is not already included. I will make sure it is part of 1.4.4 search by owner - BigLouis87 - 09-08-2012 Thank you, now it seems to work! It was so simply... search by owner - BigLouis87 - 09-08-2012 uhm, I think there is a bug, or something. search by owner - acrylian - 09-08-2012 Be sure the images are published and look at your search cache settings. by default results are cached 30min to lower overhead. search by owner - sbillard - 09-08-2012 Look in your database. That field may not be set for all the images. When the admin looks at this it uses the object model, so if an image is in an "owned" album it will be marked as owned by the album owner. (This is, of course, the problem with just looking at database fields. But I do not know how the serach could do otherwise.) search by owner - BigLouis87 - 09-08-2012 You're right, Stephan. All the images uploaded within the zip has NULL owner (and lot of other fields) in db, even if in the admin panel was assigned to their album's owner. search by owner - sbillard - 09-08-2012 Ok. We can make the album owner propegate to the image by adding code to the image updateMetaData() method. after the lines that read: This will be added to the 1.4.4 release search by owner - BigLouis87 - 10-08-2012 great, it works. Thank you! search by owner - sbillard - 10-08-2012 I should point out the downside of this change. Once the image owner field is set it becomes "disconnected" from the album owner. So changing the album owner does not change the image owner. All further changes have to be made on the image itself. search by owner - BigLouis87 - 10-08-2012 I think album/images structure should be similar to the unix structure of folder/files; the album should have its own owner, so as any image should. In this vision it's natural that album owner is indipendent from any singular image owner. At least zenphoto uses a unix filesystem to manage images, doesn't it? search by owner - geemike - 25-01-2013 A bit late to the party here, but I have modified my image.php to include the "owner" label: ` ` but really I would like this to be a link and a tag allowing clicking on the owner to do a tag search. I see above that you are recommending using the object model to "assign a tag to each image based on the owner name". Can you provide some tips on how to do this? Thanks search by owner - sbillard - 25-01-2013 Custom serches can be done on "owner", so a tag may not be needed. The link for "owner" should look something like:
where `` is the owner of the object search by owner - geemike - 25-01-2013 Great. URL based search is perfect for my needs. Unfortunately the syntax must be off slightly. On my site you can see the owner is "paul" but http://skishots.calgaryalpine.com/page/search/paul/?searchfields=owner yields 0 results. search by owner - acrylian - 25-01-2013 Did you enable the field owner for search? search by owner - sbillard - 26-01-2013 Also the owner must be set. You may have an "owner" shown because the album is owned without having the image "owner" field populated. |