A fix to make FileUpload version 1.8.2 to work in Vanilla 2.1 (backport).
made some mods to not blow up on PermissionsCategory. Although I can't see how ver 1.8.2 it could respect category upload privs any better then 1.7.1
it does work with 2.1RC1
added the PermissionsCategory function that caused 1.8.2 to blow up in 2.1RC (although this needs alot more logic to work correctly), so it essentially works the same was as it did in 1.71 as far as permissions, but has more improvements than 1.7.1
fixed the following things:
- if the image size was small (50 x 50) it didn't show up as an attachment, now it does.
- if the upload was not an image it didn't correctly show the file.png image (default thumbnail), now it does.
- version 1.7.1 didn't seem to work properly with 2.1RC1
- includes the js fixes that are deprecated in new versions of jquery.
attached are the changes files. just get version 1.8.2 of the plugin from github and overwrite the files in the zip folder.
I am not supporting these changes if anyone has issues. It works for me. If it works for you great. if it doesn't work for you, well, I am not the developer of the plugin.
remember if you want to change file types that be uploaded add the names in the array to your liking in
config.php with this statement. You can add the statements in your config.php if they don't exist.
$Configuration['Garden']['Upload']['AllowedFileExtensions']= array('txt','jpg','jpeg','gif','png','bmp','tiff','zip','gz','tar.gz','tgz','mp3','psd','ai','fla','swf','pdf','doc','xls','ppt','docx','xlsx','log','rar','7z','wav','aiff','mov');
and if you want to change size $Configuration['Garden']['Upload']['MaxFileSize']= '8M';
but you also have to make sure your php.ini file also supports the max size as well.
e.g.
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 8M
- I am not supporting these changes if anyone has issues.
- The replacements zip for fileupload version 1.82 works for me in vanilla 2.1rc1
- If it works for you great.
if it doesn't work for you, well, I am not the developer of the plugin.
if the plugin mod changes (for ver 1.8.2 available on github) work for you with 2.1Rc1 or 2.1b3, it would be cool if you said it worked for you. just to know.
ver 1.8.2 of fileuploads is available here.
https://github.com/vanillaforums/Addons
install steps:
1) extract for the fileupload plugin from the Addons on github.
2) and then copy the replacements from the replacements.zip file attached over the 1.8.2 install of FileUploads.
until there is a better solution.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Comments
Well it is about time someone fixed this pesky problem, they need to add it to the plugin asap. Thanks for that
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
the mod fixes the following things:
after retrieving ver 1.8.2 of fileuploads is available here.
https://github.com/vanillaforums/Addons
install steps:
1) extract for the fileupload plugin ver 1.8.2 from the Addons on github and place in your plugins directory.
2) download the replacements zip.
3) extract and copy the 2 files in the zip to the proper places in your FileUpload folder.
4) after you make the changes it should say 1.8.2.1 in your dashboard.
5) You should disable and re-enable the plugin after changes.
until there is a better solution.
if it doesn't work for you, well, I am not the developer of the plugin.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
awesome thanks @peregrine just what i needed
@peregrine It worked for me! Thanks so much!
unfortunately, I couldn't replace the previous replacements.zip - so if people don't read the final message, they will be going through multiple steps.
I also could not give it the same name, because it won't allow me to delete the old replacements.zip, and it won't allow me to upload one with the same name.
so follow the same instructions in http://vanillaforums.org/discussion/26644/a-fix-to-make-fileupload-version-1-8-2-to-work-in-vanilla-2-1-backport
but use replacements-2.zip instead
a fix to the previous replacements.zip, now called replacements-2.zip
fixes the preview size of image immediately after attachment.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Great job, @peregrine, another problem solved!
worked for me, thank you,
Ion
hi @peregrine: When i download replacements-2.zip and unzip, there is nothing inside the folder. Just as info.
I downloaded it just now. 1 folder called replacements that contains 1 file, a folder called views, and a file inside the views folder. Seems to be working fine as that is what was in it 3 nights ago when I used it.
Perhaps you haven't let the grapes ripen, or didn't understand or follow the instructions in the thread, please explain what you did step by step, plz sir. and your browser type and the exact contents of the file.
but seriously this link my provide insights about browser functionality on this forum
http://vanillaforums.org/discussion/comment/210364/#Comment_210364
as eric and the few others that took the time to respond positively, it all seemed to work for them. I suspect some people may have trouble, but that is possibly a result of a pin the tail on a normal distribution.
also http://vanillaforums.org/discussion/comment/210445/#Comment_210445
http://vanillaforums.org/discussion/comment/210778/#Comment_210778
and when time permits you can step up to the plate, and add to the plugins that work in 2.1 as a proud contiributor that you are.
(some forum members don't have the time or ability to add to the list, for whatever reason).
since you apparently are using 2.1, otherwise you wouldn't be tagging along in this thread.
http://vanillaforums.org/discussion/26703/plugins-themes-that-work-and-don-t-work-in-vanilla-2-1
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
to make jquery fancybox plugin work with file attachments.... using fileupload plugin in vanilla 2.1
around line 12 in views/link_files.php in fileupload plugin 1.8.2.1
change
to
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine, I've just tested the fancybox plugin with that fileupload plugin modification, and it works as expected when clicking on a thumbnail, but when clicking on a pictures that has "This image has been resized to fit in the page. Click to enlarge." below the image, it opens on a new page as if the fancybox plugin wasn't installed.
I guess there is something wrong with the fancybox plugin, which I downloaded from the Github Repo. As far as I could see it wasn't really updated since 2011, which is why avoided that plugin in the first place thinking it wasn't compatible with Vanilla 2.1.
Does the fancybox plugin work for you as expected?
I pmmed you, but disregard.
here are changes that worked for me for inline images. if it works for you great. if not....
http://vanillaforums.org/discussion/comment/211082/#Comment_211082
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thank you Peregrine, this fix worked for me and I really appreciate your input.
I promise to add my own "works and doesn't work" list to the appropriate thread as soon as I finish determining that, still ironing out some weird bugs trying to determine where each error is originating from. Meanwhile though - "you da man" in my book!
thank you.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I am confused... sorry where is this replacement-2zip?
it is an attached file in this comment.
http://vanillaforums.org/discussion/comment/208389/#Comment_208389
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@Lilylu and anyone else.....
complete instructions.
for FileUpload 1.8.2.1
1 - disable fileupload plugin
2 - remove this folder /plugins/FileUpload
3- download add-ons
https://github.com/vanillaforums/Addons
4 - unzip addson zip file
5 copy file Fileupload folder to /plugins/FileUpload
6 download the replacements2.zip here
https://us.v-cdn.net/5018160/uploads/editor/y2/l1nbhc6n818g.zip
7 extract the files
copy the 2 the files in zip to their respective places
replacements/class.fileupload.plugin.php goes to /plugins/FileUpload/class.fileupload.plugin.php
replacements/views/fileupload_functions.php goes to /plugins/FileUpload/views/fileupload_functions.php
8 - enable plugin. it should say 1.8.2.1
remember if you want to change file types that be uploaded add the names in the array to your liking in config.php with this statement. You can add the statements in your config.php if they don't exist.
$Configuration['Garden']['Upload']['AllowedFileExtensions']= array('txt','jpg','jpeg','gif','png','bmp','tiff','zip','gz','tar.gz','tgz','mp3','psd','ai','fla','swf','pdf','doc','xls','ppt','docx','xlsx','log','rar','7z','wav','aiff','mov');
and if you want to change size $Configuration['Garden']['Upload']['MaxFileSize']= '8M';
but you also have to make sure your php.ini file also supports the max size as well.
e.g.
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 8M
see for another tweak - not necessary for (just an optional idea.
make sure everything works for step 8 before making change.
http://vanillaforums.org/discussion/comment/211068/#Comment_211068
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
if you are using vanilla 2.1.3 and you have an issue deleting attachments.
for step 6 + 7 in the above comment.
use replacements3.zip instead of replacements2.zip
see attachment below for the zip.
copy the 3 files in zip to their respective places
replacements/class.fileupload.plugin.php goes to /plugins/FileUpload/class.fileupload.plugin.php
replacements/views/fileupload_functions.php goes to /plugins/FileUpload/views/fileupload_functions.php
replacements/js/fileupload.js goes to /plugins/FileUpload/js/fileupload.js
this includes the fix mentioned by @Bleistivt
http://vanillaforums.org/discussion/comment/216330/#Comment_216330
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.