XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
images_list_editor.php
Go to the documentation of this file.
1 <table width="100%" cellspacing="0">
2 
3  <?php if(empty($images)): ?>
4  <tr class="even error">
5  <td colspan="3">
6  <?php _e('There are not images yet!','rmcommon'); ?>
7  </td>
8  </tr>
9  <?php endif; ?>
10  <?php foreach($images as $image): ?>
11  <tr class="<?php echo tpl_cycle("even,odd"); ?> image_list" valign="top" id="list-<?php echo $image['id']; ?>">
12  <td width="35"><img src="<?php echo $image['thumb']; ?>" alt="" width="35" height="30" /></td>
13  <td>
14  <strong><?php echo $image['title']; ?></strong>
15  <?php if($image['desc']!=''): ?>
16  <span class="description"><?php echo $image['desc']; ?></span>
17  <?php endif; ?>
18  </td>
19  <td align="center">
20  <a href="javascript:;" class="data_show" onclick="show_image_data(<?php echo $image['id']; ?>);"><?php _e('Show','rmcommon'); ?></a>
21  </td>
22  </tr>
23  <tr class="image_data" id="data-<?php echo $image['id']; ?>">
24  <td colspan="3">
25 
26  <table width="100%" cellpadding="2" cellspacing="0" class="the_data">
27  <tr class="odd">
28  <td rowspan="3"><img src="<?php echo $image['thumb']; ?>" alt="" style="max-width: 150px;" /></td>
29  <td><a href="javascript:;" class="data_hide" onclick="hide_image_data(<?php echo $image['id']; ?>);"><?php _e('Hide','rmcommon'); ?></a><strong><?php echo $image['title']; ?></strong></td>
30  </tr>
31  <tr class="even"><td><?php echo $image['mime']; ?></td></tr>
32  <tr class="odd"><td><?php echo $image['date']; ?></td></tr>
33  <tr class="even">
34  <td><strong>*<?php _e('Title:','rmcommon'); ?></strong></td>
35  <td><input type="text" id="image-name-<?php echo $image['id']; ?>" size="50" value="<?php echo $image['title']; ?>" /></td>
36  </tr>
37  <tr class="odd">
38  <td><strong><?php _e('Alternative text:','rmcommon'); ?></strong></td>
39  <td><input type="text" id="image-alt-<?php echo $image['id']; ?>" size="50" value="" /></td>
40  </tr>
41  <tr class="even" valign="top">
42  <td><strong><?php _e('Description:','rmcommon'); ?></strong></td>
43  <td><textarea id="image-desc-<?php echo $image['id']; ?>" style="width: 90%; height: 100px;"><?php echo $image['desc']; ?></textarea></td>
44  </tr>
45  <tr class="odd">
46  <td><strong><?php _e('Link URL:','rmcommon'); ?></strong></td>
47  <td class="image_link">
48  <input type="hidden" id="fileurl_<?php echo $image['id']; ?>" value="<?php echo $image['links']['file']['value']; ?>" />
49  <input type="text" id="image-link-<?php echo $image['id']; ?>" size="50" value="<?php echo $image['links']['file']['value']; ?>" />
50  <?php foreach ($image['links'] as $link): ?>
51  <a href="javascript:;" onclick="$('#image-link-<?php echo $image['id']; ?>').val('<?php echo $link['value']; ?>');"><?php echo $link['caption']; ?></a>
52  <?php endforeach; ?>
53  </td>
54  </tr>
55  <tr class="even">
56  <td><strong><?php _e('Alignment:','rmcommon'); ?></strong></td>
57  <td><strong>
58  <label><input type="radio" name="align_<?php echo $image['id']; ?>" value="" checked="checked" /> <?php _e('None','rmcommon'); ?></label>
59  <label><input type="radio" name="align_<?php echo $image['id']; ?>" value="left" /> <?php _e('Left','rmcommon'); ?></label>
60  <label><input type="radio" name="align_<?php echo $image['id']; ?>" value="center" /> <?php _e('Center','rmcommon'); ?></label>
61  <label><input type="radio" name="align_<?php echo $image['id']; ?>" value="right" /> <?php _e('Right','rmcommon'); ?></label></strong>
62  </td>
63  </tr>
64  <tr class="odd">
65  <td><strong><?php _e('Image size:','rmcommon'); ?></strong></td>
66  <td class="sizes">
67  <?php foreach($cat->getVar('sizes') as $i => $size): ?>
68  <?php if($size['width']<=0) continue; ?>
69  <?php
70 
71  $tfile = str_replace(XOOPS_URL, XOOPS_ROOT_PATH, $image['url']).'/sizes/'.$image['file'].'_'.$size['width'].'x'.$size['height'].'.'.$image['extension'];
72  if(!is_file($tfile)) continue;
73  ?>
74  <label><input type="radio" rel="<?php echo $size['width']; ?>" name="size_<?php echo $image['id']; ?>" value="<?php echo $image['url']; ?>/sizes/<?php echo $image['file'].'_'.$size['width'].'x'.$size['height'].'.'.$image['extension']; ?>" /><br /><?php echo $size['name']; ?><br />(<?php echo $size['width'].($size['height']!='' ? ' x '.$size['height'] : ''); ?>)</label>
75  <?php endforeach; ?>
76  <label><input type="radio" rel="original" name="size_<?php echo $image['id']; ?>" value="<?php echo $image['url']; ?>/<?php echo $image['file'].'.'.$image['extension']; ?>" checked="checked" /><br /><?php _e('Original','rmcommon'); ?>
77  <br />(<?php list($w,$h) = getimagesize($image['url'].'/'.$image['file'].'.'.$image['extension']); echo $w.' x '.$h; ?>)</label>
78  <input type="hidden" id="extension_<?php echo $image['id']; ?>" value="<?php echo $image['extension']; ?>">
79  </td>
80  </tr>
81  <tr class="even">
82  <td class="size_url" colspan="2" align="center"><span><?php echo $image['url']; ?>/<?php echo $image['file'].'.'.$image['extension']; ?></span></td>
83  </tr>
84  <tr class="odd">
85  <td colspan="2">
86  <a href="javascript:;" class="insert_button" onclick="insert_image(<?php echo $image['id']; ?>,'<?php echo $type!=''?$type:'tiny'; ?>','<?php echo $target; ?>', '<?php echo $container; ?>');"><?php _e('Insert image','rmcommon'); ?></a>
87  <a href="javascript:;"><?php _e('Delete','rmcommon'); ?></a>
88  </td>
89  </tr>
90  </table>
91 
92  </td>
93  </tr>
94  <?php endforeach; ?>
95 </table>
96 <input type="hidden" name="token" id="ret-token" value="<?php echo $xoopsSecurity->createToken(); ?>" />
97 <?php echo $nav->display(); ?>
98 <input type="hidden" id="filesurl" value="<?php echo $filesurl; ?>" />