Elgg  Version 1.11
crop.php
Go to the documentation of this file.
1 <?php
8 elgg_load_js('jquery.imgareaselect');
9 elgg_load_js('elgg.avatar_cropper');
10 elgg_load_css('jquery.imgareaselect');
11 
12 $master_img = elgg_view('output/img', array(
13  'src' => $vars['entity']->getIconUrl('master'),
14  'alt' => elgg_echo('avatar'),
15  'class' => 'mrl',
16  'id' => 'user-avatar-cropper',
17 ));
18 
19 $preview_img = elgg_view('output/img', array(
20  'src' => $vars['entity']->getIconUrl('master'),
21  'alt' => elgg_echo('avatar'),
22 ));
23 
24 ?>
25 <div class="clearfix">
26  <?php echo $master_img; ?>
27  <div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>
28  <div id="user-avatar-preview"><?php echo $preview_img; ?></div>
29 </div>
30 <div class="elgg-foot">
31 <?php
32 $coords = array('x1', 'x2', 'y1', 'y2');
33 foreach ($coords as $coord) {
34  echo elgg_view('input/hidden', array('name' => $coord, 'value' => $vars['entity']->$coord));
35 }
36 
37 echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid));
38 
39 echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create')));
40 
41 ?>
42 </div>
fieldset div
Definition: admin.php:470
elgg_load_css($name)
Load a CSS file for this page.
Definition: elgglib.php:255
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
$preview_img
Definition: crop.php:19
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
elgg_load_js($name)
Load a JavaScript resource on this page.
Definition: elgglib.php:189
$master_img
Definition: crop.php:12
label
Definition: admin.php:460
$coords
Definition: crop.php:32
if(file_exists($welcome)) $vars
Definition: upgrade.php:93