4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: jinglebells on October 31, 2008, 10:29:55 AM

Title: Hits and Downloads only visible for Admin?
Post by: jinglebells 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?
Title: Re: Hits and Downloads only visible for Admin?
Post by: mawenzi 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}
Title: Re: Hits and Downloads only visible for Admin?
Post by: jinglebells 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
Title: Re: Hits and Downloads only visible for Admin?
Post by: Mr Kennedy on October 31, 2008, 01:56:39 PM
try {if is_admin} and {endif is_admin}
Title: Re: Hits and Downloads only visible for Admin?
Post by: mawenzi on October 31, 2008, 02:11:55 PM
@Mr Kennedy

... you are right ...
Title: Re: Hits and Downloads only visible for Admin?
Post by: jinglebells on October 31, 2008, 02:48:57 PM
nope - still stays there.........

Title: Re: Hits and Downloads only visible for Admin?
Post by: jinglebells on November 01, 2008, 08:38:11 AM
Any other ideas please?

Jinglebells
Title: Re: Hits and Downloads only visible for Admin?
Post by: V@no on November 01, 2008, 08:48:28 AM
try {if is_admin} and {endif is_admin}

Works just fine.
Title: Re: Hits and Downloads only visible for Admin?
Post by: jinglebells 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>
Title: Re: Hits and Downloads only visible for Admin?
Post by: nobby 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

Title: Re: Hits and Downloads only visible for Admin?
Post by: jinglebells 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
Title: Re: Hits and Downloads only visible for Admin?
Post by: jinglebells 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