Adding "last updated album" to a blog

d82k

Joined: 2007-10-01
Posts: 3
Posted: Mon, 2007-10-01 12:51

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2007-10-01 13:39

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

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Mon, 2007-10-01 13:54

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

 
d82k

Joined: 2007-10-01
Posts: 3
Posted: Tue, 2007-10-02 21:45

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

 
d82k

Joined: 2007-10-01
Posts: 3
Posted: Tue, 2007-10-02 23:07

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

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2007-10-02 23:36

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-10-03 01:48
Quote:
My initial purpose was to show the last 3 added album... but I think that with imageblock I can only get the last one.

just add more g2_blocks=XXXXXX Pipe(|) separated

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Rasenkantenstein

Joined: 2008-05-13
Posts: 6
Posted: Tue, 2008-05-13 08:12

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!!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2008-05-13 11:49

Hiya Rasenkantenstein,

Sorry but we just do not have any specific functionality to do this..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo