Member
Member
fmontes   11-01-2014, 18:39
#1

Hey guys,

Im working in a custom theme and I need to display X numbers of the latests albums in the homepage.

Right now I'm using printLatestAlbums() and is working as expected but I need a very specific HTML markup.

So I was trying to write my own php function for the theme using this as base: http://www.zenphoto.org/support/topic.php?id=5783#post-33607

But I wasn't able too do it... my PHP knowledge is not so good.

Any change anybody have something I can use?

Thanks in advance.

Administrator
Administrator
acrylian   11-01-2014, 20:25
#2

There is a function getAlbumStatisics which returns the pure data. Remember we most always have get/print pairs for the reason CSS is not enough.

So either you use printLatestAlbums() renamed with your customisations or you make your entire own custom function (both either via the theme's functions.php or another plugin). Sorry but without PHP knowledge you will not get far with these things.

Member
Member
fmontes   11-01-2014, 21:22
#3

Thanks acrylian

I will try to find an example of getAlbumStatistic() in the wild, maybe I can find one in a theme.

Regards...

Administrator
Administrator
acrylian   11-01-2014, 22:34
#4

It's really not that complicated. getAlbumStatistics returns an array of the albums fetched. You just need to look at what it returns and use it. Maybe a bit object model stuff as well (see our user guide) depending on what you want to do.

And then there is always paid support :-)

Member
Member
fmontes   11-01-2014, 23:56
#5

I found this piece of code:

And I think I can make it work. If not... paid support will be :)

Member
Member
fmontes   12-01-2014, 10:27
#6

Thanks for the info acrylian I went to the user guide, read a little about object model and I was able to do it.

Here is the code:

[list]

[*]

            getAlbumLink() ?>" class="album-thumb">
Administrator
Administrator
acrylian   12-01-2014, 11:55
#7

Great you managed it!

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.