EnlargeIt! AJAX GUI for CPG 1.5.x - Page 9 EnlargeIt! AJAX GUI for CPG 1.5.x - Page 9
 

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

EnlargeIt! AJAX GUI for CPG 1.5.x

Started by Timos-Welt, January 05, 2009, 01:19:00 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DoubleYou

Hey there,

great plugin, I really love it. One small problem remains for me with the latest beta version. When I try to download a picture the download seems to work fine, but on opening the file Windows tells me the file is too big or damaged. The size seems reasonable though.

Any ideas? Tested it with various browsers (IE, FF, Opera)
Any help will be greatly appreciated.

Thanks
Michael

2andy

Where can I turn ON addthis or facebook comments in EnlargeIt plugin like shown on this site??

www.toprq.com

phill104

I believe that to be some custom code added by the site developer. It is not part of the standard plugin.
It is a mistake to think you can solve any major problems just with potatoes.

alexandregrassi

www.toprq.com

The facebook comments and sharing off this website is really awersome... I tryed to do something like that, but it not worked... Look: www.nerdzz.com/galeria

Any idea to use facebook comments like toprq.com ??

phill104

The code to do that is quite simple, you can see an example of it running on my site but not in CPG, just in normal articles - http://www.windsurf.me.uk

I will not have time until Monday but I will test the code in this plugin and see how it woks. I cannot promise a completion date though as I am snowed under.

Here is the code used in the Joomla site above, maybe you can integrate it yourself. Obviously the JURI:: section is very Joomla specific so will not work as is.

<script type="text/javascript">
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>

<div class="fb-comments" data-href="<?php echo JURI::getInstance()->toString(array('scheme''host''port')) . $this->item->readmore_link?>" data-num-posts="2" data-width="576"></div>


and the css

.fb-comments {
  clear: both;
  padding-top: 20px;
}

.fb-comments span {
  display: block !important;
}
It is a mistake to think you can solve any major problems just with potatoes.

Xtinch

Hi There,

I'm wondering if there is a way to prevent the image downloading when you perform a right click.

I've configured the image protection setting, that works for the site, but it is not working when I use the plugin.

Thanks

Martin.

bady

Hi Timos-Welt (Coppermine addict)

thanks for your plugin
but one sad thing with the Title bar: when you log off -- it shows ALWAYS (white bar)
"Show title bar when buttons are inactive" -- dosnt swich it off

cherokee

Hello.
First, sorry for my English.
Thanks for this great work.
I would ask:
Is there any way that the download button only to a specific user group appears?
Thank you.
regards

TeknoSounds

Has anyone been able to successfully add buttons to say the top bar or anywhere along the margins of the photo?

Specifically trying to add button code like addthis or addtoany.

I put the code where I think it'll cause it to show up, but nothing changes.  I guess I'm not understanding how the plugin was written well enough. 
Anyone have any suggestions?

cherokee

Hello.
Sorry for my English (google translator)
I changed the icons and the space between them.
You can see it here:
http://www.rutasytravesias.com/galeria/thumbnails.php?album=1
Note: You may see some failures, I'm trying to disable it on the main page.
Would you use?
regards

TeknoSounds

That's definitely a start cherokee :D
Where did you change the code at for the spacing?

It seems like where I attempt to put the code should show up on the screen, but alas :-/  I think I might be missing something simple like...putting the AddThis code in a definition and calling it to an element...  maybe. 

cherokee

Hello
open enlargeit.js
find:
|backgroundPosition|repeat|backgroundRepeat|3px

Modify the pixels corresponding to the left margin
greetings

Jean Michel

Hello,

This beautiful plugin does not seem to work on IE11.
In Chrome not display buttons closure and slideshow?
solutions?

thanks

Wozik

Hello,

Is there any way to create a direct link to an image, that opens up the desired gallery and the snippet windows while pasted into the browser?

gmc

I ran into a compatibility problem between 'EnlargeIt' and a plugin using the filter 'picture_url'. In my case it is the 'Mask URL' plugin - but the problem would affect any plugin that CHANGES the thumbnail URL - or wants to change the intermediate or fullsize URL.

EnlargeIt regenerates the thumbnail URL from scratch (previously generated by CPG and possibly edited by plugins) - and generates new intermediate/fullsize URL.

I made the following changes to codebase.php (based on most recent SVN version) to

  • respect any thumbnail URL changes previously made
  • invoke the pluginAPI for filter 'picture_url' after generating the intermediate/fullsize URL

