Can I enable View Counter only for admin?

voyager

Joined: 2009-01-06
Posts: 13
Posted: Thu, 2010-09-16 02:35

I'm using Gallery 2. Is it possible to enable view counter only for admin? If yes, could you tell me how?

Eric

 
eliz82

Joined: 2009-11-06
Posts: 71
Posted: Sun, 2010-09-19 17:45

probably you can do that by editing your ItemInfo.tpl from core directory.

replace this: {g->text text="Views: %d" arg1=$item.viewCount}
with: {if $user.isAdmin }{g->text text="Views: %d" arg1=$item.viewCount}{/if}

then clear you template cache.

i did not tested but i have use this method to the sizelimit module and worked.

 
Romany4
Romany4's picture

Joined: 2010-02-04
Posts: 9
Posted: Sat, 2010-09-25 15:35

eliz82 Thanks, it's works