view object/blog:
...logic...
- elgg_view('blog/blog', array('blog' => $blog);
+ echo elgg_view('blog/blog', array('blog' => $blog);
...logic...
elgg_view_comments($blog);
}
switch ($keyword) {
- case 'entity':
+ case 'entity_list':
$options = ecml_keywords_parse_entity_params($params_string);
// must use this lower-level function because I missed refactoring
// the list entity functions for relationships.
}
// if nothing matched return the original string.
+ // @todo this might be undesirable. will show ugly code everywhere
+ // if you delete a file or something.
if (!$content) {
$content = $matches[0];
}
}
return $r;
-}
\ No newline at end of file
+}
--- /dev/null
+<?php
+/**
+ * ECML Generic Object GUID
+ *
+ * @package ECML
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+
+$guid = $vars['guid'];
+
+if ($entity = get_entity($guid)) {
+ echo elgg_view('output/url', array(
+ 'href' => $entity->getURL(),
+ 'title' => $entity->title,
+ 'text' => "<img src={$entity->getIcon('tiny')}>" . $entity->title
+ ));
+} else {
+ echo elgg_echo('ecml:entity:invalid');
+}
\ No newline at end of file