forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: Badegakk on January 13, 2016, 02:51:08 am

Title: Thumbnail next to category title in custom theme.
Post by: Badegakk on January 13, 2016, 02:51:08 am
Because I have a custom coded theme for some reason the icon next to the category is not showing up because it must be overwritten by something else.
In which file can this coding be found and can I ask someone to take a look at it for me?
I understand that it only works where there is only albums inside a single category and not on the main page. It works on the others theme, but not this particular one I'm using.
Title: Re: Thumbnail next to category title in custom theme.
Post by: Αndré on January 13, 2016, 04:18:05 pm
If it's an issue with your custom theme, please attach the whole theme as zip file to your next reply, so we can have a look at test ourselves.
Title: Re: Thumbnail next to category title in custom theme.
Post by: Badegakk on January 14, 2016, 02:45:39 am
Here is the theme file which is where the problem must be. The template.html is the design with no coding relevant to this.
Title: Re: Thumbnail next to category title in custom theme.
Post by: Badegakk on January 14, 2016, 02:47:12 am
File attached
Title: Re: Thumbnail next to category title in custom theme.
Post by: allvip on January 14, 2016, 01:26:44 pm
In theme.php in function $template_cat_list

Code: [Select]
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb cat-camera" colspan="0"><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 -->

Is for empty category, for category with no albums.

Code: [Select]
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow cat-camera" align="left"><table border="0"><tr><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>
<!-- END catrow -->

Is for category with albums.
Here you made a mistake (you forgot to add {CAT_THUMB} in the code):

Code: [Select]
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow cat-camera" align="left"><table border="0"><tr><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>
<!-- END catrow -->

SHOULD BE:

Code: [Select]
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow cat-camera" 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>
<!-- END catrow -->

You also removed from the function (the code before <!-- END catrow -->) :

Code: [Select]
        <tr>
            <td class="tableb tableb_alternate" colspan="3">{CAT_ALBUMS}</td>
        </tr>

Is not a bad ideea but is not necessary as you can hide the category albums from coppermine config: Album list view - Show first level album thumbnails in categories - uncheck it.

BTW You can find all the coppermine functions (including <<<$template_cat_list>>>) in themes/sample/theme.php. Anytime you need to change something in your theme you copy the function responsable for the code you need to change from themes/sample/theme.php to your theme.php and start editing the code to make it look the way you want.
Title: Re: Thumbnail next to category title in custom theme.
Post by: Badegakk on January 14, 2016, 02:40:03 pm
Hi. I am completely blank to all this. I have not done anything, I bought the theme online.
I appreciate you trying to explain all this to me but I am confused. The codes you show me, is that the code to be replaced as second?

The first code you list is going to be replaced by the second code you list? or? Can I pay you to send me the working theme.php file instead?
Title: Re: Thumbnail next to category title in custom theme.
Post by: allvip on January 14, 2016, 02:54:41 pm
Replace your theme.php with the one I attached.
Also remember to go to Config - Album list view - Show first level album thumbnails in categories - uncheck it.
Title: Re: Thumbnail next to category title in custom theme.
Post by: Badegakk on January 14, 2016, 03:08:44 pm
THANK YOU SO MUCH!  :D