>>>How to remove view counter?<<<

urflix

Joined: 2007-01-23
Posts: 18
Posted: Mon, 2007-06-25 16:30

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2007-06-25 16:58

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

 
urflix

Joined: 2007-01-23
Posts: 18
Posted: Mon, 2007-06-25 18:25

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!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2007-06-25 18:41
Quote:
I just need to know what file to pull up and what code to change or add.

How can I tell you what file to edit if you don't give a an example or theme?
in album.tpl, change

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

to

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

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
urflix

Joined: 2007-01-23
Posts: 18
Posted: Tue, 2007-06-26 12:14

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.

 
urflix

Joined: 2007-01-23
Posts: 18
Posted: Tue, 2007-06-26 13:07

Is there a way to view the counts only when you're signed in Admin mode?

 
pratheepm

Joined: 2007-06-26
Posts: 3
Posted: Tue, 2007-06-26 16:09

Instead of flagging it as true or false, try "$user.isAdmin" (without the quotation marks, of course)

 
urflix

Joined: 2007-01-23
Posts: 18
Posted: Tue, 2007-06-26 19:10

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!

 
pratheepm

Joined: 2007-06-26
Posts: 3
Posted: Wed, 2007-06-27 01:43

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.