News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[Request] Multiple attachments at once !!!

Started by Nitesh Kunnath, March 16, 2012, 03:04:33 AM

Previous topic - Next topic

hackrishna

Quote from: die2mrw007 on March 17, 2012, 07:47:22 AM
Quote from: Kindred on March 17, 2012, 07:26:42 AM
die....   I never said it would do any HARM in the core...   I said it would probably be faster and better to request it as a mod at this time.

See...   this is how we sometimes evaluate features which may or may not be desirable to add to the core product. If they are popular as mods, then there is a good chance that it is worth adding them to the core....   if not, then it is clear that they are minimally used features and are better left as mods.

THINK about it...  if we added every single "oh that would be neat" feature request, then suddenly we have code which is 200 time bigger than it needs to be with all sorts of potential for conflict and errors within the base code - all for features that less than 1% of the admins actually even use.  That's called BLOAT.

I am not saying that your request is unreasonable nor that this feature WOULD be bloat...    but consider the fact that sometimes a mod is the best way to evaluate the usefulness of an enhancement or feature.

I see...thanks for the explanation Kindred :)
I do agree with you.

BTW, you said, someone accepted this request to work upon...who is that developer ? and can we expect it to arrive in SMF mods section ?
I did posted this in mods request thread too...but there wasnt anyone interested to work upon this. Sad :(

I wish i knew to make/parse mods :( Sad :(
I have the flash uploader scripts and files, but unaware of combining it with SMF  ;D

hackrishna

Quote from: niko on March 17, 2012, 07:49:18 AM
Probably easiest way to do this in SMF 1.1 and SMF 2.0 is to simple add "multiple" attribute to attachment inputs on Post.template.php of every theme.
It works since it upload exactly the same way as it would when you selected files in different boxes.


ummm .... Need to try this out ...

Quote from: die2mrw007 on March 17, 2012, 07:52:20 AM
Internet Explorer is used only to download Mozilla Firefox, Google Chrome and other browsers nowadays ;D
LOL, very rare percentage uses IE :P



hahahaha roflol ... true!  ;D

Aleksi "Lex" Kilpinen

Actually, not true. IE is still very largely used.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

hackrishna

Quote from: Aleksi "Lex" Kilpinen on March 18, 2012, 12:39:28 AM
Actually, not true. IE is still very largely used.

It is very largely used, no doubts, but lacks many things. I found it uncomfortable managing forum using IE :(

I heard IE 10 is good .... :)

Nitesh Kunnath

Quote from: Aleksi "Lex" Kilpinen on March 18, 2012, 12:39:28 AM
Actually, not true. IE is still very largely used.
Reason for this is: Windows is widely used worldwide. As its the default inbuilt browser, large percentage even today dont know to explore internet more than their default values. I mean, they still adjust with IE even if it isnt working good for them for the fact that they either dont know to install other apps in computer or maybe they think, IE is provided by Microsoft and maybe its the best for security (which isnt true). IE has many drawbacks of security simply because hackers target IE the most knowing the fact its the default browser set for Windows.

hackrishna

Quote from: die2mrw007 on March 18, 2012, 01:47:39 AM
Reason for this is: Windows is widely used worldwide. As its the default inbuilt browser, large percentage even today dont know to explore internet more than their default values. I mean, they still adjust with IE even if it isnt working good for them for the fact that they either dont know to install other apps in computer or maybe they think, IE is provided by Microsoft and maybe its the best for security (which isnt true). IE has many drawbacks of security simply because hackers target IE the most knowing the fact its the default browser set for Windows.

Now that's true  ;D

jinniman

I would like to know how to add multiple attachments in one go too.

Does anyone have an example of how the code looks like so I can do something similar for my themes.

Best regards

Kindred

Quote from: niko on March 17, 2012, 07:49:18 AM
Probably easiest way to do this in SMF 1.1 and SMF 2.0 is to simple add "multiple" attribute to attachment inputs on Post.template.php of every theme.
It works since it upload exactly the same way as it would when you selected files in different boxes.

No flash required but Internet Explorer isn't supported (can only select one file, so it doesn't break). Also it lets you select more attachments than allowed.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Nitesh Kunnath

Quote from: Kindred on March 18, 2012, 01:06:00 PM
Quote from: niko on March 17, 2012, 07:49:18 AM
Probably easiest way to do this in SMF 1.1 and SMF 2.0 is to simple add "multiple" attribute to attachment inputs on Post.template.php of every theme.
It works since it upload exactly the same way as it would when you selected files in different boxes.

No flash required but Internet Explorer isn't supported (can only select one file, so it doesn't break). Also it lets you select more attachments than allowed.
Can you explain more on this ? I am little confused over this infact... I couldnt figure out what exactly needs to be done here....

niko

in Post.template.php find
Quotetype="file"
and replace with
Quotetype="file" multiple="multiple"

Its there two times.
Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

IchBin™

Quote from: Aleksi "Lex" Kilpinen on March 18, 2012, 12:39:28 AM
Actually, not true. IE is still very largely used.

I think you missed the tongue smiley in the post you responded too?

It probably is true that IE is used more to download other browsers as no other browser is installed in order to actually download another browser. :)
IchBin™        TinyPortal

