Changeset 111 for trunk/plugins


Ignore:
Timestamp:
05/04/05 07:08:32 (14 years ago)
Author:
niko
Message:

#225
several ImageManager? fixes, see #225 for details

Location:
trunk/plugins/ImageManager
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ImageManager/Classes/Files.php

    r43 r111  
    1 <? 
     1<?php 
    22/** 
    33 * File Utilities. 
  • trunk/plugins/ImageManager/Classes/ImageEditor.php

    r43 r111  
    1 <? 
     1<?php 
    22/** 
    33 * Image Editor. Editing tools, crop, rotate, scale and save. 
  • trunk/plugins/ImageManager/Classes/ImageManager.php

    r48 r111  
    1 <? 
     1<?php 
    22/** 
    33 * ImageManager, list images, directories, and thumbnails. 
  • trunk/plugins/ImageManager/Classes/Thumbnail.php

    r43 r111  
    1 <? 
     1<?php 
    22/** 
    33 * Create thumbnails. 
  • trunk/plugins/ImageManager/assets/manager.js

    r60 r111  
    3232 
    3333                __dlg_translate('ImageManager'); 
    34  
     34         
     35        // This is so the translated string shows up in the drop down. 
     36        document.getElementById("f_align").selectedIndex = 1; 
     37        document.getElementById("f_align").selectedIndex = 0; 
     38         
    3539                var uploadForm = document.getElementById('uploadForm'); 
    3640                if(uploadForm) uploadForm.target = 'imgManager'; 
  • trunk/plugins/ImageManager/editor.php

    r60 r111  
    2121        <title></title> 
    2222<script type="text/javascript"> 
    23 _backend_url = "<? print $IMConfig['backend_url']; ?>"; 
     23_backend_url = "<?php print $IMConfig['backend_url']; ?>"; 
    2424</script> 
    25         <link href="<? print $IMConfig['base_url'];?>assets/editor.css" rel="stylesheet" type="text/css" />      
    26 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/slider.js"></script> 
    27 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/popup.js"></script> 
     25        <link href="<?php print $IMConfig['base_url'];?>assets/editor.css" rel="stylesheet" type="text/css" />   
     26<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/slider.js"></script> 
     27<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/popup.js"></script> 
    2828<script type="text/javascript"> 
    2929/*<![CDATA[*/ 
     
    3434/*]]>*/ 
    3535</script> 
    36 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/editor.js"></script> 
     36<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editor.js"></script> 
    3737</head> 
    3838 
    3939<body> 
    4040<div id="indicator"> 
    41 <img src="<? print $IMConfig['base_url'];?>img/spacer.gif" id="indicator_image" height="20" width="20" alt="" /> 
     41<img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" id="indicator_image" height="20" width="20" alt="" /> 
    4242</div> 
    4343<div id="tools"> 
     
    4848                        <label for="cw">Width:</label><input type="text" id="cw" class="textInput" onchange="updateMarker('crop')"/> 
    4949                        <label for="ch">Height:</label><input type="text" id="ch" class="textInput" onchange="updateMarker('crop')"/> 
    50                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     50                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    5151                </div>   
    52                 <a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    53                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     52                <a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     53                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    5454        </div>   
    5555        <div id="tools_scale" style="display:none;"> 
    5656                <div id="tool_inputs"> 
    5757                        <label for="sw">Width:</label><input type="text" id="sw" class="textInput" onchange="checkConstrains('width')"/> 
    58                         <a href="javascript:toggleConstraints();" title="Lock"><img src="<? print $IMConfig['base_url'];?>img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label> 
     58                        <a href="javascript:toggleConstraints();" title="Lock"><img src="<?php print $IMConfig['base_url'];?>img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label> 
    5959                        <input type="text" id="sh" class="textInput" onchange="checkConstrains('height')"/> 
    6060                        <input type="checkbox" id="constProp" value="1" checked="checked" onclick="toggleConstraints()"/> 
    6161                        <label for="constProp">Constrain Proportions</label> 
    62                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     62                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    6363                </div>   
    64                 <a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    65                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     64                <a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     65                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    6666        </div>   
    6767        <div id="tools_rotate" style="display:none;"> 
     
    8282         </select> 
    8383                        <label for="ra">Angle:</label><input type="text" id="ra" class="textInput" /> 
    84                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     84                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    8585                </div>   
    86                 <a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    87                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     86                <a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     87                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    8888        </div>           
    8989        <div id="tools_measure" style="display:none;"> 
     
    9191                        <label>X:</label><input type="text" class="measureStats" id="sx" /> 
    9292                        <label>Y:</label><input type="text" class="measureStats" id="sy" /> 
    93                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     93                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    9494                        <label>W:</label><input type="text" class="measureStats" id="mw" /> 
    9595                        <label>H:</label><input type="text" class="measureStats" id="mh" /> 
    96                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     96                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    9797                        <label>A:</label><input type="text" class="measureStats" id="ma" />              
    9898                        <label>D:</label><input type="text" class="measureStats" id="md" />              
    99                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     99                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    100100                        <button type="button" onclick="editor.reset();" >Clear</button> 
    101101                </div>   
     
    103103        <div id="tools_save" style="display:none;"> 
    104104                <div id="tool_inputs"> 
    105                         <label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<? echo $editor->getDefaultSaveFile();?>"/> 
     105                        <label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<?php echo $editor->getDefaultSaveFile();?>"/> 
    106106                        <select name="format" id="save_format" style="margin-left: 10px; vertical-align: middle;" onchange="updateFormat(this)"> 
    107107            <option value="" selected>Image Format</option> 
     
    111111            <option value="jpeg,35">JPEG Low</option> 
    112112            <option value="png">PNG</option> 
    113                         <? if($editor->isGDGIFAble() != -1) { ?> 
     113                        <?php if($editor->isGDGIFAble() != -1) { ?> 
    114114            <option value="gif">GIF</option> 
    115                         <? } ?> 
     115                        <?php } ?> 
    116116         </select> 
    117117                        <label>Quality:</label> 
     
    120120                                <td> 
    121121                                        <div id="slidercasing">  
    122                                 <div id="slidertrack" style="width:100px"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
    123             <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
     122                                <div id="slidertrack" style="width:100px"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
     123            <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
    124124                        </div>   
    125125                                </td> 
     
    127127                        </table>                                 
    128128                        <input type="text" id="quality" onchange="updateSlider(this.value)" style="width: 2em;" value="85"/> 
    129                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     129                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    130130                </div>   
    131                 <a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    132                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     131                <a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     132                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    133133        </div>   
    134134</div> 
    135135<div id="toolbar"> 
    136 <a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="<? print $IMConfig['base_url'];?>img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a> 
    137 <a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="<? print $IMConfig['base_url'];?>img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a> 
    138 <a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="<? print $IMConfig['base_url'];?>img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a> 
    139 <a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="<? print $IMConfig['base_url'];?>img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a> 
    140 <a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="<? print $IMConfig['base_url'];?>img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a> 
    141 <a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="<? print $IMConfig['base_url'];?>img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a> 
     136<a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="<?php print $IMConfig['base_url'];?>img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a> 
     137<a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="<?php print $IMConfig['base_url'];?>img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a> 
     138<a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="<?php print $IMConfig['base_url'];?>img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a> 
     139<a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="<?php print $IMConfig['base_url'];?>img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a> 
     140<a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="<?php print $IMConfig['base_url'];?>img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a> 
     141<a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="<?php print $IMConfig['base_url'];?>img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a> 
    142142</div> 
    143143<div id="contents"> 
    144 <iframe src="<? print $IMConfig['backend_url']; ?>__function=editorFrame&img=<? if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor"  scrolling="auto" title="Image Editor" frameborder="0"></iframe> 
     144<iframe src="<?php print $IMConfig['backend_url']; ?>__function=editorFrame&img=<?php if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor"  scrolling="auto" title="Image Editor" frameborder="0"></iframe> 
    145145</div> 
    146146<div id="bottom"></div> 
  • trunk/plugins/ImageManager/editorFrame.php

    r60 r111  
    2222        <title></title> 
    2323<script type="text/javascript"> 
    24 _backend_url = "<? print $IMConfig['backend_url']; ?>"; 
     24_backend_url = "<?php print $IMConfig['backend_url']; ?>"; 
    2525</script> 
    2626 
    27 <link href="<? print $IMConfig['base_url'];?>assets/editorFrame.css" rel="stylesheet" type="text/css" />         
    28 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/wz_jsgraphics.js"></script> 
    29 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/EditorContent.js"></script> 
     27<link href="<?php print $IMConfig['base_url'];?>assets/editorFrame.css" rel="stylesheet" type="text/css" />      
     28<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/wz_jsgraphics.js"></script> 
     29<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/EditorContent.js"></script> 
    3030<script type="text/javascript"> 
    3131 
     
    3737}; 
    3838         
    39         var mode = "<? echo $editor->getAction(); ?>" //crop, scale, measure 
     39        var mode = "<?php echo $editor->getAction(); ?>" //crop, scale, measure 
    4040 
    41 var currentImageFile = "<? if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>"; 
     41var currentImageFile = "<?php if(count($imageInfo)>0) echo rawurlencode($imageInfo['file']); ?>"; 
    4242 
    43 <? if ($editor->isFileSaved() == 1) { ?> 
     43<?php if ($editor->isFileSaved() == 1) { ?> 
    4444        alert(i18n('File saved.')); 
    45 <? } else if ($editor->isFileSaved() == -1) { ?> 
     45<?php } else if ($editor->isFileSaved() == -1) { ?> 
    4646        alert(i18n('File was not saved.')); 
    47 <? } ?> 
     47<?php } ?> 
    4848 
    4949</script> 
    50 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/editorFrame.js"></script> 
     50<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editorFrame.js"></script> 
    5151</head> 
    5252 
    5353<body> 
    5454<div id="status"></div> 
    55 <div id="ant" class="selection" style="visibility:hidden"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div> 
    56 <? if ($editor->isGDEditable() == -1) { ?> 
     55<div id="ant" class="selection" style="visibility:hidden"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div> 
     56<?php if ($editor->isGDEditable() == -1) { ?> 
    5757        <div style="text-align:center; padding:10px;"><span class="error">GIF format is not supported, image editing not supported.</span></div> 
    58 <? } ?> 
     58<?php } ?> 
    5959<table height="100%" width="100%"> 
    6060        <tr> 
    6161                <td> 
    62 <? if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?> 
    63         <span id="imgCanvas" class="crop"><img src="<? echo $imageInfo['src']; ?>" <? echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span> 
    64 <? } else { ?> 
     62<?php if(count($imageInfo) > 0 && is_file($imageInfo['fullpath'])) { ?> 
     63        <span id="imgCanvas" class="crop"><img src="<?php echo $imageInfo['src']; ?>" <?php echo $imageInfo['dimensions']; ?> alt="" id="theImage" name="theImage"></span> 
     64<?php } else { ?> 
    6565        <span class="error">No Image Available</span> 
    66 <? } ?> 
     66<?php } ?> 
    6767                </td> 
    6868        </tr> 
  • trunk/plugins/ImageManager/images.php

    r60 r111  
    6262                <td> 
    6363 
    64                 <? _ddt( __FILE__, __LINE__, "drawFiles(): relative is '" . $file['relative'] . "' thumbnail '" . $manager->getThumbnail($file['relative']) . "'" ); ?> 
     64                <?php _ddt( __FILE__, __LINE__, "drawFiles(): relative is '" . $file['relative'] . "' thumbnail '" . $manager->getThumbnail($file['relative']) . "'" ); ?> 
    6565 
    6666                <table width="100" cellpadding="0" cellspacing="0"><tr><td class="block"> 
    67  
    68                 <a href="javascript:;" onclick="selectImage('<? echo $file['relative'];?>', '<? echo $entry; ?>', <? echo $file['image'][0];?>, <? echo $file['image'][1]; ?>);"title="<? echo $entry; ?> - <? echo Files::formatSize($file['stat']['size']); ?>"><img src="<? print $manager->getThumbnail($file['relative']); ?>" alt="<? echo $entry; ?> - <? echo Files::formatSize($file['stat']['size']); ?>"/></a> 
     67        <table width="100" cellpadding="0" cellspacing="0"><tr><td class="block" style="cursor: pointer;" onclick="selectImage('<? echo $file['relative'];?>', '<? echo $entry; ?>', <? echo $file['image'][0];?>, <? echo $file['image'][1]; ?>);" title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"> 
     68 
     69                <img src="<?php print $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"/> 
    6970                </td></tr><tr><td class="edit"> 
    70                         <a href="<? print $IMConfig['backend_url']; ?>__function=images&dir=<? echo $relative; ?>&amp;delf=<? echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<? echo $entry; ?>');"><img src="<? print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a><a href="javascript:;" title="Edit" onclick="editImage('<? echo rawurlencode($file['relative']);?>');"><img src="<? print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit"/></a> 
    71                 <? if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?> 
     71                        <a href="<?php print $IMConfig['backend_url']; ?>__function=images&dir=<?php echo $relative; ?>&amp;delf=<?php echo rawurlencode($file['relative']);?>" title="Trash" onclick="return confirmDeleteFile('<?php echo $entry; ?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a><a href="javascript:;" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="<?php print $IMConfig['base_url'];?>img/edit_pencil.gif" height="15" width="15" alt="Edit"/></a> 
     72                <?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?> 
    7273                </td></tr></table></td>  
    73           <?  
     74          <?php  
    7475        }//foreach 
    7576}//function drawFiles 
     
    8788        { ?> 
    8889                <td><table width="100" cellpadding="0" cellspacing="0"><tr><td class="block"> 
    89                 <a href="images.php?dir=<? echo rawurlencode($path); ?>" onclick="updateDir('<? echo $path; ?>')" title="<? echo $dir['entry']; ?>"><img src="<? print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<? echo $dir['entry']; ?>" /></a> 
     90                <a href="images.php?dir=<?php echo rawurlencode($path); ?>" onclick="updateDir('<?php echo $path; ?>')" title="<?php echo $dir['entry']; ?>"><img src="<?php print $IMConfig['base_url'];?>img/folder.gif" height="80" width="80" alt="<?php echo $dir['entry']; ?>" /></a> 
    9091                </td></tr><tr> 
    9192                <td class="edit"> 
    92                         <a href="images.php?dir=<? echo $relative; ?>&amp;deld=<? echo rawurlencode($path); ?>" title="Trash" onclick="return confirmDeleteDir('<? echo $dir['entry']; ?>', <? echo $dir['count']; ?>);"><img src="<? print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a> 
    93                         <? echo $dir['entry']; ?> 
     93                        <a href="images.php?dir=<?php echo $relative; ?>&amp;deld=<?php echo rawurlencode($path); ?>" title="Trash" onclick="return confirmDeleteDir('<?php echo $dir['entry']; ?>', <?php echo $dir['count']; ?>);"><img src="<?php print $IMConfig['base_url'];?>img/edit_trash.gif" height="15" width="15" alt="Trash"/></a> 
     94                        <?php echo $dir['entry']; ?> 
    9495                </td> 
    9596                </tr></table></td> 
    96           <?  
     97          <?php  
    9798        } //foreach 
    9899}//function drawDirs 
     
    121122<table width="100%"> 
    122123  <tr> 
    123     <td class="error">Invalid base directory: <? echo $manager->config['images_dir']; ?></td> 
     124    <td class="error">Invalid base directory: <?php echo $manager->config['images_dir']; ?></td> 
    124125  </tr> 
    125126</table> 
     
    134135        <title>Image List</title> 
    135136  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    136         <link href="<? print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" /> 
     137        <link href="<?php print $IMConfig['base_url'];?>assets/imagelist.css" rel="stylesheet" type="text/css" /> 
    137138<script type="text/javascript"> 
    138 _backend_url = "<? print $IMConfig['backend_url']; ?>"; 
     139_backend_url = "<?php print $IMConfig['backend_url']; ?>"; 
    139140</script> 
    140141 
    141 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/dialog.js"></script> 
     142<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script> 
    142143<script type="text/javascript"> 
    143144/*<![CDATA[*/ 
     
    159160                var topDoc = window.top.document; 
    160161 
    161 <?  
     162<?php  
    162163        //we need to refesh the drop directory list 
    163164        //save the current dir, delete all select options 
     
    173174                {       selection.remove(0); } 
    174175                 
    175                 selection.options[selection.length] = new Option("/","<? echo rawurlencode('/'); ?>");   
    176                 <? foreach($dirs as $relative=>$fullpath) { ?> 
    177                 selection.options[selection.length] = new Option("<? echo $relative; ?>","<? echo rawurlencode($relative); ?>");                 
    178                 <? } ?> 
     176                selection.options[selection.length] = new Option("/","<?php echo rawurlencode('/'); ?>");        
     177                <?php foreach($dirs as $relative=>$fullpath) { ?> 
     178                selection.options[selection.length] = new Option("<?php echo $relative; ?>","<?php echo rawurlencode($relative); ?>");           
     179                <?php } ?> 
    179180                 
    180181                for(var i = 0; i < selection.length; i++) 
     
    187188                        } 
    188189                }                
    189 <? } ?> 
     190<?php } ?> 
    190191        }        
    191192 
    192193        function editImage(image)  
    193194        { 
    194                 var url = "<? print $IMConfig['backend_url']; ?>__function=editor&img="+image; 
     195                var url = "<?php print $IMConfig['backend_url']; ?>__function=editor&img="+image; 
    195196                Dialog(url, function(param)  
    196197                { 
     
    206207/*]]>*/ 
    207208</script> 
    208 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/images.js"></script> 
     209<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/images.js"></script> 
    209210</head> 
    210211 
    211212<body> 
    212 <? if ($manager->isValidBase() == false) { drawErrorBase($manager); }  
     213<?php if ($manager->isValidBase() == false) { drawErrorBase($manager); }  
    213214        elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?> 
    214215<table> 
    215216        <tr> 
    216         <? drawDirs($list[0], $manager); ?> 
    217         <? drawFiles($list[1], $manager); ?> 
     217        <?php drawDirs($list[0], $manager); ?> 
     218        <?php drawFiles($list[1], $manager); ?> 
    218219        </tr> 
    219220</table> 
    220 <? } else { drawNoResults(); } ?> 
     221<?php } else { drawNoResults(); } ?> 
    221222</body> 
    222223</html> 
  • trunk/plugins/ImageManager/manager.php

    r60 r111  
    1 <? 
     1<?php 
    22/** 
    33 * The main GUI for the ImageManager. 
     
    2222<script type="text/javascript"> 
    2323 
    24 <? // temporary. An ImageManager rewrite will take care of this kludge. ?> 
     24<?php // temporary. An ImageManager rewrite will take care of this kludge. ?> 
    2525 
    26 _backend_url = "<? print $IMConfig['backend_url']; ?>"; 
     26_backend_url = "<?php print $IMConfig['backend_url']; ?>"; 
    2727</script> 
    2828  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    29  <link href="<? print $IMConfig['base_url'];?>assets/manager.css" rel="stylesheet" type="text/css" />    
    30 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/popup.js"></script> 
    31 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/dialog.js"></script> 
     29 <link href="<?php print $IMConfig['base_url'];?>assets/manager.css" rel="stylesheet" type="text/css" />         
     30<script type="text/javascript" src="../../popups/popup.js"></script> 
     31<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script> 
    3232<script type="text/javascript"> 
    3333/*<![CDATA[*/ 
     
    3737                HTMLArea = window.opener.HTMLArea; 
    3838 
    39         var thumbdir = "<? echo $IMConfig['thumbnail_dir']; ?>"; 
    40         var base_url = "<? echo $manager->getImagesURL(); ?>"; 
     39        var thumbdir = "<?php echo $IMConfig['thumbnail_dir']; ?>"; 
     40        var base_url = "<?php echo $manager->getImagesURL(); ?>"; 
    4141/*]]>*/ 
    4242</script> 
    43 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/manager.js"></script> 
     43<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/manager.js"></script> 
    4444</head> 
    4545<body> 
    4646<div class="title">Insert Image</div> 
    47 <form action="<? print $IMConfig['backend_url'] ?>" id="uploadForm" method="post" enctype="multipart/form-data"> 
     47<form action="<?php print $IMConfig['backend_url'] ?>" id="uploadForm" method="post" enctype="multipart/form-data"> 
    4848 
    49 <? // we have to propagate our values through forms ?> 
     49<?php // we have to propagate our values through forms ?> 
    5050 
    5151<input type="hidden" name="__plugin" value="ImageManager"> 
     
    5757        <select name="dir" class="dirWidth" id="dirPath" onchange="updateDir(this)"> 
    5858        <option value="/">/</option> 
    59 <? foreach($dirs as $relative=>$fullpath) { ?> 
    60                 <option value="<? echo rawurlencode($relative); ?>"><? echo $relative; ?></option> 
    61 <? } ?> 
     59<?php foreach($dirs as $relative=>$fullpath) { ?> 
     60                <option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option> 
     61<?php } ?> 
    6262        </select> 
    63         <a href="#" onclick="javascript: goUpDir();" title="Directory Up"><img src="<? print $IMConfig['base_url']; ?>img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" /></a> 
    64 <? if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir']) { ?> 
    65         <a href="#" onclick="newFolder();" title="New Folder"><img src="<? print $IMConfig['base_url']; ?>img/btnFolderNew.gif" height="15" width="15" alt="New Folder" /></a> 
    66 <? } ?> 
    67         <div id="messages" style="display: none;"><span id="message"></span><img SRC="<? print $IMConfig['base_url']; ?>img/dots.gif" width="22" height="12" alt="..." /></div> 
    68         <iframe src="<? print $IMConfig['backend_url']; ?>__function=images" name="imgManager" id="imgManager" class="imageFrame" scrolling="auto" title="Image Selection" frameborder="0"></iframe> 
     63        <a href="#" onclick="javascript: goUpDir();" title="Directory Up"><img src="<?php print $IMConfig['base_url']; ?>img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" /></a> 
     64<?php if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir']) { ?> 
     65        <a href="#" onclick="newFolder();" title="New Folder"><img src="<?php print $IMConfig['base_url']; ?>img/btnFolderNew.gif" height="15" width="15" alt="New Folder" /></a> 
     66<?php } ?> 
     67        <div id="messages" style="display: none;"><span id="message"></span><img SRC="<?php print $IMConfig['base_url']; ?>img/dots.gif" width="22" height="12" alt="..." /></div> 
     68        <iframe src="<?php print $IMConfig['backend_url']; ?>__function=images" name="imgManager" id="imgManager" class="imageFrame" scrolling="auto" title="Image Selection" frameborder="0"></iframe> 
    6969</div> 
    7070</fieldset> 
     
    7777                        <td align="right"><label for="f_width">Width</label></td> 
    7878                        <td><input type="text" id="f_width" class="smallWidth" value="" onchange="javascript:checkConstrains('width');"/></td> 
    79                         <td rowspan="2" align="right"><img src="<? print $IMConfig['base_url']; ?>img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td> 
     79                        <td rowspan="2" align="right"><img src="<?php print $IMConfig['base_url']; ?>img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td> 
    8080                        <td rowspan="3" align="right">&nbsp;</td> 
    8181                        <td align="right"><label for="f_vert">V Space</label></td> 
     
    9191                </tr> 
    9292                <tr> 
    93 <? if($IMConfig['allow_upload'] == true) { ?> 
     93<?php if($IMConfig['allow_upload'] == true) { ?> 
    9494                        <td align="right"><label for="upload">Upload</label></td> 
    9595                        <td> 
     
    101101                </table> 
    102102                        </td> 
    103 <? } else { ?> 
     103<?php } else { ?> 
    104104                        <td colspan="2"></td> 
    105 <? } ?> 
    106                         <td align="right"><label for="f_align">Align</label></td> 
     105<?php } ?> 
     106                        <td align="right"><label for="f_align">Alignment:</label></td> 
    107107                        <td colspan="2"> 
    108108                                <select size="1" id="f_align"  title="Positioning of this image"> 
    109                                   <option value=""                             >Not Set</option> 
     109                                  <option value=""                             >Not set</option> 
    110110                                  <option value="left"                         >Left</option> 
    111111                                  <option value="right"                        >Right</option> 
  • trunk/plugins/ImageManager/thumbs.php

    r43 r111  
    1 <? 
     1<?php 
    22/** 
    33 * On the fly Thumbnail generation. 
Note: See TracChangeset for help on using the changeset viewer.