EnlargeIt! (AJAX user interface for CPG 1.4.x) - Page 7 EnlargeIt! (AJAX user interface for CPG 1.4.x) - Page 7
 

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 user interface for CPG 1.4.x)

Started by Timos-Welt, June 16, 2008, 06:19:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Timos-Welt

Just released v2.0 beta 8.

Changes since beta 7:
---------------------

- flash files now unload correctly in IE
- fixed: pic views are not counted in admin mode anymore
- fixed: plugin didn't work correctly when set title bar to no
- tested to work fine with google chrome beta

Have fun!
Timo

Hein Traag

#121
Again, great plugin Timos.

One little thing to fix.. configuration file says "$version='2.0beta7';"

Cheers
Hein

p.s. added updated dutch.php file

Timos-Welt

Thanks I've changed the version number in the archive, please re-download. Language file will go into next beta.

Timos-Welt

Just released v2.0 beta 9.

Changes since beta 8:
---------------------

- improved dutch language file (thanks Hein)
- very first experimental version of a comment AJAX snippet

Please note regarding the comment AJAX snippet: No smileys yet, no edit button yet, no report to admin button yet, posted comments will be redirected to the intermediate page, layout is taken from CPG theme instead of enl_styles.css, no Captcha support yet. This feature is simply NOT ready for productive usage. I was begged a lot to release this by some users, because they really really want this and need this - see if you can live with it as it is, and please report in this thread if it works for you. I simply don't know when I'll have the time to complete it. Therefore I recommend to not upload enl_comment.php and enl_addcomment.php to your server, and leave the setting for comment button set to 'No'. Thanks for understanding.

Have fun!
Timo

Timos-Welt

Just released v2.0 beta 10.

Changes since beta 9:
---------------------

- changed onmousedown back to onclick (better compatibility with several exotic / older browsers)
- removed unused redundant stuff from enl_addcomment.php
- removed unused graphic files from js directory
- fixed a bug in slider plugin that lead to invalid XHTML (double IDs) if not enough pics available, new slider plugin version is 2.09
- comment function is now turned off by default, because it's still alpha

Have fun!
Timo

streetart

can the comment function display the avatar beside the comment with a link to the profile?

Timos-Welt


streetart

no..there is no avatar

I have a mistake when I write a comment, they skip on the normal view page...(displayimage.php) without the enlargeit...


ronronmx

Hi Timos!
I have been using your plugin for a while now and I love it! I have a problem with the latest version tho!

Here's a link to the gallery: http://stephanroncada.com/cpg/index.php

I just upgraded cpg to 1.4.19 and did a fresh install of the Enlargeit plugin, as well as the slider and image flow plugins.
I have a problem with Enlargeit tho, it only works with the slider and image flow pictures, but not on the other ones, they still take me to the intermediate page. I have set the options below:

Enable EnlargeIt! in admin mode    - Yes   
Enable EnlargeIt! for registered users   - Yes   
Enable EnlargeIt! for guests     - Yes

But still no enlargeit on my regular album thumbs. I should mention that I'm using a custom theme and my gallery is bridged with Joomla 1.5.6 using Medhi's bridge. Do you have any idea what I'm doing wrong? Thx a lot for your time and hard work!

Stephane

Timos-Welt

I have no idea, but here's why it doesn't work:

EnlargeIt looks for a certain pattern via regular expression, and that's

#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage.php\?(.*)\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*width=\"(.*)\"\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i

Here's what is found in your html:

<!-- BEGIN enlargeit --><a onclick="" href="displayimage.php?album=random&amp;cat=5&amp;pos=-117"><img src="albums/userpics/10002/5/thumb_laughlin_sunday_448.jpg" class="image"  height="80" border="0" alt="laughlin_sunday_448.jpg" title="Dateiname : laughlin_sunday_448.jpg
Dateigröße : 124KB
Abmessungen : 800x533
hinzugefügt am : 26.Juni 2008"/><br /></a><!-- END enlargeit -->


The attribute width of the thumbnail picture is missing in your HTML, so EnlargeIt won't find any matches. Either modify your html, or modify the regular expression.

regards
Timo

ronronmx

Quote from: Timos-Welt on September 13, 2008, 10:43:08 PM
I have no idea, but here's why it doesn't work:

EnlargeIt looks for a certain pattern via regular expression, and that's

#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage.php\?(.*)\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*width=\"(.*)\"\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i

Here's what is found in your html:

<!-- BEGIN enlargeit --><a onclick="" href="displayimage.php?album=random&amp;cat=5&amp;pos=-117"><img src="albums/userpics/10002/5/thumb_laughlin_sunday_448.jpg" class="image"  height="80" border="0" alt="laughlin_sunday_448.jpg" title="Dateiname : laughlin_sunday_448.jpg
Dateigröße : 124KB
Abmessungen : 800x533
hinzugefügt am : 26.Juni 2008"/><br /></a><!-- END enlargeit -->


The attribute width of the thumbnail picture is missing in your HTML, so EnlargeIt won't find any matches. Either modify your html, or modify the regular expression.

regards
Timo

Timos,
thx a lot for such a quick reply! The attribute width of the thumbnail picture is missing because I am using "Height" for the "Use dimension ( width or height or Max aspect for thumbnail )" option, instead of using "Width" or "Max Aspect". Can I change the regular expression to look for thumb height instead of thumb width, and if yes, where do I find and modify this expression?

Thx a lot for your time...

Timos-Welt


ronronmx

Quote from: Timos-Welt on September 14, 2008, 07:31:55 PM
You'll find it in codebase.php.

