Adding rating stars to a photo page

Boko

Joined: 2010-11-15
Posts: 11
Posted: Fri, 2010-11-19 16:08

Don't know if this is in the right subforum but:

I'm trying to tweak it so that I can show the rating stars from the rating module on a photo page

So far I've done this (all in my custom theme folder):

1. added this block to my photo.tpl template:


	{g->block type="core.ItemInfo"
                          item=$theme.item
                          Date=true
                          showOwner=$theme.params.showImageOwner
                          showOwner=true
                          showSummaries=true
                          class="giInfo"}

Note the showSummaries=true which contains the number of comments and the stars (I've copied this parameter/block from the album.tpl where I changed the item from $child to $theme.item)

Then it gave me this error:

PHP Notice:  Undefined index:  itemSummaries in D:\projecten\Provincie Zeeland\Laat Zeeland Zien\DNABank\gallery2\g2data\smarty\templates_c\%%3232076826\dnabank\%%C7^C79^C79EEB7F%%ItemInfo.tpl.php on line 38

So I added itemsummaries to an array in showphotopage in the theme.inc file like this:

	$dataTypes = array('owner', 'parents', 'systemLinks', 'permissions',
			   'itemLinks', 'itemLinksDetailed', 'itemSummaries', 'itemNavigator', 'imageViews');

Thinking it would fill the value, but it didn't.
And now I'm kinda stuck! So I was wondering if anyone could help me with this, I would consider trying to make this generally useable/ a general solution as I can see more people wanting to show rating stars on the photo page.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-11-19 16:31

You can add the ratings to the photo page through your theme's configurator either globally gallery admin -> theme -> my theme -> blocks to show on photo page
or by album edit album -> theme tab -> blocks to show on photo page

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

 
Boko

Joined: 2010-11-15
Posts: 11
Posted: Mon, 2010-11-22 08:22

Thanks, that helped a lot. Seems I was trying too hard :)