Adding Rating-Block on PGtheme Album Page

LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sun, 2006-01-22 07:20

Hi, I'm trying to get the rating block to be displayed on a PGtheme based album page.
It properly shows up as OtherBlocks on the Photo Pages but does not appear below the items on
an album page.

Is there some way to enhance

{g->block type="core.ItemInfo"
        item=$child
        showDate=true
        showOwner=$showOwner
        showSize=true
       	showViewCount=true
        showSummaries=true
   class="giInfo"}

to trigger the rating interface??

Thanks, Lutz

Gallery version = 2.1.0- core 1.0.19
PHP version=5.1.2 apache2handler
Webserver=Apache/2.2.0 (Win32) DAV/2 PHP/5.1.1 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database=mysql 5.0.16-nt-log
Gallery-URL=http://lf-photodesign.de

 
dzm

Joined: 2004-08-11
Posts: 53
Posted: Thu, 2006-02-09 07:43

I'm really looking for something like this too. And even better, I'm looking for something that shows the rating of the item if it's a photo, but shows the average rating of all the photos if the item thumbnail is for an album.

Is this possible, or is this an RFE I should file?

 
dandv

Joined: 2006-11-09
Posts: 2
Posted: Wed, 2006-11-15 12:56

Yes, you can add the following code right after the {g->block type="core.ItemInfo" ... class="giInfo"} call:

{* Display the rating underneath each item *}                                                                           
{foreach from=$theme.params.photoBlocks item=block}                                                                     
    {if $block.0 == 'rating.Rating'}                                                                                    
        {g->block type='rating.Rating' item=$child}                                                                     
    {/if}                                                                                                               
{/foreach}                                                                                                              

Hope that helps,
Vlad Dascalescu
http://automaticallyyours.com/gallery