"........... pictures were posted during the last 24 hours" on index.php outside G2

Iced Coffee

Joined: 2005-11-17
Posts: 75
Posted: Sun, 2006-06-25 12:42

I am using G2.1 with an external homepage index.php (not G2 index file) with several image blocks there, and I would like to display a sentence such as "15 pictures were posted during the last 24 hours" everytime people see the index.php Can I do this? and how?

Can anyone help? Thanks in advance.

Iced Coffee
http://www.myweddinglife.info/lamha
http://www.novemberbabies.com/gallery

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-06-27 06:47

are you showing imageblocks with readfile() or GalleryEmbed? if the latter, you can use G2 apis to make this custom query and display the results. if you're using readfile several times, you probably want to change to GalleryEmbed anyway, as each readfile makes an http request to your own server and each must fire up G2. with GalleryEmbed you can fire up G2 in the same request and interace as much as you need.

 
Iced Coffee

Joined: 2005-11-17
Posts: 75
Posted: Tue, 2006-06-27 06:55

I am using readfile() on ezPortal. Could you explain more about Gallery Embeded? Sorry I don't have any idea what it is.

Iced Coffee
http://www.myweddinglife.info/lamha
http://www.novemberbabies.com/gallery

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-06-27 23:18

it's a little harder to setup, which is why we have info on the easy readfile() method, but it's really the better system.
look for embedding and integration docs on codex (click documentation link above), and look at embed.php and modules/core/classes/GalleryEmbed.class in your G2. basically you want to do require('embed.php'), then GalleryEmbed::init with the right params, and then you can interact with G2 however you need. use GalleryEmbed::getImageBlock, do you own custom query, etc..

 
Iced Coffee

Joined: 2005-11-17
Posts: 75
Posted: Wed, 2006-06-28 08:06

Thanks. I'll look into that and may need your helps if I get some problems.

Iced Coffee
http://www.myweddinglife.info/lamha
http://www.novemberbabies.com/gallery