Hi everybody,
I just want to have the last X added images from an specified album. (where X is a number)
I checked the imageblock doc but imageblock is only for the whole gallery with recent|recent...
I also checked the G2Image Chooser code (thx capt_kirk!) but in this code, all items are parsed and then sorted.
There is no alternative to parse all the item and then sort it with a home function ?
Because, it seems to be something quite usefull but a lot of line to write...
Thanks for your help !
Benjamin
Posts: 27300
you can use the imageblock module for this just specify the g2_itemId of the album you want.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 17
Thanks floridave.
Indeed, i think the doc isn't very clear on this point but right, it's work ... but for the link on the images, I have the link to gallery element and I want to have the link to the real image (ie. jpg files). I checked the doc of getImageBlock and there is one parameter 'href' but I don't think I can do what I want ...
Output for one element :
Here is my code to have the last 3 images of an album:
Posts: 27300
Docs are written by the user for the user so feel free to make it more clear.
The imageblock module does not have this switch. I think the 'href' parameter is for a custom link to what ever you like. I have never played with that so don't really know.
I guess you could make the <div> link to the image but wold take some coding to do.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 17
How can i edit the API doc ? I did'nt find the 'edit' button.
Maybe i can have the path to the real image by another way than imageblock.
It seems that I will use/modify the code of capt_kirk in order to do that.
Thanks for your help
Posts: 27300
Sorry I did not mean the API documentation I was thinking of the codex:
http://codex.gallery2.org/Gallery2:Modules:imageblock
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team