In codebase.php find (line 87 at revision 7221 in function enlargeit_addparams)

    } else {
        $enl_path = $CONFIG['fullpath'] . $thumb['filepath'] . $thumb['filename'];
    }
   
    // CASE 1: images
    if (in_array($enl_filetyplower, $image_array) == TRUE) {
       $enl_newthumb  = '<img src="' . $CONFIG['fullpath'] . $thumb['filepath'] . $CONFIG['thumb_pfx'] . $thumb['filename'] . '" ';
       $enl_newthumb .= 'class="enlargeimg" ';

and replace with:

    } else {
        $enl_path = $CONFIG['fullpath'] . $thumb['filepath'] . $thumb['filename'];
    }
    // since we are creating a new picture url - drive the pluginAPI to see if anyone else cares...                                    //*GMC
    $pic_row = array('pid' => $thumb['pid'],                                    // set up parameter array for API call                 //*GMC
                     'filepath' => $thumb['filepath'],                          //   specifying those parms we have access to          //*GMC
                     'filename' => $thumb['filename'],                          //   if additional fields needed, will need to         //*GMC
                     'pwidth' => $thumb['pwidth'],                              //   add database calls                                //*GMC
                     'pheight' => $thumb['pheight'],                                                                                   //*GMC
                     'filesize' => $thumb['filesize'],                                                                                 //*GMC
                     'url' => $enl_path,                                                                                               //*GMC
                     'mode' => 'normal',                                                                                               //*GMC
                    );                                                                                                                 //*GMC
    $pic_row = CPGPluginAPI::filter('picture_url', $pic_row);                   // see if anyone else has interest                     //*GMC
    $enl_path = $pic_row['url'];                                                // use value returned from API call                    //*GMC

    // CASE 1: images
    if (in_array($enl_filetyplower, $image_array) == TRUE) {
      //obtain current url from params (other plugins may have altered from default)                                                   //*GMC
      $enl_matchfound = preg_match('/"([^"]+)"/', $params['{THUMB}'], $enl_matches);                                                   //*GMC
      if ($enl_matchfound) {                                                                                                           //*GMC
        // use url from params                                                                                                         //*GMC
        $enl_newthumb  = '<img src="' . $enl_matches[1] . '" ';                                                                        //*GMC
      } else {                                                                                                                         //*GMC
        // unable to match - generate ourselves...                                                                                     //*GMC
        $enl_newthumb  = '<img src="' . $CONFIG['fullpath'] . $thumb['filepath'] . $CONFIG['thumb_pfx'] . $thumb['filename'] . '" ';
      }                                                                                                                                //*GMC
       $enl_newthumb .= 'class="enlargeimg" ';



and find (line 102 at revision 7221 before above changes in function enlargeit_addparams)

       $enl_newthumb .= 'border="0" onclick="enlarge(this);" longdesc="' . path2url($enl_path) . '" name="' . $thumb['pid'] . '" ';

and replace with:

       // removed 'path2url' - should already be valid/safe url and this removed '=' and '?' that are valid for url query string       //*GMC
       //$enl_newthumb .= 'border="0" onclick="enlarge(this);" longdesc="' . path2url($enl_path) . '" name="' . $thumb['pid'] . '" ';  //*GMC
       $enl_newthumb .= 'border="0" onclick="enlarge(this);" longdesc="' . $enl_path . '" name="' . $thumb['pid'] . '" ';              //*GMC


These changes should have no effect if no other plugin alters the URL's generating by CPG - but may fix other compatibility issues as well...

I would have discussed with Timos - but he hasn't been online in the forums for some time...
I wanted to offer this as a solution for those encountering conflicts.

Thanks!
Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

marcelm

Thanks and in my version of EnlargeIt the lines were on other locations. I am using the last version and that is a beta 3 version from 2012. It is mentioned a page back in this thread.

direct link to the beta: http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=57424.0;attach=38731

Were can I find the 7221 SVN version so I can try the code? In the beta version the your code did not made the thumbnails visible.

gmc

Quote from: marcelm on April 20, 2015, 11:48:13 PM
Thanks and in my version of EnlargeIt the lines were on other locations. I am using the last version and that is a beta 3 version from 2012. It is mentioned a page back in this thread.

direct link to the beta: http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=57424.0;attach=38731

Were can I find the 7221 SVN version so I can try the code? In the beta version the your code did not made the thumbnails visible.
Ah well... made an assumption... I went directly to the Coppermine SVN repository (http://svn.code.sf.net/p/coppermine/code) set up with TortoiseSVN to synch code... It contained V1.15 which is same level as in the first post...

I have the beta version downloaded - I'll fit my changes and test and post results/new code as appropriate.
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

gmc

In the beta version - the line numbers changed - but I used the exact same changes...
The first change is replacing lines 73-80.
The second change is replacing line 88 (before first change is made) or line 109 (after first change is made).

I have Mask URL coded to encrypt - .htaccess set in albums folder to 'Deny from all' - and EnlargeIt set for admin, registered, and guest...

All seems to work fine...
(Without the changes - the thumbnail and enlarged displays were all blocked by the .htaccess rule as the encrypted thumb URLS were overwritten - and enlarged URLs were never encrypted.)

Can you attach your codebase.php to a post (zip it...) with the changes applied? I'd like to compare to mine if you are still having an issue...
(Try clearing your browsers cache as well... though that caught me more with it working when it shouldn't in my testing... )

Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

marcelm

Thanks Greg and your edits works now when I go back to a standard theme like "eyeball" so it was configuration that mutilated your adaptation of codebase.php.

I am using a modified version of Blankstrap (Bootstrap adaptation) and that also seems to rewrite the thumbnails strings. Also it seems to make a difference if I use not a sub-domain (www) in my configuration so I have to some looking into this why it differs. I see in the acces_log that the web-server is transferring the thumbnails and I have result 200 and size. The browser is stating that the picture "can not be displayed because it contains errors" when a sub-domain is used.

marcelm

And I already solved the mystery of the picture not showing when there is no "www" in front. I am using Blankstrap but not to administrate my site. I use the Eyeball theme for that. To be able to have in the same browser the normal site and the administration part of the site open side by side I open the administration site without the "www".

That also explains why I requested the same link in my other browser it made no difference and both times the picture was not shown.

Blankstrap is the cause for not showing the thumbnails on my side that is now for sure.