Erftralle / JoomGalleryPhotoSwipePlugin

Plugin extension for JoomGallery
GNU General Public License v2.0
4 stars 0 forks source link

Photoswipe plugin name clash with Joomplu plugin #11

Closed pietvo closed 4 years ago

pietvo commented 6 years ago

I am using the current version of JoomGalleryPhotoSwipePlugin and it names itself 'PhotoSwipev4plus'. I use it with the Joomplu plugin (called 'Content - Joomgallery' in the plugin manager). I use it like the following in an article: {joomplucat:7 limit=20|columns=3|openimage=PhotoSwipe-v4plus|layout=bootone|ordering=random} This works, except in the case of <a href="joomplu:46 type=orig|openimage=PhotoSwipe-v4plus|layout=bootone|">. The first part of this is generated by the Editor button "Joomimage' if a single image is selected with a link to the detail view. The other parameters I added by hand. This fails because JoomPlu does not accept a dash (-) in its parameters. I have now removed the dash in my own copy (line 39): protected $title = 'PhotoSwipev4plus'; and a similar in the javascript file. Now it works. Another workaround is to set PhotoSwipe as default in Joomplu, but I would prefer it if that it would also work without that. May I suggest you remove the dash?

Erftralle commented 6 years ago

May I suggest you remove the dash?

Thanks for your suggestion, but unfortunately this change would be not backward compatible and breaks all sites using the plugin.

In my opinion it would be much easier to change the regular expression in the plugin JoomPlu to allow dashes (see line 113 of joomplu.php) :

$regex_img = '/href="joomplu:([0-9]+)([a-z,A-Z,0-9,%,=,|, ,-]*)"/';

If you like, you can create an issue or better a pull request at https://github.com/JoomGallery/JoomPlu .

Erftralle commented 6 years ago

If you like, you can create an issue or better a pull request at https://github.com/JoomGallery/JoomPlu .

Since there was no reaction from @pietvo , I did it myself.

pietvo commented 6 years ago

OK, Thanks.