diff options
-rw-r--r-- | start.php | 2 | ||||
-rw-r--r-- | views/default/object/dokuwiki.php | 22 |
2 files changed, 9 insertions, 15 deletions
@@ -157,7 +157,7 @@ function dokuwiki_init(){ } function elggdokuwiki_url($entity) { - return elgg_get_url_site() . "dokuwiki/".$entity->container_guid; + return elgg_get_site_url() . "dokuwiki/".$entity->container_guid; } ?> diff --git a/views/default/object/dokuwiki.php b/views/default/object/dokuwiki.php index 6746567cf..12063b9da 100644 --- a/views/default/object/dokuwiki.php +++ b/views/default/object/dokuwiki.php @@ -2,24 +2,18 @@ $entity = $vars['entity']; $owner_guid = $entity->container_guid; $owner = get_entity($owner_guid); - $icon = elgg_view( - "graphics/icon", array( - 'entity' => $owner, - 'size' => 'small', - ) - ); + + $icon = elgg_view_entity_icon($owner, 'tiny'); - if ($vars['full_view']) { - // - } - elseif ($owner) { - $directory = $CONFIG->dataroot."wikis/".$owner_guid."/pages"; + if ($owner) { + $directory = elgg_get_data_path()."wikis/".$owner_guid."/pages"; $filecount = count(glob("" . $directory . "/*")); - $body = "<a href='".$vars['url']."pg/dokuwiki/".$owner_guid."'>".sprintf(elgg_echo('dokuwiki:wikifrom'),$owner->name)." (".sprintf(elgg_echo("dokuwiki:pages"), $filecount).")</a>"; - echo elgg_view_listing($icon, $body); + $list_body = "<h3><a href='".$entity->getURL()."'>".sprintf(elgg_echo('dokuwiki:wikifrom'),$owner->name)."</a></h3>"; + $list_body .= sprintf(elgg_echo("dokuwiki:pages"), $filecount); + echo elgg_view_image_block($icon, $list_body); } else { // shouldn't show wikis from groups you can't see :-P - echo elgg_view_listing("", ""); + echo elgg_view_image_block("", ""); } ?> |