Timos, sorry to bug you again but I found the lines I need to change in codebase.php but I'm not sure what to change exactly. Here's what I'm looking at:


at line 329:
// get search string depending on SEF or not
  if (!$ENLARGEITSET['enl_sefmode']) $ausdruck = "#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage.php\?(.*)\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*width=\"(.*)\"\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i";
  else $ausdruck = "#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage-(.*)\.html\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*width=\"(.*)\"\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i";


Are those the right lines I need to change? ( width=\"(.*)\"\s*height=\"(.*)\"\s ? ) and if yes, what am I supposed to change them to?
The other lines I found are:


at line 277:
<!-- BEGIN thumb_cell -->
        <td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">


and:


at line 404:
$neu_str .= '" border="0" width="'.$match[4].'" height="'.$match[5].'" name="'.$CURRENT_PIC_DATA['pid'].'" class="enlargeimg" onclick="enlarge(this);" alt="'.$CURRENT_PIC_DATA['title'].'" id="enl'.$i.'" title="" /><br /></a>';


Again sorry to bug you but I tried a few things and couldn't get it to work so far. If you could help me out with this I would really appreciate it, but if not I understand n/p!
Thx for your time  :)

Stephane

Timos-Welt

Yes that's the right place. I'm afraid I'm not an expert in regular expressions, either - it took me many hours to get this one working. You'll find many tutorials on the web.

I'd start with this:

Change
if (!$ENLARGEITSET['enl_sefmode']) $ausdruck = "#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage.php\?(.*)\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*width=\"(.*)\"\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i";
to
if (!$ENLARGEITSET['enl_sefmode']) $ausdruck = "#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage.php\?(.*)\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i";
and
$neu_str .= '" border="0" width="'.$match[4].'" height="'.$match[5].'" name="'.$CURRENT_PIC_DATA['pid'].'" class="enlargeimg" onclick="enlarge(this);" alt="'.$CURRENT_PIC_DATA['title'].'" id="enl'.$i.'" title="" /><br /></a>';
to
$neu_str .= '" border="0" height="'.$match[4].'" name="'.$CURRENT_PIC_DATA['pid'].'" class="enlargeimg" onclick="enlarge(this);" alt="'.$CURRENT_PIC_DATA['title'].'" id="enl'.$i.'" title="" /><br /></a>';

No idea if this works, please try out.

Timos-Welt

Just released v2.0 beta 11.

Changes since beta 10:
---------------------
- fixed a bug in ImageFlow plugin (ugly selections with firefox 3)


Seems that Firefox 3 has a new feature to select/highlight multiple parts of a web page at once. Had to update the imageflow*.js files accordingly.

Have fun!
Timo

Lolik

Timos,

in codebase.php you use
$enl_path = 'albums/'.
number of times, which assumes standard location of images.

Correct way would be
$enl_path = $CONFIG['fullpath'].


At the same time, I can't it work at one of the galleries: http://images.plast.org.ua/thumbnails.php?album=77. Any idea why? It uses a trick with domain alias and RewriteRule, thought everything else works fine

Timos-Welt

AFAIK ./albums/ is the standard location for the pic files?

Your thumb images have no height, that's the reason why EnlargeIt! doesn't find any matches.

ronronmx

Quote from: Timos-Welt on September 15, 2008, 11:48:34 AM
Yes that's the right place. I'm afraid I'm not an expert in regular expressions, either - it took me many hours to get this one working. You'll find many tutorials on the web.

I'd start with this:

Change
if (!$ENLARGEITSET['enl_sefmode']) $ausdruck = "#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage.php\?(.*)\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*width=\"(.*)\"\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i";
to
if (!$ENLARGEITSET['enl_sefmode']) $ausdruck = "#<!-- BEGIN enlargeit -->\s*<a\s*onclick=\"\"\s*href=\"displayimage.php\?(.*)\">\s*<img\s*src=\"(.*?)thumb_(.*?)\"\s*.*\s*height=\"(.*)\"\s*border=\".*\"\s*.*\s*alt=\"(.*?)\"\s*title=\".*\n.*\n.*\n.*?\"\s*/><br /></a><!-- END enlargeit -->#i";
and
$neu_str .= '" border="0" width="'.$match[4].'" height="'.$match[5].'" name="'.$CURRENT_PIC_DATA['pid'].'" class="enlargeimg" onclick="enlarge(this);" alt="'.$CURRENT_PIC_DATA['title'].'" id="enl'.$i.'" title="" /><br /></a>';
to
$neu_str .= '" border="0" height="'.$match[4].'" name="'.$CURRENT_PIC_DATA['pid'].'" class="enlargeimg" onclick="enlarge(this);" alt="'.$CURRENT_PIC_DATA['title'].'" id="enl'.$i.'" title="" /><br /></a>';

No idea if this works, please try out.

Timos,
Thx for your help! I tried your suggestion above but couldn't get it to work. What I have noticed is that it only works when I set "Use dimension ( width or height or Max aspect for thumbnail )" to "Max Aspect", I tried to set it on "Width" to see if it would also work just for testing purposes and it doesn't either, just like when I set it to "Height".

Do you have any other suggestion? If not, no big deal, I'll just stick to "Max Aspect"  ;)

It would be great if you could figure out how to make it work with "Height" only or "Width" only for your next release, I think a lot of people would find it useful, I know I would  :D

Again, thx for your time and the great plugin!
Stephane

ronronmx

One thing I forgot to ask you...when I right click on a picture, it closes it the same way it does when I left click on it! I don't know why it does that, it's probably gonna confuse people that right click to save the picture to their computer! How can I make enlargeit stay open when right-clicking on the picture?

Thanks...
Stephane