Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Hacim  
#1 Posted : Wednesday, June 21, 2006 12:13:44 PM(UTC)
Hacim

Rank: Member

Groups: Member
Joined: 6/21/2006(UTC)
Posts: 15

Hello there,
So far i have the folders being created dynamically using the provided upload.php script (ie Alex or whatever is in the field box). The folders are created based on the Author field (default = Alex) & thumbnails are created in this folder, however i can't seem to find a way to get the gallery.php to recieve the author. at the moment the upload.php recieves the author and creates a directory accordingly. i need author in the gallery.php cause the directory path is needed in gallery.php.

is this parameter able to be changed to include the author?

Code:
//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "gallery.php");


or there a better way to get the author in gallery.php

Thank you
:w00t:

Edited by user Saturday, February 23, 2008 1:08:34 AM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Thursday, June 22, 2006 3:08:06 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

You could use manual redirect through Progress event listener to redirect to the PictureGallery with the Author name as a parameter:

Code:
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText){
    if (Status=="COMPLETE"){
	   window.location = ' gallery.php?authorName=' + authorName;  
    }

Edited by user Saturday, February 23, 2008 1:06:48 AM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Hacim  
#3 Posted : Thursday, June 22, 2006 6:03:28 PM(UTC)
Hacim

Rank: Member

Groups: Member
Joined: 6/21/2006(UTC)
Posts: 15

i Have tried adding the function, unfortunatley it doesn't seem to wanna run for me: :hehe:

Index.php
ADDED

Code:
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText){
if (Status=="COMPLETE"){
window.location = ' gallery.php?author=' + author; 
}

iu.addEventListener("Progress", "ImageUploader_Progress");




COMMENTED OUT(ive tried without commenting out)

Code:
// iu.addParam("RedirectUrl","gallery.php?author=");



Relevant script info in Upload.php

Code:
$author = $_POST ['Author'];
$galleryPath = realpath("Gallery");
$Thumbnail= 'Thumbnail';
include("gallery.php");

mkdir($galleryPath . "/". $author  , 0700);
$absGalleryPath = realpath("Gallery" . "/" . $author). "/";
mkdir($absGalleryPath . "/". $Thumbnail , 0700);
$absThumbnailsPath = realpath("$absGalleryPath" . "/" . "Thumbnail") . "/";



Relevant script info in gallery.php

Code:
$author = $_GET['Author'];
$absGalleryPath = realpath("Gallery" . "/" . "$author"). "/";
$absThumbnailsPath = realpath("$absGalleryPath" . "/" . "Thumbnail") . "/";

Edited by user Saturday, February 23, 2008 1:07:10 AM(UTC)  | Reason: Not specified

Alex Makhov  
#4 Posted : Sunday, June 25, 2006 12:23:10 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

In what explicit piece of code it does not work? Does it redirect to the gallery path with the specified parameter? Does the gallery script able to retrieve Author name from the parameter? In your code you send parameter as ‘author’ but trying to read it as ‘Author’. Are you sure it is case insensitive? Please check where the real problem is.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Hacim  
#5 Posted : Tuesday, June 27, 2006 1:04:22 PM(UTC)
Hacim

Rank: Member

Groups: Member
Joined: 6/21/2006(UTC)
Posts: 15

Thank you for your reply,

i am unable to recieve a variable from thr form into the gallery.php file,

iu.addParam("RedirectUrl","gallery.php?author");


Author:

Hacim  
#6 Posted : Tuesday, June 27, 2006 1:06:19 PM(UTC)
Hacim

Rank: Member

Groups: Member
Joined: 6/21/2006(UTC)
Posts: 15

form details

Code:
 Author:  

Edited by user Wednesday, December 19, 2007 4:11:14 PM(UTC)  | Reason: Not specified

Alex Makhov  
#7 Posted : Tuesday, June 27, 2006 6:31:35 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

What is the result of using the following code in your case?

Code:
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText){
    if (Status=="COMPLETE"){
        window.location = ' gallery.php?author=' + author; 
    }
}

Edited by user Saturday, February 23, 2008 1:08:21 AM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
newvisionjeff  
#8 Posted : Thursday, June 29, 2006 11:40:53 PM(UTC)
newvisionjeff

Rank: Advanced Member

Groups: Member
Joined: 4/19/2006(UTC)
Posts: 42

I am curious as to what the code is to create a dynamic folder for each upload. I have been asking around but no one really has helped me much.

I appreciate any feedback.

Jeff
Jeff MacDougall
New Vision Color Lab
www.newvisioncolorlab.com
www.modebook.com
Alex Makhov  
#9 Posted : Friday, June 30, 2006 2:24:48 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Code:
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText){
    if (Status=="COMPLETE")
    {
        //Redirect to the gallery page with the value of Author field as a parameter
        window.location = 'gallery.php?author=' +  document.getElementById('Author').value; 
}
.....
//Turn of redirection via Image Uploader
iu.addParam("RedirectUrl", "");

Edited by user Saturday, February 23, 2008 1:08:02 AM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
newvisionjeff  
#10 Posted : Monday, July 30, 2007 2:39:50 AM(UTC)
newvisionjeff

Rank: Advanced Member

Groups: Member
Joined: 4/19/2006(UTC)
Posts: 42

I have once again here in 2007 referred back to this thread because I need to do this same thing again myself. I have the problem where the dynamic folder is not being created. I am curious if the code above is correct. I also was wondering the correct placement of the code above for index.php, gallery.php and upload.php.

Thanks

jeff
Jeff MacDougall
New Vision Color Lab
www.newvisioncolorlab.com
www.modebook.com
newvisionjeff  
#11 Posted : Monday, July 30, 2007 5:23:06 AM(UTC)
newvisionjeff

Rank: Advanced Member

Groups: Member
Joined: 4/19/2006(UTC)
Posts: 42

OK, I have actually gotten this to work. It will create a dynamic folder in ActiveX only. JAVA just puts the files right to the Gallery root. Can someone explain this to me and is there a fix?

My site is at http://www.newvisioncolo...on=com_wrapper&Itemid=36

I use XAMPP for Windows.


Jeff MacDougall
New Vision Color Lab
www.newvisioncolorlab.com
www.modebook.com
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.