Switch imageupload and fileupload but keep some options

All support enquiries for DFH go in here...

Switch imageupload and fileupload but keep some options

Postby Fropoo » Tue May 03, 2011 2:00 pm

Hi :)

I wanna keep the "File Upload" part with email, password and file desc options, but change the upload part completely to the imageuploader, so that it uploads then it just gives a bunch of links, but I also want a delete link amongst those, because I don't like current download procedure in file uploading

It could be AWESOME best EVAR :P

Ty for help!
Fropoo
Standard Member
 
Posts: 13
Joined: Tue May 03, 2011 1:29 pm

Re: Switch imageupload and fileupload but keep some options

Postby SamEA » Wed May 04, 2011 1:36 am

Fropoo wrote:Hi :)

I wanna keep the "File Upload" part with email, password and file desc options, but change the upload part completely to the imageuploader, so that it uploads then it just gives a bunch of links, but I also want a delete link amongst those, because I don't like current download procedure in file uploading

It could be AWESOME best EVAR :P

Ty for help!


In DFH v1.2, image uploads now come a delete link. Furthermore, if you require image uploads only, find in ./index.php
Code: Select all
default: include("./pages/upload.php"); break;
and change the default from ./pages/upload.php to ./pages/image.php.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Switch imageupload and fileupload but keep some options

Postby Fropoo » Wed May 04, 2011 1:51 pm

Imagine if you set filetypes allowed to all in the imageuploader, and then you use that as the only uploader, whenever you upload something you get forum link, direct link and delete link and if you upload a picture you get a minature of it, and everything is uploaded like files are so that you can monitor it in the files tab (bandwidth etc)

Also you have the option to set email, password and file describtion.

Would this be hard to achieve?

PS:

I could use the fileuploader I guess, then all would already be ready, but I need to figure out how to generate a direct link then I can just copy paste from imageuploader to get the same type of style links, tho I would prefer the first suggestion. :)
Fropoo
Standard Member
 
Posts: 13
Joined: Tue May 03, 2011 1:29 pm

Re: Switch imageupload and fileupload but keep some options

Postby SamEA » Wed May 04, 2011 2:01 pm

Fropoo wrote:Imagine if you set filetypes allowed to all in the imageuploader, and then you use that as the only uploader, whenever you upload something you get forum link, direct link and delete link and if you upload a picture you get a minature of it, and everything is uploaded like files are so that you can monitor it in the files tab (bandwidth etc)

Also you have the option to set email, password and file describtion.

Would this be hard to achieve?

PS:

I could use the fileuploader I guess, then all would already be ready, but I need to figure out how to generate a direct link then I can just copy paste from imageuploader to get the same type of style links, tho I would prefer the first suggestion. :)


May I ask what you are trying to achieve? Are you wanting the file uploads and image uploads to be combined as one or do you just want Direct Links to the Downloads?
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Switch imageupload and fileupload but keep some options

Postby Fropoo » Wed May 04, 2011 3:38 pm

SamEA wrote:
Fropoo wrote:Imagine if you set filetypes allowed to all in the imageuploader, and then you use that as the only uploader, whenever you upload something you get forum link, direct link and delete link and if you upload a picture you get a minature of it, and everything is uploaded like files are so that you can monitor it in the files tab (bandwidth etc)

Also you have the option to set email, password and file describtion.

Would this be hard to achieve?

PS:

I could use the fileuploader I guess, then all would already be ready, but I need to figure out how to generate a direct link then I can just copy paste from imageuploader to get the same type of style links, tho I would prefer the first suggestion. :)


May I ask what you are trying to achieve? Are you wanting the file uploads and image uploads to be combined as one or do you just want Direct Links to the Downloads?


Yes, I want to have only one uploader (the imageuploader one) and I want all uploaded files to go into "files" in the admin panel to see BW etc, and I want direct link, delete link and the other forum links to be posted after upload is complete.
Fropoo
Standard Member
 
Posts: 13
Joined: Tue May 03, 2011 1:29 pm

Re: Switch imageupload and fileupload but keep some options

Postby SamEA » Wed May 04, 2011 3:51 pm

Fropoo wrote:
SamEA wrote:
Fropoo wrote:Imagine if you set filetypes allowed to all in the imageuploader, and then you use that as the only uploader, whenever you upload something you get forum link, direct link and delete link and if you upload a picture you get a minature of it, and everything is uploaded like files are so that you can monitor it in the files tab (bandwidth etc)

Also you have the option to set email, password and file describtion.

Would this be hard to achieve?

PS:

I could use the fileuploader I guess, then all would already be ready, but I need to figure out how to generate a direct link then I can just copy paste from imageuploader to get the same type of style links, tho I would prefer the first suggestion. :)


May I ask what you are trying to achieve? Are you wanting the file uploads and image uploads to be combined as one or do you just want Direct Links to the Downloads?


