Noticed additional bug with iteminfo.tpl change done earlier

manderly

Joined: 2008-04-04
Posts: 71
Posted: Fri, 2008-04-18 20:52

Hi Dave,

When you mentioned that I should check for the root album in iteminfo.tpl, I made the change and it worked but it also put the totals underneath the first thumbnail on the webpage...which I didn't notice until now...

http://www.illinoisancestors.org/cemphotos/main.php

Here is the code as it stands now...

{if !empty($showOwner)}
<div class="owner summary">
{g->text text="Submitter: %s" arg1=$item.owner.fullName|default:$item.owner.userName}
</div>
{/if}

{if !empty($showSize) && $item.canContainChildren && $item.childCount > 0}
<div class="size summary">
{if empty($theme.parents)}
{g->text one="Size: %d county"
many="Size: %d counties"
count=$item.childCount
arg1=$item.childCount}
{else}
{g->text one="Size: %d photo"
many="Size: %d photos"
count=$item.childCount
arg1=$item.childCount}
{/if}
{if $item.descendentCount > $item.childCount}
{g->text one="(%d photo total)"
many="(%d photos total)"
count=$item.descendentCount
arg1=$item.descendentCount}
{/if}
</div>
{/if}

Well, I'm hoping once I can get this modification working, I can stop bothering you, Dave. <g>

many heartfelt thanks,
Janine

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-04-18 23:53

There is 10 of thousands of threads on this forum. Wehn you start a new thread you have to assume that somebody else will read the thread as well. Saying that You have to tell me what you are after. I am not going to remember and look for another thread. You have to assume that I did not read the other thread.

So this code you pasted is iteminfo.tpl?
and you are seeing some text you don't want?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
manderly

Joined: 2008-04-04
Posts: 71
Posted: Sat, 2008-04-19 00:41

Hi Dave,

Yes, this is the code that is currently in iteminfo.tpl and

I am seeing additional code that shouldn't be there...it's under the thumbnails at the root level as well.

As a recap, I had wanted to make changes to the totals at the top of the root level webpage to say" Size: 3 counties (13 photos total)...which it now does but it also shows this same phrase under the thumbnails.

What I would like it to say under the thumbnails is "Size: 2 cemeteries (5 photos total)"

Is this possible?

Here is the code in iteminfo.tpl

{if !empty($showOwner)}
<div class="owner summary">
{g->text text="Submitter: %s" arg1=$item.owner.fullName|default:$item.owner.userName}
</div>
{/if}

{if !empty($showSize) && $item.canContainChildren && $item.childCount > 0}
<div class="size summary">
{if empty($theme.parents)}
{g->text one="Size: %d county"
many="Size: %d counties"
count=$item.childCount
arg1=$item.childCount}
{else}
{g->text one="Size: %d photo"
many="Size: %d photos"
count=$item.childCount
arg1=$item.childCount}
{/if}
{if $item.descendentCount > $item.childCount}
{g->text one="(%d photo total)"
many="(%d photos total)"
count=$item.descendentCount
arg1=$item.descendentCount}
{/if}
</div>
{/if}

thank you for your patience and for your help,
Janine

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2008-04-19 17:12

Modify itemInfo.tpl to the way you want under the thumbs.

Then take the original bit of code from itemInfo.tpl and copy the <div> that displays the info

  <div class="size summary">
    {g->text one="Size: %d item"
	     many="Size: %d items"
	     count=$item.childCount
	     arg1=$item.childCount}
    {if $item.descendentCount > $item.childCount}
    {g->text one="(%d item total)"
	     many="(%d items total)"
	     count=$item.descendentCount
	     arg1=$item.descendentCount}
    {/if}
  </div>

And paste it over the original bit of code in album.tpl

                {g->block type="core.ItemInfo"
                          item=$theme.item
                          showDate=true
                          showSize=true
                          showOwner=$theme.params.showAlbumOwner
                          class="giInfo"}

Then modify the album.tpl to your liking for the top.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
manderly

Joined: 2008-04-04
Posts: 71
Posted: Sun, 2008-04-20 13:00

Hi Dave,

Thank you for your help...I am truly amazed at all the work you do!

I never did get it to work...so I give up and will work on other modifications...

thanks again,
Janine

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2008-04-20 13:38

this is the wrong forum customizations / g2 code discussions. please discuss such things in the g2 forums.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage