Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 3 [4] 5 6 7 8 ... 10   Go Down

Author Topic: EnlargeIt! AJAX GUI for CPG 1.5.x  (Read 125074 times)

0 Members and 1 Guest are viewing this topic.

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #60 on: November 23, 2009, 02:18:57 pm »

In codebase.php, change

Code: [Select]
var enl_gifpath = 'images/';
to

Code: [Select]
var enl_gifpath = 'plugins/enlargeit/images/';
and it works. But it still doesn't work an album list page.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #61 on: November 24, 2009, 09:59:01 am »

The following issue seems to be present inside the original code
  • Rounded corners don't seem to work with border background images

At last I have made a breakthrough, correcting several smaller issues that kept the plugin from working as expected. The issue Timo brought up, with the plugin not working on meta albums on index pages still exists (maybe related to the switch from pos to pid when going from cpg1.4.x to cpg1.5.x), but apart from that major issue and the fact that several minor features don't work exactly as expected, the plugin has gone from alpha to beta stage now (with rev. 6778). That's why I have counted the version count up to v1.0. Right now, the plugin is as much dev-only as the entire cpg1.5.x package: those who know their way around are welcome to use it at their own risk. I will add it to a live gallery soon where all the experimental stuff goes to.

I'd really appreciate your feedback.

Joachim
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4483
    • Windsurf.me
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #62 on: November 24, 2009, 10:31:09 am »

I like the new admin interface. Seem to fit in better with the overall look of coppermine. Padding around many of the boxes is not quite right in IE8 (bloody m$ >:() and the bbcode still cannot be copied in IE (bloody m$ again  >:() but apart from thost things it is really coming together.

I've attached a screenshot of the padding problem in IE. At least I see the very small gap to the right of the numerical dropdowns as untidy but you may disagree.

I have it on a live server as I am happy to test on that one http://www.windsurf.me.uk/cpg133
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #63 on: November 24, 2009, 10:32:32 am »

The following issue seems to be present inside the original code
  • Rounded corners don't seem to work with border background images

Please see EnlargeIt! documentation page 8 enl_brdround.

Issues I found:
- snippet add to favourites gives a critical error page
- snippet download of file doesn't work at all
- histogramm isn't viewed
- 'maximize as popup' doesn't work
- doesn't work an album list page because of these lines in codebase.php
Code: [Select]
$enlargeit_pages_array = array('thumbnails.php');
if (in_array($CPG_PHP_SELF, $enlargeit_pages_array) == TRUE) {
I'd replace this by
Code: [Select]
 if ((defined('INDEX_PHP') && !defined('DISPLAYIMAGE_PHP')) || defined('THUMBNAILS_PHP')) {
- transparent AJAX loader ani is taken from theme, looks really ugly in my eyes and isn't visible good enough
- copyright on plugin page: I changed my name this year, see here

What I really love is your config page, it is incredibly user friendly and looks fantastic.

My testbed (doesn't work well). Here's the cpg1.4.x version in productive usage (works).
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4483
    • Windsurf.me
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #64 on: November 24, 2009, 10:41:16 am »


Issues I found:
- snippet add to favourites gives a critical error page
- snippet download of file doesn't work at all
- histogramm isn't viewed
- 'maximize as popup' doesn't work

Odd, all those snippets are working fine for me on the above intall
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #65 on: November 24, 2009, 11:00:55 am »

Funny - the attached 1.0 version from Joachim's posting didn't work for me. Just tried the latest SVN. Histogramm and Favorites buttons work now. Download still doesn't work.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #66 on: November 25, 2009, 04:36:24 pm »

Only a couple of minor issues. There is currently no button to return a pic from fullsize to intermediate ( minimize?).
I agree that this would really be a cool feature. @Timo: any plans to implement that?

In enl_bbcode.php, there's this line:

Code: [Select]
if (eregi("MSIE",$_SERVER['HTTP_USER_AGENT'])) $isie = 1;
I think it must have something to do with Inspekt / superglobals. Seems as this line must be changed somehow...
Fixed.

The following issue seems to be present inside the original code
  • Rounded corners don't seem to work with border background images
Please see EnlargeIt! documentation page 8 enl_brdround.
Hehe, I agree that I have deserved to be told to RTFM, but in this aspect I don't think you're right (apart from the fact that the section is on page 7 for me). I understand that rounded corners are a gimmick that only work with particular browsers. Of course I was using one of those supported browsers when I wrote my bug report: what I was trying to say that the rounded corners work fine if you use a monochrome background, but stops working when using a background image. I'm not sure if this is a bug in the script or a missing feature or a known issue for the entire rounded-corners-technology; it's just meant as a report, that's all. There is no note in the docs you refered to about this, that's why I don't think that your mentioning the docs applies in this aspect.

- snippet add to favourites gives a critical error page
can not replicate

- snippet download of file doesn't work at all
Haven't looked into the download feature yet, but it certainly needs reviewing. I'll do so as soon as I've finished working on the open histogram issues.

- histogramm isn't viewed
Can't replicate

- 'maximize as popup' doesn't work
I'm aware of that - see my note on the admin screen: the feature is needlessly complicated, as we already have the corresponding permission flags built-into the core. That's why I'll need to look into this feature to make it work flawlessly both with coppermine as well as for your standalone version.

- doesn't work an album list page because of these lines in codebase.php
Changed that, but not in the way you proposed. Using
Code: [Select]
if ((defined('INDEX_PHP') && !defined('DISPLAYIMAGE_PHP')) || defined('THUMBNAILS_PHP')) { is a very bad idea: those constants exist for the sake of i18n only. They are not unique. To determine what file you're in, use $CPG_PHP_SELF. Under no circumstances should you use the code you proposed.

- transparent AJAX loader ani is taken from theme, looks really ugly in my eyes and isn't visible good enough
That's a matter of taste. Minor issue if you ask me. I'll see to add your loader back in, but I do not believe that plugins should come with proprietary styles of their own; instead, they should respect the styles of the theme used.

- copyright on plugin page: I changed my name this year, see here
Changed that as suggested. I wasn't aware of it though: your old name still shines through in the JS files and credits of enlargit (standalone) - you might want to correct that.

@all testers: please keep in mind that you need to uninstall an old version first, then delete the enlargit plugin folder, then upload the new enlargeit fodler, then install the new version of the plugin again using the plugin manager. Just updating the files is not enough, as the database changes are only being performed during plugin install/uninstall.

The database part of the plugin is currently changing a lot, as I have been adding options...

Cheers

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #67 on: November 26, 2009, 09:09:04 am »

Side-note: when reviewing this plugin  I noticed the all PHP files inside that plugin contained some mistakes. I'm posting them for the benefit of others to help plugin authors come up with valid code; I'm not posting them to bash Timo or any other plugin author. Some of the mistakes are specific to coppermine, others are generic.

Here's a generic one:
  • the PHP command global is only needed within functions and class definitions. It definitely is not needed in the "regular" code outside of functions. Please read up the PHP documentation, section Variable scope.

Here are some that apply for coppermine plugins only:
  • Don't blindly copy stuff from files that reside in coppermine's root: constant definitions that exist inside the core files are usually meant either for security reasons (like define('IN_COPPERMINE', true);) or for the sake of internationalization (i18n), like define('DISPLAYIMAGE_PHP', true);/tt]. You mustn't re-define those constants. If you have no idea what they are being used for, don't use them at all - you don't need to (code-wise).
  • Do not include/require files that reside in coppermine_folder/include/ from within a plugin unless you absolutely need to. Reason: it's usually not needed. Reason 2: things will break, as nested includes might break, with relative include paths being used througout coppermine. A line like require_once('init.inc.php'); is not needed from within a plugin file, as the plugin file itself get's called plugin architecture, which is already part of coppermine. Subsequently, that include file already has been included before. It doesn't hurt if you use include_once or require_once, but will break if you just use include or require. And (as I said above): it's totally needless. Please don't.

Again: please understand that this posting is not intended to blame anybody, but only for the benefit of the community and the individuals that actively contribute.

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #68 on: November 26, 2009, 06:34:56 pm »

We're nearly there: as far as I'm concerned, the plugin is almost exactly as I wanted it to be in the first place: the attached version is sort-of beta stage, but should work as expected. I have overhauled the entire histogram caching, so take care to uninstall an old version first if present on your server before installing this new plugin version v1.3.

As far as the language files are concerned, only English and German are up to date: the rest of the language files is outdated and needs editing. The strings that are new will shine through in English even when using a language file that is still incomplete.

I'd really, really love to see your test reports and feedback.

Cheers

Joachim
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4483
    • Windsurf.me
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #69 on: November 26, 2009, 08:10:54 pm »

Where has the maximise button gone and the option in config?

The copy to clipboard in bbcode works really well. The new histogram is superb.

It will be good to see all the other options implemented. Even without, this is my favourite plugin.

Still needs a little css tidying in IE8 though I am sure that is just me being picky. In IE8 the padding around numerical dropdowns is lacking on the right and the details box displays 2 bullet points.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #70 on: November 27, 2009, 09:04:05 am »

Where has the maximise button gone and the option in config?
It has gone because the logic now resides in coppermine's core code (for cpg1.5.x): go to the groups control panel and set the access level settings at the very right to allow "thumbnail, intermediate, and full-size image" for the group you wish to allow a maximize button for. The maximize button will show up when the follwoing conditions are met:
  • There is a full-sized pic available in the first place
  • The visitor has got permissions to access the full-size in the first place (as per groups permissions)
That's the intended behaviour after all. As this feature was the last one I implemented it still may have flaws, so please test thoroughly and report if this work for you as expected.

The copy to clipboard in bbcode works really well.
That's great to hear.

The new histogram is superb.
I haven't changed much from the original code as far as the logic of the histogram is concerned, but only beautified the code a bit to make it better readable. The serious changes lie in the caching handling: with the old plugin, all files went into a sub-folder of the plugin itself, which will cause many issues: nearly every OS that I'm aware off chokes if a particular folder contains several hundred (or thousand) files. That's why the needless enabling of safe_mode in coppermine is a bad idea. That's why one of the reasons to store all files in one single folder is a bad idea. The old plugin didn't contain a mechanism to delete the files neither. That's why there is a rather sophisticated cache control mechanism in place now. But: I haven't really tested this in a life environment (with thousands of cached files), so I'd appreciate reports about that aspect.

It will be good to see all the other options implemented. Even without, this is my favourite plugin.
Compared to the plugin for cpg1.4.x, the following features are missing as far as I can see:
  • Use hourglass mouse cursors if browser supports it
  • Shadow color
  • Vote button
  • Comment button
  • Ecard button
  • SEF_URL support
The first two don't look to complicated to implement, as the tricky stuff already has been accomplished by Timo: creating the corresponding functionality in JavaScript. All that needs to be done as far as I can see is porting those functions over to cpg1.5.x ;)
For the other features Timo has implemented files of his own that mimmick the functionality of coppermine's core code. Before I start working on them I suggest to hear Timo's ideas first (wether he's going to implement them or if he prefers this to be done by someone else).

Still needs a little css tidying in IE8 though I am sure that is just me being picky. In IE8 the padding around numerical dropdowns is lacking on the right and the details box displays 2 bullet points.
Those two features are taken from coppermine's core: the spin-button jquery plugin as well as the expandable details are core features that this plugin just makes use of. I'll try to test the plugin with IE at work.

Thanks for your report. Please keep up the good work.

Cheers

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #71 on: November 27, 2009, 09:40:32 am »

Bug: I just found out that the content of the file info.php doesn't work at all (corresponds to the option "Show button "Info" -> "Yes: Open as AJAX snippet") due to the fact that the language file handling has changed from cpg1.4.x to cpg1.5.x.
I'll look into that.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #72 on: November 29, 2009, 05:51:49 pm »

  • Fixed the broken info file bug.
  • Added option to select what files the plugin should be applied for.
  • Released v1.5 of the plugin and added it to the download section at sourceforge. Edited initial posting accordingly.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #73 on: November 29, 2009, 09:57:26 pm »

Hi Joachim,

nice!

Issues I found with 1.5:
- enl_brdround doesn't work because you set 0.png as background (rounded borders only work with no background pic at all)
- activating info as ajax snippet crashes album list page (after menu nothing else, see screenshot)
- download snippet has wrong background color (should take it from style.css like favorite and bbcode snippet, see screenshot)
- you still use enlargeit_source.js, but it takes only 30s work to generate enlargeit.js out of it
- saving settings on config page de-activates all file types on 'picture formats' and 'video formats'

Timo
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #74 on: November 30, 2009, 08:38:59 am »

Hello Timo,

thanks for your report.

- enl_brdround doesn't work because you set 0.png as background (rounded borders only work with no background pic at all)
Fixed in rev 6809, thanks for the report.

- activating info as ajax snippet crashes album list page (after menu nothing else, see screenshot)
- download snippet has wrong background color (should take it from style.css like favorite and bbcode snippet, see screenshot)
Will work on that as soon as the plugin is functional again (see Inspekt issue discussed below).

- you still use enlargeit_source.js, but it takes only 30s work to generate enlargeit.js out of it
It's simply easier for me to use the source file while developing, but I'll change accordingly if I remember it, promise.

- saving settings on config page de-activates all file types on 'picture formats' and 'video formats'
This used to work yesterday and stopped working after Nibbler's fix (rev6804) of the Inspekt cage in  the core code (see http://forum.coppermine-gallery.net/index.php/topic,62532.msg311267.html#msg311267). I'll discuss this with Nibbler in that thread.
I'll keep you updated.

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #75 on: November 30, 2009, 10:23:31 am »

- activating info as ajax snippet crashes album list page (after menu nothing else, see screenshot)
Can not replicate, please elaborate.

- download snippet has wrong background color (should take it from style.css like favorite and bbcode snippet, see screenshot)
Fixed in rev 6812 by replacing the proprietary style sheet class with the generic one from coppermine's theme, which should be prefered in any case.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #76 on: December 01, 2009, 08:36:37 am »

- saving settings on config page de-activates all file types on 'picture formats' and 'video formats'
Fixed as per revision 6818 of coppermine's core code (see Andre's fix in http://forum.coppermine-gallery.net/index.php/topic,62532.msg311319.html#msg311319).
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #77 on: December 04, 2009, 10:29:05 am »

On my testbed, I am still not able to save any file types on the enlargeit config page. Once I click submit, all types are de-selected. r6827.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #78 on: December 04, 2009, 10:35:22 am »

Hm, that's strange. Did you update the cpg1.5.x core code (and not only the code of the enlargeit plugin) on your testbed with the latest checkout from the SVN?
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: EnlargeIt! AJAX GUI for CPG 1.5.x
« Reply #79 on: December 04, 2009, 11:08:48 am »

I think so - my testbed is here: http://bilder.timos-welt.de

I made a copy of my 1.4.x gallery yesterday and updated to the latest 1.5.x revision.
Logged
Pages: 1 2 3 [4] 5 6 7 8 ... 10   Go Up
 

Page created in 0.032 seconds with 22 queries.