Changeset 6533 for extensions/Panoramas


Ignore:
Timestamp:
Jun 15, 2010, 10:46:56 AM (14 years ago)
Author:
vdigital
Message:

Fix: Notice: Undefined index: name in .../plugins/Panoramas/AS_Panorama.php on line 47
Fix: Panorama / Panoramas
Fix: Panoramas are disconnected when picture widths are lower than the viewport width

Location:
extensions/Panoramas
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/Panoramas/AS_Panorama.php

    r6527 r6533  
    4545      $asp = & $conf['AS_panorama'];
    4646      $picture = $template->get_template_vars('current');
    47       $picture['TITLE'] = $asp['name'];
    48       $template->assign('current', $picture);
    49       $template->assign( array( 'ASP' => $asp, ) );
     47          if ( isset($asp['name']) ) {
     48                  $picture['TITLE'] = $asp['name'];
     49                  $template->assign('current', $picture);
     50                  $template->assign( array( 'ASP' => $asp, ) );
     51          }
    5052    }
    5153  }
     
    5961        array_push($menu,
    6062            array(
    61                 'NAME' => 'Simple Panorama',
     63                'NAME' => 'Panoramas',
    6264                'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/AS_Panorama_admin.php')
    6365            )
  • extensions/Panoramas/AS_Panorama_admin.php

    r6527 r6533  
    11<?php
    2 /* Configuration of Panorama */
     2/* Configuration of Panoramas */
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    44if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!');
  • extensions/Panoramas/language/en_UK/plugin.lang.php

    r6527 r6533  
    1010$lang['Off'] = 'Off';
    1111$lang['On'] = 'On';
    12 $lang['Panorama configuration'] = 'Panorama configuration';
     12$lang['Panoramas configuration'] = 'Panoramas configuration';
    1313$lang['Permanent'] = 'Permanent';
    1414$lang['Picture name substring could not be empty.'] = 'Picture name substring could not be empty.';
  • extensions/Panoramas/language/fr_FR/plugin.lang.php

    r6527 r6533  
    1010$lang['Off'] = 'Inactif';
    1111$lang['On'] = 'Actif';
    12 $lang['Panorama configuration'] = 'Configuration';
     12$lang['Panoramas configuration'] = 'Configuration';
    1313$lang['Permanent'] = 'Permanent';
    1414$lang['Picture name substring could not be empty.'] = 'Les critères de sélection des noms d\'images ne peuvent pas être vide.';
  • extensions/Panoramas/template/AS_Panorama_admin.tpl

    r6527 r6533  
    33{/html_head}
    44<div class="titrePage">
    5   <h2>Panorama [{$ASP.Ver}]</h2>
     5  <h2>Panoramas [{$ASP.Ver}]</h2>
    66</div>
    77<p>
     
    1313<form method="post" action="" class="general">
    1414 <fieldset id="ASP_Config">
    15   <legend>{'Panorama configuration'|@translate}</legend>
     15  <legend>{'Panoramas configuration'|@translate}</legend>
    1616  <table id="table">
    1717   <tr>
  • extensions/Panoramas/template/AS_panorama_content.tpl

    r6527 r6533  
    1313        var s = (100 - {$ASP.speed}) * 2000;
    1414        var p = Math.round(Math.min(Math.max({$ASP.width} * ( {$ASP.start_position} / 100 ), 0), {$ASP.width}));
    15     $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama");
    16         var options = {ldelim}
    17                  viewport_width: w,
    18                  speed: s,
    19                  direction: '{$ASP.direction}',
    20                  control_display: '{$ASP.control_display}',
    21                                  start_position : p,
    22                                  auto_start : {$ASP.auto_start},
    23                                  mode_360 : {$ASP.mode_360},
    24                                  loop_180 : {$ASP.loop_180}
    25          };
    26         $("#theImage img.simple_panorama").panorama(options);
     15        if ({$ASP.width} > w) {ldelim}
     16                $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama");
     17                var options = {ldelim}
     18                                         viewport_width: w,
     19                                         speed: s,
     20                                         direction: '{$ASP.direction}',
     21                                         control_display: '{$ASP.control_display}',
     22                                         start_position : p,
     23                                         auto_start : {$ASP.auto_start},
     24                                         mode_360 : {$ASP.mode_360},
     25                                         loop_180 : {$ASP.loop_180}
     26                         };
     27                $("#theImage img.simple_panorama").panorama(options);
     28        };
    2729});
    2830</script>
    2931{/html_head}
    30         <!-- Adapted simply by the "Panorama" plugin (version {$ASP.Ver}): {$ASP.Dir}/template/AS_panorama_content.tpl -->
     32        <!-- Adapted simply by the "Panoramas" plugin (version {$ASP.Ver}): {$ASP.Dir}/template/AS_panorama_content.tpl -->
    3133        <!-- for: {$ASP.image_name} ({$ASP.width}x{$ASP.height}) -->
    3234        <div id="Panorama">
Note: See TracChangeset for help on using the changeset viewer.