Different theme in a specific category Different theme in a specific category
 

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

Different theme in a specific category

Started by biellebrunner, November 03, 2016, 02:06:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

biellebrunner

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?

allvip

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

ron4mac

#2
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):
if (!file_exists('themes/'.$CONFIG['theme'].'/theme.php')) {

add the line:
$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.