Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Different theme in a specific category  (Read 1410 times)

0 Members and 1 Guest are viewing this topic.

biellebrunner

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
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?
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1290
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 ) http://forum.coppermine-gallery.net/index.php/topic,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 »
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 705
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/init.inc.php, and then the attached plugin should provide what you want.

In CPG 1.5.44, just before line 301 in include/init.inc.php (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 »
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 21 queries.