Thumbnail next to category title in custom theme. Thumbnail next to category title in custom theme.
 

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

Thumbnail next to category title in custom theme.

Started by Badegakk, January 13, 2016, 02:51:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Badegakk

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.

ΑndrĂ©

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.

Badegakk

Here is the theme file which is where the problem must be. The template.html is the design with no coding relevant to this.

Badegakk


allvip

#4
In theme.php in function $template_cat_list


<!-- 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.


<!-- 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):


<!-- 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:


<!-- 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 -->) :


        <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.

Badegakk

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?

allvip

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.

Badegakk