Advanced search  


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: Different theme in a specific category  (Read 9647 times)

0 Members and 1 Guest are viewing this topic.


  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Different theme in a specific category
« on: November 03, 2016, 02:06:09 am »

I've found this thread with a tutorial to do just that in cpg 1.4, but I assume it won't work for 1.5.
Is it possible to do that in cpg 1.5? Is there maybe a plugin or something?


  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Different theme in a specific category
« Reply #1 on: December 15, 2016, 02:28:46 pm »

This allows you do add diffrent styles or diffrent css files for every category and all the pages in it or for every category and every album.

Wrapp every subcategories in diffrent divs (dinamyc id for the body ),77231.0.html

If you really need themes for every category, I can help you with that too.
« Last Edit: December 15, 2016, 07:06:28 pm by allvip »


  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Different theme in a specific category
« Reply #2 on: December 19, 2016, 01:26:31 am »

You'll have to make a 1 line modification to include/, and then the attached plugin should provide what you want.

In CPG 1.5.44, just before line 301 in include/ (line 304 in CPG 1.6.01):
Code: [Select]
if (!file_exists('themes/'.$CONFIG['theme'].'/theme.php')) {
add the line:
Code: [Select]
$CONFIG['theme'] = CPGPluginAPI::filter('theme_name', $CONFIG['theme']);
( It's possible that line will become a permanent part of new releases )

This was put together rather quickly and not every circumstance was fully tested. Let me know whether it works okay for you.

Updated 21 Dec 2016: Sub-categories default to parent theme.
Updated 23 Feb 2017: Correct issue with meta albums.
« Last Edit: February 23, 2017, 04:21:56 pm by ron4mac »
Pages: [1]   Go Up

Page created in 0.018 seconds with 20 queries.