How view click statistic?

pauschpageDOTcom

Joined: 2004-03-20
Posts: 118
Posted: Tue, 2007-02-13 18:05

Hello!

I have a gallery theme - without the "viewed" counter.
Is it possible to get in admin mode a counter for every picture - which is only available in admin mode?

Thanks!
Chris

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-02-13 18:19

you can add conditional code to your album.tpl.
here's the docs on how to check for "is admin":
http://codex.gallery2.org/Gallery2:Themes:Reference:Variables#User_Information

--------------
Enter the Gallery 2 Theme Contest today!

 
schrecklich

Joined: 2008-01-03
Posts: 57
Posted: Sun, 2008-01-06 11:24

That link isnt leading anywhere. Whats the code to add for enabling Admin Only View Counter, please?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25964
Posted: Tue, 2008-01-08 23:02

fixed the above link

 
schrecklich

Joined: 2008-01-03
Posts: 57
Posted: Sat, 2008-01-12 09:34

Ok i'm not getting it..what code would i have to wrap it around?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25964
Posted: Sun, 2008-01-13 01:13

In album.tpl the code that renders the count:

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

or in photo.tpl there is similar code.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
schrecklich

Joined: 2008-01-03
Posts: 57
Posted: Sun, 2008-01-13 11:50

thanks, works fine

Quote:
{if $user.isAdmin}
{g->block type="core.ItemInfo"
item=$theme.item
showDate=false
showSize=false
showViewCount=true
showOwner=$theme.params.showAlbumOwner
class="giInfo"}
{else}
{g->block type="core.ItemInfo"
item=$theme.item
showDate=false
showSize=false
showViewCount=false
showOwner=$theme.params.showAlbumOwner
class="giInfo"}
{/if}