Yes, I want to have only one uploader (the imageuploader one) and I want all uploaded files to go into "files" in the admin panel to see BW etc, and I want direct link, delete link and the other forum links to be posted after upload is complete.



The mod you are requesting will take time to finish, and I think it'll be hard to fit in with the other freelance scripts I'm currently working on. However, here is the brief idea of what needs to be done:

You are going to have to merge basic.php and upload.php together as one. You are then going to have to include a piece of code that will check the file extension. If the file type consists of .png, .jpg and so forth, let basic.php handle the request, else let upload.php handle the request.

To modify the template of the file uploaded links, you are going to have to use a similar layout to ./styles/Indigo/image_uploaded.php on ./styles/Indigo/file_uploaded.php.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Switch imageupload and fileupload but keep some options

Postby Fropoo » Wed May 04, 2011 5:06 pm

Thanks for your help man, appreciated.

I just got started with PHP a few months ago, so I'm not really an expert.

I was thinking I could simply use the fileuploader but I somehow change the php?download link to a direct link, gonna be about the same as imageupload except I lose the thumbnail feature, can you tell me how to get a direct link out of it?
Fropoo
Standard Member
 
Posts: 13
Joined: Tue May 03, 2011 1:29 pm

Re: Switch imageupload and fileupload but keep some options

Postby SamEA » Wed May 04, 2011 6:20 pm

Fropoo wrote:Thanks for your help man, appreciated.

I just got started with PHP a few months ago, so I'm not really an expert.

I was thinking I could simply use the fileuploader but I somehow change the php?download link to a direct link, gonna be about the same as imageupload except I lose the thumbnail feature, can you tell me how to get a direct link out of it?


No worries Fropoo.

Sure, is your file host going to be used for your uploads only? If so, just remove the file ./storage/.htaccess and provide your users with a direct link e.g. http://www.example.com/storage/371Example.rar.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Switch imageupload and fileupload but keep some options

Postby Fropoo » Wed May 04, 2011 7:01 pm

SamEA wrote:
Fropoo wrote:Thanks for your help man, appreciated.

I just got started with PHP a few months ago, so I'm not really an expert.

I was thinking I could simply use the fileuploader but I somehow change the php?download link to a direct link, gonna be about the same as imageupload except I lose the thumbnail feature, can you tell me how to get a direct link out of it?


No worries Fropoo.

Sure, is your file host going to be used for your uploads only? If so, just remove the file ./storage/.htaccess and provide your users with a direct link e.g. http://www.example.com/storage/371Example.rar.


For everyone, basically I wanna offer a direct link site (no good of those around huh :))
Fropoo
Standard Member
 
Posts: 13
Joined: Tue May 03, 2011 1:29 pm

Re: Switch imageupload and fileupload but keep some options

Postby SamEA » Wed May 04, 2011 7:22 pm

Fropoo wrote:
SamEA wrote:
Fropoo wrote:Thanks for your help man, appreciated.

I just got started with PHP a few months ago, so I'm not really an expert.

I was thinking I could simply use the fileuploader but I somehow change the php?download link to a direct link, gonna be about the same as imageupload except I lose the thumbnail feature, can you tell me how to get a direct link out of it?


No worries Fropoo.

Sure, is your file host going to be used for your uploads only? If so, just remove the file ./storage/.htaccess and provide your users with a direct link e.g. http://www.example.com/storage/371Example.rar.


For everyone, basically I wanna offer a direct link site (no good of those around huh :))


1. Open ./styles/file_uploaded.php
2. Replace
Code: Select all
<center><b><?php echo $lang[yupfile];?></b></center><br />
<center><?php echo $lang[udownfile];?></center> <p><center> <a href="<?php echo $scripturl .$short .$rand2;?>"><?php echo $scripturl .$short .$rand2;?></a><br />
<p><center><?php echo $lang[udeletefile];?></center> <p><center> <a href="<?php echo $scripturl .$short .$rand2 ."&del=" .$passkey ."&ignore=";?>"><?php echo $scripturl .$short .$rand2 ."&del=" .$passkey ."&ignore=";?></a><br />
<p><center><?php echo $lang[uremfile];?><p>
</center>


with

Code: Select all
<center><b><?php echo $lang[yupfile];?></b></center><br />
<center><?php echo $lang[udownfile];?></center> <p><center> <a href="<?php echo $scripturl ."storage/" .$rand2;?>"><?php echo $scripturl ."storage/" .$rand2;?></a><br />
<p><center><?php echo $lang[udeletefile];?></center> <p><center> <a href="<?php echo $scripturl .$short .$rand2 ."&del=" .$passkey ."&ignore=";?>"><?php echo $scripturl .$short .$rand2 ."&del=" .$passkey ."&ignore=";?></a><br />
<p><center><?php echo $lang[uremfile];?><p>
</center>


3. Remove the file .htaccess in ./storage
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Next

Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 5 guests

cron