aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-10 07:00:44 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-10 07:00:44 -0500
commitb46b9b1464249916d105ee46f0bdb7972863070d (patch)
treea701f32991b386b7d0e664f279182449ec3cbb9d /pages
parent0fe5af64cf1f5d69e0253e27dec70e346814fcdf (diff)
downloadelgg-b46b9b1464249916d105ee46f0bdb7972863070d.tar.gz
elgg-b46b9b1464249916d105ee46f0bdb7972863070d.tar.bz2
moved upload forms to new location
Diffstat (limited to 'pages')
-rw-r--r--pages/flickr/importPhotosets.php50
-rw-r--r--pages/flickr/setup.php17
-rw-r--r--pages/upload.php13
3 files changed, 11 insertions, 69 deletions
diff --git a/pages/flickr/importPhotosets.php b/pages/flickr/importPhotosets.php
deleted file mode 100644
index a807a0782..000000000
--- a/pages/flickr/importPhotosets.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Import a set of photos from Flickr
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
- $body = elgg_view_title( elgg_echo( 'flickr:importmanager' ));
- $body .= "<h2>" . elgg_echo( 'flickr:desc' ) . "</h2>";
-
- $viewer = get_loggedin_user();
-
- require_once dirname(dirname(dirname(__FILE__))) . "/lib/phpFlickr/phpFlickr.php";
- require_once( dirname(dirname(dirname(__FILE__)))) . "/lib/flickr.php";
- $f = new phpFlickr("26b2abba37182aca62fe0eb2c7782050");
-
- $viewer = get_loggedin_user();
- $flickr_username = get_metadata_byname( $viewer->guid, "flickr_username" );
- $flickr_id = get_metadata_byname( $viewer->guid, "flickr_id" );
- $album_id = get_metadata_byname( $viewer->guid, "flickr_album_id" );
-
- if( intval( $album_id->value ) <= 0 ) {
- register_error( sprintf( elgg_echo( 'flickr:errornoalbum' ), $album_id->value ));
- forward( "/mod/tidypics/pages/flickr/setup.php" );
- }
-
- $photosets = $f->photosets_getList( $flickr_id->value );
- foreach( $photosets["photoset"] as $photoset ) {
- $body .= "<div class='tidypics_album_images'>";
- $body .= "$photoset[title]<br />";
-
- $count = 0;
- $looper = 0;
- //create links to import photos 10 at a time
- while( $photoset["photos"] > $count ) {
- $looper++;
- $body .= " <a href='/mod/tidypics/actions/flickrImportPhotoset.php?set_id=$photoset[id]&page=$looper&album_id=$album_id->value'>$looper</a>";
- $count = $count + 10;
- }
- $body .= "<br />$photoset[photos] images";
- $body .= "</div>";
-// echo "<pre>"; var_dump( $photoset ); echo "</pre>"; die;
- }
-
-// $body .= elgg_view("tidypics/forms/setupFlickr", array(), false, true );
- flickr_menu();
- page_draw( elgg_echo( 'flickr:importmanager' ), elgg_view_layout("two_column_left_sidebar", '', $body));
-
-?> \ No newline at end of file
diff --git a/pages/flickr/setup.php b/pages/flickr/setup.php
deleted file mode 100644
index 1de8c29c2..000000000
--- a/pages/flickr/setup.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
- /**
- * Setup a users Flickr username
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- $viewer = get_loggedin_user();
-
- $body = elgg_view_title( elgg_echo( 'flickr:setup') );
- $body .= elgg_view("tidypics/forms/setupFlickr", array(), false, true );
-// echo "<pre>"; var_dump($body); echo "</pre>";
- page_draw( elgg_echo( 'flickr:setup'), elgg_view_layout("two_column_left_sidebar", '', $body));
-?> \ No newline at end of file
diff --git a/pages/upload.php b/pages/upload.php
index 7ac4930b5..6580c6f52 100644
--- a/pages/upload.php
+++ b/pages/upload.php
@@ -6,6 +6,8 @@
include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
+global $CONFIG;
+
// must be logged in to upload images
gatekeeper();
@@ -43,9 +45,16 @@ $title = elgg_echo('album:addpix') . ': ' . $album->title;
$area2 .= elgg_view_title($title);
if ($uploader == 'basic') {
- $area2 .= elgg_view("tidypics/forms/upload", array('album' => $album));
+ $area2 .= elgg_view('input/form', array(
+ 'action' => "{$CONFIG->wwwroot}action/tidypics/upload",
+ 'body' => elgg_view('forms/tidypics/basic_upload', array('album' => $album)),
+ 'internalid' => 'tidypicsUpload',
+ 'enctype' => 'multipart/form-data',
+ 'method' => 'post',
+ ));
+
} else {
- $area2 .= elgg_view("tidypics/forms/ajax_upload", array('album' => $album));
+ $area2 .= elgg_view("forms/tidypics/ajax_upload", array('album' => $album));
}
$body = elgg_view_layout('two_column_left_sidebar', '', $area2);