Hello and thanks for the great CMS, I would like to implement some features to my zenphoto community site and I would like to ask you how these can be easily implemented to my site.
First of all, I would like a dynamic album of all the photos uploaded from everyone sorted by their date. I tried searching for a global var or for a function to get them but I couldn't find anything. Should I write my own function to get this, or it is implemented somehow and I just couldn't find it? AFAIK the dynamic albums allow you to search for a word but in this case that I need them sorted by date what can I do?
Secondly, I would like to get the same list of all photos sorted by rating. Is this possible and how? Should I make my own function again?
The third that I want to ask is there is a way to get all users from a group in an array to iterate through them and echo some of their details (username, email etc). I will make a plugin so the users can upload their avatar on the system and I would like to make a list of all the users that is public through a link.
I would like to use zenphoto's classes if it is possible and not have to make my own connection to the database to retrieve all these things.
Comments
2) You should be able to do this with a dynamic album as well.
3) That should be possible with the object model and the authority and administrators classes
How can I create a search with something general when everybody is uploading their images with their own tags/ descriptions/ image names?
How can I sort by date/by popularity a dynamic album. Should I first implement the option onto the theme? Is there a special parameter to a function that allows that?
edit: forget the second question. I found this inside the create dynamic album option. But the problem is HOW I search to see every uploaded picture into the gallery to sort them by popularity/date.
If you want to sort the album by date then popularity you will have to create a custom search. You then will be basically writing "sql order by" code. The only caveat is that the sort order gets applied separately. If leave that default, then no text is added and you can put the orders within the order by strings.
Put your order by string within parenthesis in the custom input box.
2) You don't need and you can't search for popular/date. You search for all and then set the sort order for the dynamic album.
When I visit a dynamic album that has a photo and I click on the photo, I get a blank page and the source code is cut somewhere in the head section after loading some javascript from my template. The weird thing is that when I go to another normal album that has the SAME photo (and gives the SAME url for the photo), then when I click the photo, the photo loads correctly.
If I copy paste the "problematic" url (that has no picture loaded) and I paste it on another window after I have clicked on the dynamic album it won't work but If i just visit another valid page of my gallery and then paste the same URL again there, the link works correctly.
Any tips on that?
Did you make a custom sort order? if so, try a standard one and see if the problem still exists.
The sorting was the standard "most viewed" or the "most recent" photos from the sorting option at the dynamic album creation form. I will try to enable php error reporting to see if I get any warning/notices/fatal errors on my page.
Fatal error: Cannot access protected property SearchEngine::$dynalbumname in /pathremovedforsecurityreasons/themes/zpmasonry/functions.php on line 104
should I check the theme's functions.php for something particular?