Author Topic: Hits and Downloads only visible for Admin?  (Read 9078 times)

0 Members and 1 Guest are viewing this topic.

Offline jinglebells

  • Newbie
  • *
  • Posts: 49
    • View Profile
Hits and Downloads only visible for Admin?
« on: October 31, 2008, 10:29:55 AM »
Without completely removing the Hits and Downloads below the pictures - how can I make them visible only to admin please?
Jinglebells

P.S.: How do I reset or clear the TOP 10 List?

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #1 on: October 31, 2008, 11:05:00 AM »
... to hide these lines for all visitors exept admins, you can use the following in your /templates/<your_template>/details.html ...
Code: [Select]
{if is_admin}
<tr>
<td valign="top" class="row2"><b>{lang_hits}</b></td>
<td valign="top" class="row2">{image_hits}</td>
</tr>
<tr>
<td valign="top" class="row1"><b>{lang_downloads}</b></td>
<td valign="top" class="row1">{image_downloads}</td>
</tr>
{endif is_admin}
« Last Edit: October 31, 2008, 02:09:17 PM by mawenzi »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline jinglebells

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #2 on: October 31, 2008, 12:08:04 PM »
Thanks a lot for the suggestion, but not working - both still visible. My details.html looks like this

Quote
<table width="100%" border="0" cellpadding="3" cellspacing="0">
                    <tr>
                            <td class="head1" valign="top" colspan="2">{image_name}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_description}</b></td>
                            <td valign="top" class="row1">{image_description}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_keywords}</b></td>
                            <td valign="top" class="row2">{image_keywords}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_date}</b></td>
                            <td valign="top" class="row1">{image_date}</td>
                          </tr>{if admin}
                          <tr>
                            <td valign="top" class="row2"><b>{lang_hits}</b></td>
                            <td valign="top" class="row2">{image_hits}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_downloads}</b></td>
                            <td valign="top" class="row1">{image_downloads}</td>
                          </tr>{endif admin}
                          <tr>
                            <td valign="top" class="row2"><b>{lang_rating}</b></td>
                            <td valign="top" class="row2">{image_rating} ({image_votes}
                              {lang_votes})</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_file_size}</b></td>
                            <td valign="top" class="row1">{image_file_size}</td>
                          </tr>
                    <tr>
                            <td valign="top" class="row2"><b>{lang_added_by}</b></td>
                            <td valign="top" class="row2">{user_name_link}</td>
                          </tr>

Any idea?
Jinglebells

Offline Mr Kennedy

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #3 on: October 31, 2008, 01:56:39 PM »
try {if is_admin} and {endif is_admin}

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #4 on: October 31, 2008, 02:11:55 PM »
@Mr Kennedy

... you are right ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline jinglebells

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #5 on: October 31, 2008, 02:48:57 PM »
nope - still stays there.........


Offline jinglebells

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #6 on: November 01, 2008, 08:38:11 AM »
Any other ideas please?

Jinglebells

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Hits and Downloads only visible for Admin?
« Reply #7 on: November 01, 2008, 08:48:28 AM »
try {if is_admin} and {endif is_admin}

Works just fine.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline jinglebells

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #8 on: November 01, 2008, 09:32:29 AM »
good morning vano and thanks a lot for reply.

I tried it that way already, but didn't work. hits and downloads are still visible.
my details.html see below

maybe there's any other file what should be overworked too?
jinglebells

p.s.: vers. 1.7.1


                       
Quote
<table width="100%" border="0" cellpadding="3" cellspacing="0">
                    <tr>
                            <td class="head1" valign="top" colspan="2">{image_name}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_description}</b></td>
                            <td valign="top" class="row1">{image_description}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_keywords}</b></td>
                            <td valign="top" class="row2">{image_keywords}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_date}</b></td>
                            <td valign="top" class="row1">{image_date}</td>
                          </tr>
                    {if is_admin}
                          <tr>
                            <td valign="top" class="row2"><b>{lang_hits}</b></td>
                            <td valign="top" class="row2">{image_hits}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_downloads}</b></td>
                            <td valign="top" class="row1">{image_downloads}</td>
                          </tr>
                    {endif is_admin}
                          <tr>
                            <td valign="top" class="row2"><b>{lang_rating}</b></td>
                            <td valign="top" class="row2">{image_rating} ({image_votes}
                              {lang_votes})</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_file_size}</b></td>
                            <td valign="top" class="row1">{image_file_size}</td>
                          </tr>
                    <tr>
                            <td valign="top" class="row2"><b>{lang_added_by}</b></td>
                            <td valign="top" class="row2">{user_name_link}</td>
                          </tr>

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #9 on: November 01, 2008, 09:37:27 AM »
Quote
p.s.: vers. 1.7.1
   
Hello,

it is advisable an update to the latest version 1.7.6 to make  :wink:

nobby


Offline jinglebells

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #10 on: November 01, 2008, 09:49:28 AM »
my fault! excuse me so much!

i found out it works, BUT only if i call up a specific picture what shows up as preview on page like
4images/details.php?image_id=3165

but hits and downloads are still visible on the MAIN SITE of the gallery .../4images/index.php and also on the previews when i call up a specific category.

what do i have to change so the hits and downloads are invisible there too? Anything within the categories.html?

jinglebells

Offline jinglebells

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Hits and Downloads only visible for Admin?
« Reply #11 on: November 01, 2008, 11:21:09 AM »
hi nobby - you're so right, I already asked for support on this here
http://www.4homepages.de/forum/index.php?topic=23171.0

Please understand that I am afraid to do an update from 1.71 to 1.76 - it's a very laaarge step from 1.71 to 1.76 and I don't want anything to be destroyed. There are 3 years of work involved into this gallery and the gallery runs without any problems until now.
And to set up the gallery the way I want it was hard work for me as a non-specialist in this field.

I would love to install 1.76 as a seperate second gallery and when it's running smothly bring my images and users over there. But I don't know how to do this.

But I think that doesn't belong here anyway.

jinglebells