aboutsummaryrefslogtreecommitdiff
path: root/pages/lightbox/new.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:04:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:04:14 -0300
commit66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30 (patch)
tree6002cbd9db40b15b4e67a67d5669644f86e4dbde /pages/lightbox/new.php
downloadelgg-66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30.tar.gz
elgg-66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30.tar.bz2
Squashed 'mod/lightbox/' content from commit a83b8d8
git-subtree-dir: mod/lightbox git-subtree-split: a83b8d89691c31b4568f47790fb40d0bc962aca5
Diffstat (limited to 'pages/lightbox/new.php')
-rw-r--r--pages/lightbox/new.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/pages/lightbox/new.php b/pages/lightbox/new.php
new file mode 100644
index 000000000..117aba293
--- /dev/null
+++ b/pages/lightbox/new.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Create a new album
+ *
+ * @package ElggLightbox
+ */
+
+//elgg_load_library('elgg:lightbox');
+
+$owner = elgg_get_page_owner_entity();
+
+gatekeeper();
+group_gatekeeper();
+
+$title = elgg_echo('photos:add');
+
+// set up breadcrumbs
+elgg_push_breadcrumb(elgg_echo('lightbox'), "photos/all");
+if (elgg_instanceof($owner, 'user')) {
+ elgg_push_breadcrumb($owner->name, "photos/owner/$owner->username");
+} else {
+ elgg_push_breadcrumb($owner->name, "photos/group/$owner->guid/all");
+}
+elgg_push_breadcrumb($title);
+
+// create form
+$form_vars = array('enctype' => 'multipart/form-data');
+$body_vars = array();
+$content = elgg_view_form('lightbox/edit', $form_vars, $body_vars);
+
+$body = elgg_view_layout('content', array(
+ 'content' => $content,
+ 'title' => $title,
+ 'filter' => '',
+));
+
+echo elgg_view_page($title, $body);