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
|
|
|
|
Rank: Advanced Member
Groups: Member
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 |
|
|
|
|
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 ADDEDCode: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.phpCode:$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.phpCode:$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
|
|
|
|
Rank: Advanced Member
Groups: Member
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. |
|
|
|
|
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:
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/21/2006(UTC) Posts: 15
|
form details Edited by user Wednesday, December 19, 2007 4:11:14 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
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 |
|
|
|
|
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 |
|
|
|
|
Rank: Advanced Member
Groups: Member
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 |
|
|
|
|
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 |
|
|
|
|
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=36I use XAMPP for Windows. |
|
|
|
|
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.