forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: lulu-144 on January 07, 2015, 10:27:16 am

Title: How to remove files/albums from home page of a custom theme?
Post by: lulu-144 on January 07, 2015, 10:27:16 am
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.



Title: Re: How to remove files/albums from home page of a custom theme?
Post by: allvip on January 07, 2015, 12:20:38 pm
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.


Code: [Select]
/******************************************************************************
** 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):

Code: [Select]

               <td class="tableh1" width="10%" align="center">{ALBUMS}</td>
                <td class="tableh1" width="10%" align="center">{PICTURES}</td>

then change in the above code :

Code: [Select]
                <td class="tableh1" width="80%" align="left">{CATEGORY}</td>

to:

Code: [Select]
                <td class="tableh1" width="100%" align="left">{CATEGORY}</td>

Remove  from the above code (will remove the albums, files count):

Code: [Select]
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
Title: Re: How to remove files/albums from home page of a custom theme?
Post by: allvip on January 07, 2015, 12:30:12 pm
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)
Title: Re: How to remove files/albums from home page of a custom theme?
Post by: lulu-144 on January 07, 2015, 12:45:01 pm
sadly it doesn't work..
Title: Re: How to remove files/albums from home page of a custom theme?
Post by: allvip on January 07, 2015, 03:40:17 pm
sadly it doesn't work..

I edited  Reply #1. Maybe you did not understood what I try to say.
Title: Re: How to remove files/albums from home page of a custom theme?
Post by: 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.

Code: [Select]
/******************************************************************************
** 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
******************************************************************************/
Title: Re: How to remove files/albums from home page of a custom theme?
Post by: Hanna. on January 24, 2015, 02:38:18 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.

Code: [Select]
/******************************************************************************
** 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?
Title: Re: How to remove files/albums from home page of a custom theme?
Post by: Αndré on January 24, 2015, 04:24:58 pm
http://documentation.coppermine-gallery.net/en/configuration.htm#admin_logging_display_stats_on_index