aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/graphics/icon.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/views/default/graphics/icon.php b/views/default/graphics/icon.php
new file mode 100644
index 000000000..58af98295
--- /dev/null
+++ b/views/default/graphics/icon.php
@@ -0,0 +1,30 @@
+<?php
+ /**
+ * Generic icon view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ $entity = $vars['entity'];
+
+ // Get size
+ if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
+ $vars['size'] = "medium";
+
+ // Get any align and js
+ if (!empty($vars['align'])) {
+ $align = " align=\"{$vars['align']}\" ";
+ } else {
+ $align = "";
+ }
+
+
+?>
+<div class="icon">
+<img src="<?php echo $entity->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> />
+</div> \ No newline at end of file