diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
commit | 4766f36a4d74924f21ff329c4318ce4e069ffa04 (patch) | |
tree | 969b84632f2a8b0db79788a8a6db8e41d63e5cb4 /mod/embed/views/default/object | |
parent | 57a217fd6b708844407486046a1faa23b46cac08 (diff) | |
download | elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.gz elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.bz2 |
Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/embed/views/default/object')
-rw-r--r-- | mod/embed/views/default/object/default/embed.php | 9 | ||||
-rw-r--r-- | mod/embed/views/default/object/file/embed.php | 17 | ||||
-rw-r--r-- | mod/embed/views/default/object/file/embedlist.php | 20 |
3 files changed, 46 insertions, 0 deletions
diff --git a/mod/embed/views/default/object/default/embed.php b/mod/embed/views/default/object/default/embed.php new file mode 100644 index 000000000..c97dbd48a --- /dev/null +++ b/mod/embed/views/default/object/default/embed.php @@ -0,0 +1,9 @@ +<?php + + if ($vars['entity'] instanceof ElggObject) { + + echo '<a href="'. $vars['entity']->getURL() .'">' . $vars['entity']->title . '</a>'; + + } + +?>
\ No newline at end of file diff --git a/mod/embed/views/default/object/file/embed.php b/mod/embed/views/default/object/file/embed.php new file mode 100644 index 000000000..01f3904ac --- /dev/null +++ b/mod/embed/views/default/object/file/embed.php @@ -0,0 +1,17 @@ +<?php + + $mime = $vars['entity']->mimetype; + + if (elgg_view_exists('file/specialcontent/' . $mime)) { + $content = elgg_view('file/specialcontent/' . $mime, $vars); + } else if (elgg_view_exists("file/specialcontent/" . substr($mime,0,strpos($mime,'/')) . "/default")) { + $content = elgg_view("file/specialcontent/" . substr($mime,0,strpos($mime,'/')) . "/default", $vars); + } + + if (empty($content) || substr_count(strtolower($content),'<embed') || substr_count(strtolower($content),'<object') || substr_count(strtolower($content),'<script')) { + echo elgg_view('object/default/embed',$vars); + } else { + echo $content; + } + +?>
\ No newline at end of file diff --git a/mod/embed/views/default/object/file/embedlist.php b/mod/embed/views/default/object/file/embedlist.php new file mode 100644 index 000000000..71e84f265 --- /dev/null +++ b/mod/embed/views/default/object/file/embedlist.php @@ -0,0 +1,20 @@ +<?php + + $file = $vars['entity']; + $friendlytime = friendly_time($vars['entity']->time_created); + + $info = "<p> <a href=\"{$file->getURL()}\">{$file->title}</a></p>"; + $info .= "<p class=\"owner_timestamp\">{$friendlytime}"; + $icon = "<a href=\"{$file->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $file->mimetype, 'thumbnail' => $file->thumbnail, 'file_guid' => $file->guid, 'size' => 'small')) . "</a>"; + +?> +<div id="embedFile<?php echo $file->guid; ?>"> + <div class="search_listing"> + <div class="search_listing_icon"> + <?php echo $icon; ?> + </div> + <div class="search_listing_info"> + <?php echo $info; ?> + </div> + </div> +</div> |