Ready to get started?Download WordPress


Photonic Gallery for Flickr, Picasa, SmugMug, 500px, Zenfolio and Instagram
Photonic Extension for [mla_gallery] shortcode in Media Library Assistant (8 posts)

  1. David Lingren
    Posted 2 years ago #

    I've written a plugin, Media Library Assistant, which features an enhanced version of the [gallery] shortcode. I have had a support request to integrate my shortcode with Photonics.

    I can create an extension along the lines of "Photonic_Native_Processor.php", but I'd like your advice on how to register my extenstion (don't see a hook in Photonic.php), etc. Also, how can I pass control from my shortcode processor to Photonics so it can parse and apply the additional style parameters?

    Photonic Gallery looks great; I'd like to support it in my plugin. Thanks for any help you can give me.


  2. Sayontan Sinha
    Plugin Author

    Posted 2 years ago #

    So far I have been the sole contributor to the code, hence I haven't had the need for the hook. But I can add an action hook in an upcoming release. I will probably need to modify how the registered processors are stored too, to support additions using other plugins.

    However, I don't believe you need to code an extension for what you are trying to do, or that even an action hook is needed for this process. If I understand the requirement correctly, all you want to do is to use the build_gallery method from photonic.php, which can be accessed from the global $photonic variable initialized by the plugin. This should require minimal changes from both our sides.

  3. David Lingren
    Posted 2 years ago #

    Thanks for your quick and complete response. I looked through the $photonic->build_gallery function and added some code to my plugin to call it when passed a style= parameter in the [mla_gallery] shortcode. Everything seems to work, just as you predicted.

    I plan to add Photonic support to my next Media Library Assistant release.

    My testing turned up a couple of minor issues I'd like to tell you about. First, your plugin displays two PHP notices when run with "define('WP_DEBUG', true);" in the wp-config.php file (I always run my test system this way). The notices are:

    ( ! ) Notice: Undefined index: colortype in ... \wp-content\plugins\photonic\photonic.php on line 747
    ( ! ) Notice: Undefined index: image in ... \wp-content\plugins\photonic\photonic.php on line 790

    These are probably harmless, but are easily avoided by updating the code.

    Second, it looks like the "pause" parameter has no effect. When I set "pause=false" in a shortcode the resulting gallery still has the "Pause on hover" behavior. Am I doing something wrong?

    Thanks again for your help!

  4. Sayontan Sinha
    Plugin Author

    Posted 2 years ago #

    Thanks for the info PHP notices. I always work with debugging on, so I guess I haven't seen the notices because the options are already set for me.

    Regarding the pause issue, it seems to be working fine here: http://aquoid.com/news/plugins/photonic/wp-galleries/. Do you have any plugin that uses JQuery Cycle?

  5. David Lingren
    Posted 2 years ago #

    Regarding the pause issue, the problem I'm having is that I can;t turn the pause function off, i.e., pause=false. Line 589 of photonic.php is hard-coded "pause: 1,".

    If I change the source code to "pause: 0," the pause is turned off, as I'd expect. The shortcode parameter has no effect, though.

  6. Sayontan Sinha
    Plugin Author

    Posted 2 years ago #

    All these have been addressed in version 1.40. Bear in mind that there was no intent to have "pause" be a parameter for the shortcode, hence the hardcoding.

  7. David Lingren
    Posted 2 years ago #

    Thanks for the quick action. I downloaded version 1.40 and the Notice message are gone. The 'photonic_register_extensions' action hook looks like a good idea too, although I didn't need it after following your suggestions.

    I ran across 'pause' => true, // Pause on hover on line 550 of the source code when I was looking for the parameters I needed to pass from my shortcode to your plugin. That's where my question came from.

    Thanks again for a great plugin and for your help integrating it with mine.

  8. David Lingren
    Posted 1 year ago #

    It looks like you've implemented pause in version 1.43; thanks!

    I've made an adjustment in the next release of MLA to conform to your implementation, and I'll announce pause support in my release notice.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.