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).
the first translation, portuguese.[/font]
Polish language file
I love this plugin thanks a lot :)
Added Portuguese and Polish language files in SVN revision 8386. Thank you for your contributions!
I would like to thank you a lot :)
As you gave us this product I just translate the language file to arabic (support UTF-8 Without BOM)
I couldn't attach the file.
here is the file
Arabic language file added in SVN revision 8387. Thank you for your contribution!
Here we are!
Added Italian language file in SVN revision 8429. Thank you for your contribution.
Is there a way for me to exclude the custom header include function in the mobile mode? I have a very wide banner there and would like to exclude it in a mobile view.
Quote from: timberguy on August 11, 2012, 05:30:22 PM
Is there a way for me to exclude the custom header include function in the mobile mode? I have a very wide banner there and would like to exclude it in a mobile view.
Are you using one of the mobile themes as per the as per Andre's first post above?
Yes, from the first post.
Copy the function pageheader from themes/sample/theme.php to your theme's theme.php file if it doesn't exist. Then, find
$custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
and replace with
if (defined('MOBILE_VIEW')) {
$custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
}
I don't know how the plugin works because I'm slowling working on my version (which regards the whole website and not only the gallery, so it's not a cpg-only mod), but I'd like to give a contribution.
There still are a few glitches left on the gallery only (as shown in the screenshoot, the third column images still overflow. I guess a two column layout on mobile devices would be better, but I still didn't figure out how to use 2column-layout on mobile devices only), anyway just in case, here's the conditional css syntax I used, and it seems that it can succesfully detects both iPad/iPhones, Android devices, 320x240 devices.
@media only screen and (min-device-width : 320px) and (max-device-width : 480px), only screen and (min-device-width : 480px) and (max-device-width : 800px) and (orientation : landscape), only screen and (device-width: 768px), only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5)
{
[do stuff...]
}
The plugin itself won't affect the layout. Instead, you have to choose a theme which will be displayed for mobile devices. My two example themes both force a 1 column layout (i.e. they overwrite config values).
works great, http://ogimages.com
thanks
mobile photo sharing website up in running in minutes...
adult stuff..
Hi,
Whenever I try to install the plugins after uploading it, it says:
Critical error
There was an error while processing a database query
When I upgraded to the latest version, I ran the update.php script and everything.
Coppermine version: 1.5.24
Any ideas?
Thank you.
Please enable debug mode in the Coppermine config and try again to install the plugin. Please post the extended error message.
First bit part of the red box:
http://pastebin.com/64uYUs5J
Debug info:
http://pastebin.com/7T1MgxdS
The error message you are getting:
QuoteWhile executing query 'INSERT INTO cpg14x_config (name, value) VALUES ('theme_switch_mobile_theme', 'water_drop')' in plugins/theme_switch/codebase.php on line 141
mySQL error: Duplicate entry 'theme_switch_mobile_theme' for key 'PRIMARY'
is trying to insert a setting into the config file that already exists... Either already inserted during a prior failed install, or not properly uninstalled..
You can either delete the row from cpg14x_config (via a tool like phpMyAdmin) or edit plugins/theme_switch/codebase.php on line 141 and change the INSERT to INSERT IGNORE. There may be additional inserts in same area that previously ran as well? I can't download the plugin at the moment to check. INSERT IGNORE will insert the value if it can, but tells MySQL to ignore a failure like key already exists, and continue.
Of course can't tell what your original error was, but once you get past the duplicate inserts, again post your error from debug.
(direct paste or attach preferred - as that information will remain... External links disappear and won't help others that have a similar issue in the future.)
Hi,
I just installed this plug-in (at www.antegy.com), but my mobile browser returns the error "The page isn't redirecting properly" ("Firefox has detected that the server is redirecting the request for this address in a way that will never complete."). I've also tried with Chrome browser; which doesn't work either.
Any suggestions?
Thanks!,
- Mark
Sorry! I just realized - I had the mobile theme it was to switch to in an incorrect directory. It actually works fine now. I apologize, I should have noticed that right away.
Thanks just the same :)
Hello,
Thanks a lot for this plugin! Here is a french translation file :)
French language file added in SVN revision 8749. Thank you for your contribution.
My website http://10celebs.com (http://10celebs.com) works fine with the plugin. Just that I noticed that there was redirect loop for the first few times I tried to connect site from my mobile.
Hello,
I have the same redirection loop issue.
Do you have the Cookie Consent plugin installed? It worked fine for me until I install and make the Cookie Consent active on the mobile theme as well, so I guess this is a conflict issue.
Hello,
I have looked a little bit more to this issue, and I think I can confirm there is a conflict with Cookie Consent.
The theme_switch_page_start() function in the codebase.php file calls user_save_profile() to save user data in cookie. However, this function will not set a cookie if Cookie Consent plugin is installed and if it is your first visit from a mobile device (i.e. you doesn't already have the Cookie Consent's cookie set in the browser).
Thus, it ends up in an infinite redirection loop, as it tries to run the same code and redirect again and again.
For mitko and netb I moved your posts to Theme 'mobile_light' for cpg1.5.x http://forum.coppermine-gallery.net/index.php/topic,74828.0.html (http://forum.coppermine-gallery.net/index.php/topic,74828.0.html) because are questions about the theme not about the plugin.
great plug in ... works like a charm ... thank you.