add.php 972 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Create new album page
  4. *
  5. * @author Cash Costello
  6. * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
  7. */
  8. $owner = elgg_get_page_owner_entity();
  9. gatekeeper();
  10. group_gatekeeper();
  11. $title = elgg_echo('photos:add');
  12. // set up breadcrumbs
  13. elgg_push_breadcrumb(elgg_echo('photos'), 'photos/siteimagesall');
  14. elgg_push_breadcrumb(elgg_echo('tidypics:albums'), 'photos/all');
  15. if (elgg_instanceof($owner, 'user')) {
  16. elgg_push_breadcrumb($owner->name, "photos/owner/$owner->username");
  17. } else {
  18. elgg_push_breadcrumb($owner->name, "photos/group/$owner->guid/all");
  19. }
  20. elgg_push_breadcrumb($title);
  21. $vars = tidypics_prepare_form_vars();
  22. $content = elgg_view_form('photos/album/save', array('method' => 'post'), $vars);
  23. $body = elgg_view_layout('content', array(
  24. 'content' => $content,
  25. 'title' => $title,
  26. 'filter' => '',
  27. 'sidebar' => elgg_view('photos/sidebar', array('page' => 'album')),
  28. ));
  29. echo elgg_view_page($title, $body);