Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Thumbnail next to category title in custom theme.  (Read 4421 times)

0 Members and 1 Guest are viewing this topic.

Badegakk

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Thumbnail next to category title in custom theme.
« 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Thumbnail next to category title in custom theme.
« Reply #1 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.
Logged

Badegakk

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Thumbnail next to category title in custom theme.
« Reply #2 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.
Logged

Badegakk

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Thumbnail next to category title in custom theme.
« Reply #3 on: January 14, 2016, 02:47:12 am »

File attached
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Thumbnail next to category title in custom theme.
« Reply #4 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.
« Last Edit: January 14, 2016, 01:40:56 pm by allvip »
Logged

Badegakk

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Thumbnail next to category title in custom theme.
« Reply #5 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?
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Thumbnail next to category title in custom theme.
« Reply #6 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.
Logged

Badegakk

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Thumbnail next to category title in custom theme.
« Reply #7 on: January 14, 2016, 03:08:44 pm »

THANK YOU SO MUCH!  :D
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.