• Resolved serpentes

    (@serpentes)


    Hi there,

    sadly I had to choose an alternative shortcode for photonic.
    this does work for me, but:

    I’ll have to edit the generated shortcode manually after inserting it, because the generator still inserts “Gallery” and not my alternate “photonic”

    is there a way, I can change this, so that I don’t have to manually edit my inserted codes…?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    I am not sure I am following. Are your new shortcodes still being inserted with “gallery” instead of “photonic”? Or is it that you have already created many galleries so far and you want to change them to use “photonic”? If it is the latter you desire, that is not possible because there is no way for Photonic to know where to keep “gallery” and wher to use “photonic”

    Thread Starter serpentes

    (@serpentes)

    new ones are still being inserted with “gallery”

    Plugin Author Sayontan Sinha

    (@sayontan)

    That is weird. Are your other settings being effective? What happens if you change your lightbox? Does that take effect? Are you using the visual editor or the text editor?

    Thread Starter serpentes

    (@serpentes)

    all other settings take their effects.
    I tried both, the visual and the text-only editor
    but the shortcode gets always inserted with “gallery” :/

    Plugin Author Sayontan Sinha

    (@sayontan)

    Ok. I will take a look as soon as I can get to a computer. Which version of the plugin are you on?

    Thread Starter serpentes

    (@serpentes)

    I’m on 1.65
    in the privious version I found a workaround by editing one of the plugin’s files to insert “photonic”…
    but since the update some days ago, that’s gone, of course…
    and now I can’t find the right place to work around this again… ??

    Plugin Author Sayontan Sinha

    (@sayontan)

    I see. This feature has actually worked from version 1 of the plugin, so my suspicion is that something in your theme or one of the other plugins (basically whatever is defining its own variant of “gallery”) is highjacking the “Add Media” dialog. I will look into it nonetheless.

    Thread Starter serpentes

    (@serpentes)

    thx ??

    Plugin Author Sayontan Sinha

    (@sayontan)

    When you go to edit or create a page or a post, can you execute the following steps?

    1. Do a “View Source” in your browser
    2. Search for Photonic_Admin_JS
    3. Tell me what you see in that line
    Thread Starter serpentes

    (@serpentes)

    <script type=’text/javascript’>
    /* <![CDATA[ */
    var Photonic_Admin_JS = {“shortcode”:”photonic”,”default_gallery_type”:”flickr”,”plugin_dir”:”http:\/\/www.mk-concert-photos.de\/wp-content\/plugins\/photonic\/”};
    /* ]]> */
    </script>

    Plugin Author Sayontan Sinha

    (@sayontan)

    OK – it looks like I introduced this bug in version 1.63.

    To fix, you will have to do the following:

    1. Go to the file wp-content/plugins/photonic/admin/add-gallery.php
    2. At the top of this file you will see this line:
      $selected_tab = isset($_GET['photonic-tab']) ? esc_attr($_GET['photonic-tab']) : 'default';
    3. Before the above line, put in:
      global $photonic_alternative_shortcode;
      $shortcode = empty($photonic_alternative_shortcode) ? 'gallery' : $photonic_alternative_shortcode;
    4. Around line 45 you will see this:
      var shortcode = "[gallery type='<?php echo $selected_tab; ?>' ";
    5. Change it to this:
      var shortcode = "[<?php echo $shortcode; ?> type='<?php echo $selected_tab; ?>' ";

    Let me know if this works, and I will update the code with it.

    Thread Starter serpentes

    (@serpentes)

    yep, that did the job for me ??

    Plugin Author Sayontan Sinha

    (@sayontan)

    I have put this fix in for version 1.66.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Alternative Shortcode’ is closed to new replies.