forum.coppermine-gallery.net

Support => cpg1.6 plugins => cpg1.6.x Support => cpg1.6 plugin contributions => Topic started by: Αndré on January 12, 2019, 11:03:57 pm

Title: Theme switch (mobile mode) plugin for cpg1.6.x
Post by: Αndré on January 12, 2019, 11:03:57 pm
This is the cpg1.6.x and PHP7 compatible version of the Theme switch (mobile mode) plugin.

This plugin will automatically detect mobile devices and will display Coppermine with a different (preferably optimized for mobile devices) theme. Additionally, if a mobile device is detected, a new button will be displayed to let the user choose to switch between the "normal" and "mobile" view.

1.) Upload and install the plugin as described in the docs (http://documentation.coppermine-gallery.net/en/plugins.htm#plugin_manager)
2.) Open the plugin's configuration screen (you can find it in the plugin's box at the plugin manager after you installed the plugin) and choose a proper theme.

For a start I created two mobile themes, mobile_light (http://forum.coppermine-gallery.net/index.php/topic,74828.0.html) and mobile_dark (http://forum.coppermine-gallery.net/index.php/topic,74829.0.html).
Title: Re: Theme switch (mobile mode) plugin for cpg1.6.x
Post by: byloom on August 07, 2019, 08:14:38 am
Hello,

i have installed this plug in for mobile, and i downloaded the two themes, dark and white one, but when i go to the manager area of the plug in button from plugin section, i see only the standard plug them and not the mobile one...could you help please

Thanks
Title: Re: Theme switch (mobile mode) plugin for cpg1.6.x
Post by: jimbo123 on January 08, 2020, 04:22:48 pm
byloom, not sure if you got a reply to this or not. You need to actually physically put the two themes mentioned in the main coppermine theme directory via ftp or similar method of upload. There are also questions over permissions regarding that directory and the theme is inherant to allowing the whole plugin to work. Otherwise without using one of those two themes or your own based upon those two themes the plugin wont work. At least in my experience.
Once you have copied the two themes to the theme directory you should be able to chose it from the drop down in the theme config.
Title: Re: Theme switch (mobile mode) plugin for cpg1.6.x
Post by: allvip on August 07, 2020, 12:38:41 pm
Debug \plugins\theme_switch\codebase.php

Code: [Select]
    Warning line 43: strtolower() expects exactly 1 parameter, 2 given
    Warning line 43: strpos() expects at least 2 parameters, 1 given
Title: Re: Theme switch (mobile mode) plugin for cpg1.6.x
Post by: allvip on August 07, 2020, 01:09:53 pm
with water drop theme +1 error

Code: [Select]
Notice line 99: Undefined variable: lang_plugin_theme_switch
Title: Re: Theme switch (mobile mode) plugin for cpg1.6.x
Post by: phill104 on June 04, 2022, 03:02:46 pm
A later PHP8 compatible version can be found here - https://forum.coppermine-gallery.net/index.php/topic,79377.0.html