Theme 'mobile_light' for cpg1.5.x - Page 2 Theme 'mobile_light' for cpg1.5.x - Page 2
 

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

Theme 'mobile_light' for cpg1.5.x

Started by Αndré, April 26, 2012, 02:21:40 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

allvip

#20
Quote from: netb on May 21, 2015, 01:04:48 PM
You could check this thread and adapt some of the css, for responsive images:


img {
    max-width: 100%!important;
    height: auto!important;
}


It works only for themes with divs not with tables. In my curve responsive theme I used:


.display_media .image {
    max-width: 70vw!important;
    height: auto;
}


Read all my thread with attention.

mitko

Quote from: allvip on May 21, 2015, 01:11:50 PM
It works only for themes with divs not with tables. In my curve responsive theme I used:
I tried - it works, thanks, but now title and info tables are too wide. Strange that on the thumbnails and album pages everything is okay, problems only in the single image page.

allvip


mitko


allvip

Quote from: mitko on May 21, 2015, 09:21:40 PM
I tried - it works, thanks, but now title and info tables are too wide.

I will look into it and answer tomorrow. I will try to make the image page responsive for this theme.

allvip

#25
Post deleted. Answer in Reply #27.

mitko

Well, unfortunately i'm not very good in programming  ::)
So what i did: i tried to update existing plugin to latest FB scripts. In fact i've got strange effect: in standard theme i have fb like / fb comment forms, but in mobile they were disappeared  :)
Anyway this doesn't bother me much, but another problem is that then picture navigation plugin is installed - i have a problem, but then it is deinstalled - seems all is okay. How you manage to get this plugin work well?

allvip

#27
Quote from: mitko on May 24, 2015, 08:47:01 PM
Well, unfortunately i'm not very good in programming  ::)
So what i did: i tried to update existing plugin to latest FB scripts. In fact i've got strange effect: in standard theme i have fb like / fb comment forms, but in mobile they were disappeared  :)

Ok. Ignore the link I posted How to add facebook comments with function dispaly_image not display_media: http://forum.coppermine-gallery.net/index.php/topic,76925.0.html in Reply #25.

I am going to tell you step by step how to add facebook comments (https://developers.facebook.com/docs/plugins/comments):

1) Add to mobile_light/theme.php before ?> (Replace in the code data-width="300" with the value you want 250,500 etc. Facebook comments are not responsive thats why I choosed 300) :


/******************************************************************************
** Section <<<theme_display_image>>> - START
******************************************************************************/
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG, $LINEBREAK;

    $superCage = Inspekt::makeSuperCage();

    $width = $CONFIG['picture_table_width'];

    echo '<a name="top_display_media"></a>'; // set the navbar-anchor
    starttable();
    echo $nav_menu;
    endtable();

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }


    echo $votes;
    echo '<div class="fb-comments" data-href="http://www.lightphotos.net/photos/displayimage.php?pid='.$pid.'"  data-width="300" data-numposts="3" data-colorscheme="light">';
    echo '</div>';
    $picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none');
    echo $LINEBREAK . '<div id="picinfo" style="display: '.$picinfo.';">' . $LINEBREAK;
    starttable();
    echo $pic_info;
    endtable();
    echo '</div>' . $LINEBREAK;

    echo '<a name="comments_top"></a>';
    echo '<div id="comments">' . $LINEBREAK;
        echo $comments;
        echo '</div>' . $LINEBREAK;

}
/******************************************************************************
** Section <<<theme_display_image>>> - END
******************************************************************************/


2) Add to mobile_light/template.html after <body> (without this code the facebook commets don't show):


<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


Another way
I belive you first used Social Sharing Plugin (Facebook Like/FB Share/FB Comments/Twitter/VZ zeigen) http://forum.coppermine-gallery.net/index.php/topic,70221.0.html
If you still want to use it then ignore the code above, go to plugin manager - Social Sharing (social_sharing): v1.5 - Configure plugin - under the title/caption (see attachment Configure plugin.jpg). Under the picture option adds the facebook button and comments inside the display image td. That's why the picture navigation plugin arrows go down, not on the center of the td (see attachment under the picture.jpg). Under the title/caption adds the facebook button and comments outside the display image td (see attachment under the titlecaption.jpg).

Quote from: mitko on May 24, 2015, 08:47:01 PM
another problem is that then picture navigation plugin is installed - i have a problem, but then it is deinstalled - seems all is okay. How you manage to get this plugin work well?

Is proabibly the Share plugin you use. Is inside the display media td. Should be outside. Can you post the link from where you downloaded this plugin? Does it has the option to place it under title/caption like the facebook plugin?

mitko

The difference between screenshots is only Picture Navigation plugin on and off

mitko

Gents the problem is still actual - Picture Navigation plugin doesn't works properly on mobile theme. Is it possible to disable in the theme particular plugin and keep it working in another theme?

mitko


Αndré

It's on my to-do list, but I haven't found enough spare time yet to have a closer look at the code to fix it.

mitko


Αndré


mitko

I still have minor issue with this theme. On a single-image page google reports that width of the page is 400 (it is required 375 for mobile devices). How is possible to change it?

Αndré

How/where exactly does Google report this? As far as I can see there's no fixed width set anywhere on your gallery (nor in the theme itself).

mitko

Actually i was tried to change some parameters and it is okay now. Unfortunately as i'm not the best web-developer (i think i worst) - i didn't understand what exactly helped to fix.  :o
But anyway problem is solved now.

Stulle

Hi everyone,

I finally got around to upgrade to CPG1.6.03 and - as would be expected - it crashed this nice plugin. All it took to get it working again was the replacement of two instances of mysql_result (admin.php and normal.php). I attached an updated version for your convenience.

Please note, as far as I can tell, this works flawlessly with the mobile_light theme so no need to change anything there... I guess.

Regards,
Stulle

sb5

I know the chances are slim, but by any chance is someone still looking at this? I have a couple of issues with it you see. It doesn't seem to display things in the thumbnail view very well.