combined view of most recent items + most popular items + random items - Matrix or any other theme

psygarden

Joined: 2003-03-25
Posts: 128
Posted: Thu, 2007-07-26 21:05

Hello all, i've been using gallery for pretty much 5 years now and must say it's come a long way! I love the functionality it gives me and can't imagine running my website ( www.psygarden.be ) without it.

There is one thing that i'm missing now that my gallery has reached a certain size (+10.000 images) and that is a way for my users to browse it showing them images they otherwise might not come across...

what I have in mind:
a page that displays x most recently uploaded images, x top rated images, and x random images on one single page.

I'm just an amateur coder with little experience, so realising this would require quite a bit of help from the community here! I was hoping someone of the dev team could do some coaching for me, telling me what would need to be done first what files i should study
Questions that i ask myself are:

- does this require modules or could i do this purely in a theme?
- would be hard to make something along these lines that would be useable over different themes?
- where to start?

I am hoping to find some people with simular interests that want to work on this with me!

Kind regards,
Rik

Related feature requests are:

Vote for a link in the sidebar like "recent images" and "recent posts" for the top rated items:
http://sourceforge.net/tracker/index.php?func=detail&aid=1664611&group_id=7130&atid=357130

I tried entering a new feature request to back this thread up but I keep getting errors in sourceforge saying : exiting with error

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2007-07-26 21:32

probably your best bet is to add a new view in the dynamicalbum module. make a copy of RandomAlbum.inc or PopularAlbum.inc and make the getChildIds function call parent::getChildIds 3 times with the appropriate parameters.. then merge together all the ids and return that list.

 
psygarden

Joined: 2003-03-25
Posts: 128
Posted: Sat, 2007-07-28 20:11

Since the resulting list of items (x items for most recent, top rated and random) i would ofcourse want to split the result so it isn't displayed as one 'dynamic album', but as a page with 3 titles and their respective items categorised below them.

How would this be possible with the current functionality of the gallery?

i'd have 3 arrays of images that i'd want to display on a single page, but seperated by layout (with title and such)

Suggestions/thoughts?

Kind regards,
Rik

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2007-07-28 22:30

The theme API only supports showing a set of items as an album.. we can't currently ask a theme to display multiple sets of items with different sections/headings. You can of course make a module page with these headings and item data, but then your view has to decide how to show the thumbnails/info (rather than this being done by a theme).

 
Cobus Taljaard
Cobus Taljaard's picture

Joined: 2009-07-22
Posts: 10
Posted: Wed, 2009-07-22 13:11

Hi
Old thread, but closest one to what I want to do...

I want one dynamic album with a mix of items: x recently uploaded, x top rated, x most viewed today, x most viewed this week, x most viewed this month, etc.
The album should display all the dynamically selected items as normal thumbnails in an album.

I've played around with dynamic albums (www.joretha.com/gallery) and the image block, but can't get it right. Using the image block (which has some of the "filters" I want), only gives me small thumbnails which is not part of the images within an album.

I tried to look into mindless' suggestion on the 26'th, but I have too little experience with Gallery's code to grasp it.

Anyone with some more pointers/suggestions?

thanks in advance

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2009-07-22 19:32

mediablock can do some of that and would be easier to customize.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Cobus Taljaard
Cobus Taljaard's picture

Joined: 2009-07-22
Posts: 10
Posted: Fri, 2009-07-24 08:40

Hi suprsidr - thanks for your inputs.

I feel blind, as I do not have a good understanding of the G2 code/architecture. Is there somewhere you can point me to for me to understand it better?

Like using your mediablock inside an album - how would I go about showing it. Should I edit some tpl files etc....? Between your mediablock and the G2 imageblock I would be able to do what I want IF I could "embed" it in an an album or something.

I long for something as simple as the mod_html Joomla! extension that allows inclusion of HTML/JS/CSS and PHP in modules.

_____________________________________________
Constantly tinkering with Gallery and Joomla!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2009-07-24 11:59

To use it in your theme templates instead of this example:
<?php @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=32&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=11&useThumb=1&column=4&useMicro=40');?>
use something like:
{php} @readfile('http://www.flashyourweb.com/gallery2/mediaBlock.php?g2_itemId=32&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=11&useThumb=1&column=4&useMicro=40'); {/php}

using my examples for guidance.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2