• Hi,

    I found 2 small bugs in 1.2.6.5:

    We cannot register an API because that line needs to be with https in file alpinebot-admin.php:
    $request = 'http://api.flickr.com/services/rest/?method=flickr.test.echo&format=php_serial&api_key='.$key;

    Fixed with:
    $request = 'https://api.flickr.com/services/rest/?method=flickr.test.echo&format=php_serial&api_key='.$key;

    I was also not able display my photos, Chrome Javascript console showed me:

    <p><script>
        jQuery(document).ready(function() {
          jQuery('#id103-AlpinePhotoTiles_container').addClass('loading');
        });</p> // -- JS CONSOLE: Uncaught SyntaxError: Unexpected token <
    <p>    // Check for on() ( jQuery 1.7+ )
        if( jQuery.isFunction( jQuery(window).on ) ){
          jQuery(window).on('load', function(){
            jQuery('#id103-AlpinePhotoTiles_container').removeClass('loading');</p>
    <p>        var alpineLoadPlugin = function(){
              jQuery('#id103-hidden-parent').AlpinePhotoTilesPlugin({
                id:'id103',
                style:'windows',
                shape:'rectangle',
                perRow:4,
                imageBorder:0,
                imageShadow:0,
                imageCurve:1,
                imageHighlight:1,
                lightbox:1,
                galleryHeight:0, // Keep for Compatibility
                galRatioWidth:800,
                galRatioHeight:600,
                highlight:'#dee1e3',
                pinIt:0,
                siteURL:'http://www.photocedric.com',
                callback: function(){jQuery( '#id103-AlpinePhotoTiles_container a.AlpinePhotoTiles-lightbox' ).attr( 'rel', 'alpine-prettyphoto[id103]' );if(jQuery().prettyPhoto){jQuery( 'a[rel^=\'alpine-prettyphoto[id103]\']' ).prettyPhoto({ theme:'facebook',social_tools:false, show_title:true });}}
              });
            }</p>
    <p>

    I don’t know what is adding those <p> and </p>, but it’s breaking the Javascript code.

    I removed the empty lines in alpinebot-display.php :

    jQuery(document).ready(function() {
          jQuery('#".$wid."-AlpinePhotoTiles_container').addClass('loading');
        });  ");

    and

    /**
     *  Get jQuery loading string
     *
     *  @ Since 1.2.6.4
     */
      function get_loading_call($opts,$wid,$src,$lightbox,$hasLight,$lightScript,$lightStyle){
        $return = "
            jQuery('#".$wid."-AlpinePhotoTiles_container').removeClass('loading');
            var alpineLoadPlugin = function(){".$this->get_plugin_call($opts,$wid,$src,$hasLight)."}
            // Load Alpine Plugin
            if( jQuery().AlpinePhotoTilesPlugin ){
              alpineLoadPlugin();
    ...

    and it fixed the issue, no more weird <p> in the middle of a javascript script…!

    https://wordpress.org/plugins/alpine-photo-tile-for-flickr/

Viewing 1 replies (of 1 total)
  • Plugin Author theAlpinePress

    (@thealpinepress)

    Thank you!
    I have applied and submitted your fixes. I think the <p> issue is that I left spaces in the code, but for JS, they should be tabs.
    Cheers, Eric

Viewing 1 replies (of 1 total)
  • The topic ‘Two bugs found in 1.2.6.5’ is closed to new replies.