jinniman

Quote from: niko on March 18, 2012, 03:31:04 PM
in Post.template.php find
Quotetype="file"
and replace with
Quotetype="file" multiple="multiple"

Its there two times.

Many thanks this worked.

I would imagine it would be really straight forward to make a mod to do this automatically?

Best regards

Nitesh Kunnath

Quote from: niko on March 18, 2012, 03:31:04 PM
in Post.template.php find
Quotetype="file"
and replace with
Quotetype="file" multiple="multiple"

Its there two times.
thanks buddy :)

hackrishna

Quote from: die2mrw007 on March 18, 2012, 05:32:12 PM
Quote from: niko on March 18, 2012, 03:31:04 PM
in Post.template.php find
Quotetype="file"
and replace with
Quotetype="file" multiple="multiple"

Its there two times.
thanks buddy :)

Does that work in SMF 2.0.2 ??

niko

Quote from: hackrishna on March 18, 2012, 05:54:02 PM
Quote from: die2mrw007 on March 18, 2012, 05:32:12 PM
Quote from: niko on March 18, 2012, 03:31:04 PM
in Post.template.php find
Quotetype="file"
and replace with
Quotetype="file" multiple="multiple"

Its there two times.
thanks buddy :)

Does that work in SMF 2.0.2 ??

Yes. 1.0, 1.1, 2.0 should all work
Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

Nitesh Kunnath

Quote from: hackrishna on March 18, 2012, 05:54:02 PM
Quote from: die2mrw007 on March 18, 2012, 05:32:12 PM
Quote from: niko on March 18, 2012, 03:31:04 PM
in Post.template.php find
Quotetype="file"
and replace with
Quotetype="file" multiple="multiple"

Its there two times.
thanks buddy :)

Does that work in SMF 2.0.2 ??
yup, it do work fine :)

hackrishna

in post.template.php .. i didn't find those  :(

It's something like this

<input type="file" size="60" name="attachment[]" id="attachment\' + current_attachment + \'" class="input_file" />

Nitesh Kunnath

Quote from: hackrishna on March 18, 2012, 06:03:52 PM
in post.template.php .. i didn't find those  :(

It's something like this

<input type="file" size="60" name="attachment[]" id="attachment\' + current_attachment + \'" class="input_file" />
yup instead of type="file"
change it to type="file" multiple="multiple"

Exactly like this:
<input type="file" multiple="multiple" size="60" name="attachment[]" id="attachment\' + current_attachment + \'" class="input_file" />

hackrishna

Quote from: die2mrw007 on March 18, 2012, 06:05:22 PM
Quote from: hackrishna on March 18, 2012, 06:03:52 PM
in post.template.php .. i didn't find those  :(

It's something like this

<input type="file" size="60" name="attachment[]" id="attachment\' + current_attachment + \'" class="input_file" />
yup instead of type="file"
change it to type="file" multiple="multiple"

lol ok :D

In all places ???

Nitesh Kunnath

Quote from: hackrishna on March 18, 2012, 06:06:05 PM
Quote from: die2mrw007 on March 18, 2012, 06:05:22 PM
Quote from: hackrishna on March 18, 2012, 06:03:52 PM
in post.template.php .. i didn't find those  :(

It's something like this

<input type="file" size="60" name="attachment[]" id="attachment\' + current_attachment + \'" class="input_file" />
yup instead of type="file"
change it to type="file" multiple="multiple"

lol ok :D

In all places ???
there are two places in total :)
check it...use "find" function of Notepad editor :P

Advertisement: