Hi guys, so I have a custom theme for my gallery and I was wondering how to delete the album number and the files from the home page?
Thanks.
All functions can be found in themes/sample/theme.php.
Open themes/your_theme_name/theme.php and paste this code (is function $template_cat_list). Make sure is not already in themes/your_theme_name/ theme.php.
/******************************************************************************
** Section <<<$template_cat_list>>> - START
******************************************************************************/
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
<tr>
<td class="tableh1" width="80%" align="left">{CATEGORY}</td>
<td class="tableh1" width="10%" align="center">{ALBUMS}</td>
<td class="tableh1" width="10%" align="center">{PICTURES}</td>
</tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
<tr>
<td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>
</tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
<tr>
<td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>
<td class="catrow" align="center">{ALB_COUNT}</td>
<td class="catrow" align="center">{PIC_COUNT}</td>
</tr>
<tr>
<td class="tableb tableb_alternate" colspan="3">{CAT_ALBUMS}</td>
</tr>
<!-- END catrow -->
<!-- BEGIN footer -->
<tr>
<td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
</tr>
<!-- END footer -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
/******************************************************************************
** Section <<<$template_cat_list>>> - END
******************************************************************************/
and remove from the above code (will remove albums,files title text):
<td class="tableh1" width="10%" align="center">{ALBUMS}</td>
<td class="tableh1" width="10%" align="center">{PICTURES}</td>
then change in the above code :
<td class="tableh1" width="80%" align="left">{CATEGORY}</td>
to:
<td class="tableh1" width="100%" align="left">{CATEGORY}</td>
Remove from the above code (will remove the albums, files count):
<td class="catrow" align="center">{ALB_COUNT}</td>
<td class="catrow" align="center">{PIC_COUNT}</td>
If you want Categories in two columns too, then check http://forum.coppermine-gallery.net/index.php/topic,70393.0.html (http://forum.coppermine-gallery.net/index.php/topic,70393.0.html)
sadly it doesn't work..
Quote from: lulu-144 on January 07, 2015, 12:45:01 PM
sadly it doesn't work..
I edited Reply #1. Maybe you did not understood what I try to say.
More simple:
Open themes/your_theme_name/theme.php and paste this code (is function $template_cat_list). Make sure is not already in themes/your_theme_name/ theme.php.
/******************************************************************************
** Section <<<$template_cat_list>>> - START
******************************************************************************/
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
<tr>
<td class="tableh1" width="100%" align="left">{CATEGORY}</td>
</tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
<tr>
<td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>
</tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
<tr>
<td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>
</tr>
<tr>
<td class="tableb tableb_alternate" colspan="3">{CAT_ALBUMS}</td>
</tr>
<!-- END catrow -->
<!-- BEGIN footer -->
<tr>
<td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
</tr>
<!-- END footer -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
/******************************************************************************
** Section <<<$template_cat_list>>> - END
******************************************************************************/
Quote from: allvip on January 07, 2015, 03:42:04 PM
More simple:
Open themes/your_theme_name/theme.php and paste this code (is function $template_cat_list). Make sure is not already in themes/your_theme_name/ theme.php.
/******************************************************************************
** Section <<<$template_cat_list>>> - START
******************************************************************************/
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
<tr>
<td class="tableh1" width="100%" align="left">{CATEGORY}</td>
</tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
<tr>
<td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>
</tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
<tr>
<td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink">{CAT_TITLE}</span>{CAT_DESC}</td></tr></table></td>
</tr>
<tr>
<td class="tableb tableb_alternate" colspan="3">{CAT_ALBUMS}</td>
</tr>
<!-- END catrow -->
<!-- BEGIN footer -->
<tr>
<td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
</tr>
<!-- END footer -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
/******************************************************************************
** Section <<<$template_cat_list>>> - END
******************************************************************************/
Works perfectly, THANK U.
I wonder though, is it possible to get the parameters "Albums: xxx, Files: xxx" at the end of the category-area?
http://documentation.coppermine-gallery.net/en/configuration.htm#admin_logging_display_stats_on_index