aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/elgglib.php3
-rw-r--r--views/js/object/default.php20
-rw-r--r--views/js/pageshells/pageshell.php27
-rw-r--r--views/js/user/default.php20
4 files changed, 68 insertions, 2 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index b39f83417..b71c19f0a 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -211,7 +211,6 @@
$viewtype = $_SESSION['view'];
}
-
if (!isset($CONFIG->views->locations[$view])) {
if (!isset($CONFIG->viewpath)) {
$location = dirname(dirname(dirname(__FILE__))) . "/views/";
@@ -278,7 +277,7 @@
$subtype = $entity->getSubtype();
if (empty($subtype)) { $subtype = $entity_type; }
- if (elgg_view_exists("{$entity_type}/{$subtype}")) {
+ if (elgg_view_exists("{$entity_type}/{$subtype}",$viewtype)) {
return elgg_view("{$entity_type}/{$subtype}",array(
'entity' => $entity,
'full' => $full
diff --git a/views/js/object/default.php b/views/js/object/default.php
new file mode 100644
index 000000000..9130047ea
--- /dev/null
+++ b/views/js/object/default.php
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Elgg JS default view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ if (isset($vars['entity'])) {
+
+ echo elgg_view_entity($vars['entity'],'default',true,false);
+
+ }
+
+?> \ No newline at end of file
diff --git a/views/js/pageshells/pageshell.php b/views/js/pageshells/pageshell.php
new file mode 100644
index 000000000..7c3a59adb
--- /dev/null
+++ b/views/js/pageshells/pageshell.php
@@ -0,0 +1,27 @@
+<?php
+
+ /**
+ * Elgg JS pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ $body = $vars['body'];
+
+ // Remove excess carriage returns
+ $body = str_replace("\r",'',$body);
+
+ $body = explode("\n",$body);
+
+ foreach($body as $line) {
+
+ echo "document.write('" . addslashes($line) . "');\n";
+
+ }
+
+?> \ No newline at end of file
diff --git a/views/js/user/default.php b/views/js/user/default.php
new file mode 100644
index 000000000..9130047ea
--- /dev/null
+++ b/views/js/user/default.php
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Elgg JS default view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ if (isset($vars['entity'])) {
+
+ echo elgg_view_entity($vars['entity'],'default',true,false);
+
+ }
+
+?> \ No newline at end of file