Hi everyboy,
I'm a newbie of gallery costumization, so I'm asking which is the best way to do this:
I'm currently working on a new theme for my wordpress blog and I would like to insert in the sidebar the last added-updated album of my gallery with the thumbnail, name and description.
I was thinking to make a separate php file that returns all the album information, I have tried to look at gallery api and code... but I don't know from where I should start.
If you have any advices, links or examples to suggest I'll really appreiciate those.
Thankyou in advance.
dk
Posts: 27300
There is examples in the imageblock module admin section.
http://codex.gallery2.org/Gallery2:Modules:imageblock
Example:
<?php @readfile('http://example.com/gallery2/main.php?g2_view=imageblock.External&g2_blocks=recentAlbum&g2_show=title'); ?>
You would have to hack the imageblock module to give you more info like the description.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 492
Or use WPG2 with Sidebar Block set to "Recent Album" and Sidebar Block Details set to "Title."
Like Floridave said, the G2 ImageBlock plugin will not currently display the item's description. For WPG2 3.1, we're going to refactor the backend to remove reliance on the ImageBlock plugin, so we'll be able to display the description and other information more easily.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 3
Thankyou both for your quick reply...
I have tried floridave code it works, I just edited the result with "str_replace" function in order to fit with my css... and the result is good.
My initial purpose was to show the last 3 added album... but I think that with imageblock I can only get the last one.
As soon as I can I'll try also capt_kirk suggestion, I have just installed WPG2, I'll let you know!
Thankyou again!
dk
Posts: 3
WPG2 is great, especially the "Sidebar Grid Block", unfortunatly is not possible to add the title and date to each album-photo in the grid.
Thankyou again for your help!
dk
Posts: 1378
The gridblock is pretty space limited thus why we do not have any titles (or frames) for that matter. I seriously do not know how you could add titles to the gridblock, where would you output them?
____________________________________
Wordpress / Gallery2 (WPG2) Author
Posts: 27300
just add more g2_blocks=XXXXXX Pipe(|) separated
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Hi!
I have a question, that goes a little further:
I want to show the very latest pic in my sidebar and underneath, there should be the last 5 titles of the gallery, but without a picture. Hopefully that works somehow
Thank you!!
Posts: 1378
Hiya Rasenkantenstein,
Sorry but we just do not have any specific functionality to do this..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo