Hi all,
I just upgraded to the newest gallery. Can someone please tell me exactly how I can remove the view counter? If you unclick it in the image block, it'll still show.
Everything I've searched so far were in reference to the older galleries. A lot of what I found was to change the coding, but with the newer upgrade/version, the coding is not the same.
Please help!
Thanks
Posts: 27300
There is a few place where there is a view counter. Some themes have a option to turn them off some have them hard coded.
Can you point me to an example where you want to remove this counter?
URL? Theme? location, page?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
Hello Dave,
I would like them removed completely so it's not viewable at all.
The view counter that's under the albums that is.
I believe it is hard coded because when you un-check view counter and save, it still shows. I've read that this is a common problem even with the older versions of the gallery.
I just need to know what file to pull up and what code to change or add.
Thanks!
Posts: 27300
How can I tell you what file to edit if you don't give a an example or theme?
in album.tpl, change
to
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
I've located album.tpl and opened it up in notepad.
I then found where it said, showViewCount-true and I changed that to false.
It works now, but before changing it from true to false, I actually added, showViewCount-false toward the top of the code:
--------------------------------------------------------------------
{if !empty($theme.item.description)}
<p class="giDescription">
{$theme.item.description|markup}
</p>
{/if}
</td>
<td style="width: 30%">
{g->block type="core.ItemInfo"
item=$theme.item
showDate=true
showSize=true
showViewCount=false <------This is where I added it.>
showOwner=$theme.params.showAlbumOwner
--------------------------------------------------------------------
So after added showViewCounter=false, I also changed it toward the bottom to false.
Are there suppose to be two areas where this code appears within the same script?
Heck, it's working but I just wanted to make sure....
Sorry I'm pretty new to this stuff. Thanks for the help in advance.
Posts: 18
Is there a way to view the counts only when you're signed in Admin mode?
Posts: 3
Instead of flagging it as true or false, try "$user.isAdmin" (without the quotation marks, of course)
Posts: 18
Hello pratheepm,
Can you please explain a little more in detail?
Please correct me if I'm wrong:
1. Where it says showViewCount=false, replace the 'true' with $user.isAdmin ????
2. Remove the other showViewCount=false; remember I have that in two different parts of the script.
Thanks!
Posts: 3
As Dave mentioned earlier, it is kind of difficult to explain when you don't mention which theme that you're trying to modify.
I would suggest that you change the ViewCount to showViewCount=$user.isAdmin wherever it appears on album.tpl (that way you cannot go wrong). Otherwise, do a bit of trial & error by completely changing one of them to showViewCount=false so that it will never appear even when you are logged in, but leave the other one as mentioned above so you will see the view count when you are logged in as administrator.