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
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!
That link isnt leading anywhere. Whats the code to add for enabling Admin Only View Counter, please?
fixed the above link
Ok i'm not getting it..what code would i have to wrap it around?
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
thanks, works fine
{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}
Posts: 32509
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!
Posts: 57
That link isnt leading anywhere. Whats the code to add for enabling Admin Only View Counter, please?
Posts: 25964
fixed the above link
Posts: 57
Ok i'm not getting it..what code would i have to wrap it around?
Posts: 25964
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
Posts: 57
thanks, works fine