Album viewed x times Album viewed x times
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Album viewed x times

Started by DenisG, October 20, 2010, 10:55:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DenisG

This question has been asked directly by JPM in http://forum.coppermine-gallery.net/index.php/topic,65326.0.html but the answer does not seem to apply. Not wishing to be accused of hijacking that thread, is there an alternative answer?.
I am using 1.5.8 and my point is exactly the same, after using Cmine since 1.3 for my gallery, suddenly it appears there have been no visitors so I would prefer to lose the "Album Viewed 0 times" altogether. However, my theme is Curve_centered and in theme.php there is no {ALB_HITS} to remove. Anyone help?

Also, what happened to the total hits number that used to be at the bottom of the home page?

Best regards.

Denis.

Jeff Bailey

That solution only apply's if you already have it in your theme.php

add this

/******************************************************************************
** Section <<<$template_album_list>>> - START
******************************************************************************/
// HTML template for the album list
$template_album_list = <<<EOT

<!-- BEGIN stat_row -->
       <tr>
               <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
       </tr>
<!-- END stat_row -->
<!-- BEGIN header -->
       <tr class="tableb tableb_alternate">
<!-- END header -->
<!-- BEGIN album_cell -->
       <td width="{COL_WIDTH}%" valign="top">
       <table width="100%" cellspacing="0" cellpadding="0">
       <tr>
               <td colspan="3" height="1" align="left" valign="top" class="tableh2">
                       <span class="alblink"><a href="{ALB_LINK_TGT}">{ALBUM_TITLE}</a></span>
               </td>
       </tr>
       <tr>
               <td colspan="3">
                       <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
               </td>
       </tr>
       <tr>
               <td align="center" valign="middle" class="thumbnails">
                       <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
                       <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
               </td>
               <td>
                       <img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
               </td>
               <td width="100%" valign="top" align="left" class="tableb tableb_alternate">
                       {ADMIN_MENU}
                       <p>{ALB_DESC}</p>
                       <p class="album_stat">{ALB_INFOS}<br />{ALB_HITS}</p>
               </td>
       </tr>
       </table>
       </td>
<!-- END album_cell -->
<!-- BEGIN empty_cell -->
       <td width="{COL_WIDTH}%" valign="top">
       <table width="100%" cellspacing="0" cellpadding="0">
       <tr>
               <td height="1" valign="top" class="tableh2">
                       &nbsp;
               </td>
       </tr>
       <tr>
               <td>
                       <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
               </td>
       </tr>
       <tr>
               <td width="100%" valign="top" class="tableb tableb_alternate">
                   <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
               </td>
       </tr>
       </table>
       </td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
       </tr>
       <tr class="tableb tableb_alternate">
<!-- END row_separator -->
<!-- BEGIN footer -->
       </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
       <tr>
               <td colspan="{COLUMNS}" style="padding: 0px;">
                       <table width="100%" cellspacing="0" cellpadding="0">
                               <tr>
                                      {TABS}
                               </tr>
                       </table>
               </td>
       </tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
       <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;
/******************************************************************************
** Section <<<$template_album_list>>> - END
******************************************************************************/


and this
/******************************************************************************
** Section <<<$template_album_list_cat>>> - START
******************************************************************************/
// HTML template for the album list
$template_album_list_cat = <<<EOT

<!-- BEGIN c_stat_row -->
       <tr>
               <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
       </tr>
<!-- END c_stat_row -->
<!-- BEGIN c_header -->
       <tr class="tableb tableb_alternate">
<!-- END c_header -->
<!-- BEGIN c_album_cell -->
       <td width="{COL_WIDTH}%" valign="top">
       <table width="100%" cellspacing="0" cellpadding="0">
       <tr>
               <td colspan="3" height="1" valign="top" class="tableh2">
                       <span class="alblink"><a href="{ALB_LINK_TGT}">{ALBUM_TITLE}</a></span>
               </td>
       </tr>
       <tr>
               <td colspan="3">
                       <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
               </td>
       </tr>
       <tr>
               <td align="center" valign="middle" class="thumbnails">
                       <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
                       <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
               </td>
               <td>
                       <img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
               </td>
               <td width="100%" valign="top" class="tableb tableb_alternate">
                       {ADMIN_MENU}
                       <p>{ALB_DESC}</p>
                       <p class="album_stat">{ALB_INFOS}<br />{ALB_HITS}</p>
               </td>
       </tr>
       </table>
       </td>
<!-- END c_album_cell -->
<!-- BEGIN c_empty_cell -->
       <td width="{COL_WIDTH}%" valign="top">
       <table width="100%" cellspacing="0" cellpadding="0" >
       <tr>
               <td height="1" valign="top" class="tableh2">
                       &nbsp;
               </td>
       </tr>
       <tr>
               <td>
                       <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
               </td>
       </tr>
       <tr>
               <td width="100%" valign="top" class="tableb tableb_alternate" >
                     <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
               </td>
       </tr>
       </table>
       </td>
<!-- END c_empty_cell -->
<!-- BEGIN c_row_separator -->
       </tr>
       <tr class="tableb tableb_alternate">
<!-- END c_row_separator -->
<!-- BEGIN c_footer -->
       </tr>
<!-- END c_footer -->
<!-- BEGIN c_tabs -->
       <tr>
               <td colspan="{COLUMNS}" style="padding: 0px;">
                       <table width="100%" cellspacing="0" cellpadding="0">
                               <tr>
                                      {TABS}
                               </tr>
                       </table>
               </td>
       </tr>
<!-- END c_tabs -->
<!-- BEGIN c_spacer -->
       <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END c_spacer -->

EOT;
/******************************************************************************
** Section <<<$template_album_list_cat>>> - END
******************************************************************************/

to your theme.php. Then remove all occurrences of {ALB_HITS}

If you get errors those sections might already be in your theme.


Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

DenisG

Thanks Jeff. So same as 1.4.x, if we cant find it in our existing theme.php, find it and import it from sample theme and then edit it. Completely forgot about that bit, my apologies :-[ :-[

Many thanks.

Denis.