[SOLVED]cant' remove "view count"

AVSF

Joined: 2005-11-22
Posts: 40
Posted: Fri, 2005-12-16 15:31

I can't remove the "view count" which appear below each item and each album, even if I uncheked it in Site admin/Image block/Show.
Can somebody please help me?
Thank you

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-12-16 16:21

you'll have to edit
themes/matrix/templates/album.tpl
or modules/core/templates/blocks/ItemInfo.tpl

 
AVSF

Joined: 2005-11-22
Posts: 40
Posted: Mon, 2005-12-19 08:49

Thank you for the info... But what should I remove or modify in this file? I'm sorry I'm no coder, when I remove lines weirds things happen!!
Thanks again

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-12-19 10:51

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"}
 
AVSF

Joined: 2005-11-22
Posts: 40
Posted: Mon, 2005-12-19 12:36

Thank you, but when I'm changing these lines, when I click on an album or an image I get a 404 error message:
"Not found. The requested document was not found on this server".
Am I missing something?
Thank you again

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2005-12-19 13:32

It shouldn't do that. I did notice a small error with valiant's post where he used [/close] instead of [/code]. Make sure you just change the true to false. If you're on Windows try using Notepad and not some other editor to edit the file.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
AVSF

Joined: 2005-11-22
Posts: 40
Posted: Mon, 2005-12-19 14:17

Thank you but I just added the line "showViewCount=false"... and still get the same error message (when you edit and save it in the notepad, what do you choose "unicode" or something else?)... Moreover, this is not removing the view count!!
In this file I noticed that this code appears a few lines below

Quote:
{g->block type="core.ItemInfo"
item=$child
showDate=true
showOwner=$showOwner
showSize=true
showViewCount=true
showSummaries=true
class="giInfo"}

Shall I also change the "true" in false" here?
Thank you for your help

 
AVSF

Joined: 2005-11-22
Posts: 40
Posted: Mon, 2005-12-19 14:52

allright I found what was wrong... Firstly you were right, use the notepad and not dreamweaver.... Secondly I changed the line Valiant told me

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

and I also changed the "true" in "false" in the block

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

This is all working, can't explain why but thank you very much for your advices ;)

 
urflix

Joined: 2007-01-23
Posts: 18
Posted: Fri, 2008-12-05 07:20

Great post. Easy fix. Thanks.

 
Defcon

Joined: 2006-08-16
Posts: 28
Posted: Mon, 2010-10-25 04:53

Hye all!

I also want to remove "view count" on my Gallery2. I using gallery-2.3.1-typical-en , i can found themes/matrix/templates/album.tpl and edit to:

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

But i didnt find modules/core/templates/blocks/ItemInfo.tpl for

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

But i found & delete this portion

  {if !empty($showViewCount) && $item.viewCount > 0}
  <div class="viewCount summary">
    {g->text text="Views: %d" arg1=$item.viewCount}
  </div>
  {/if}

But nothing is happen. can someone advice me please?

Thanxs