HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

A fix to make FileUpload version 1.8.2 to work in Vanilla 2.1 (backport).

peregrineperegrine MVP
edited April 2014 in Feedback

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

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Well it is about time someone fixed this pesky problem, they need to add it to the plugin asap. Thanks for that <3

  • peregrineperegrine MVP
    edited April 2014

    the mod fixes 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

    replacements.zip see attached file

    it contains two files.

    a replacement for:

    class.fileupload.plugin.php
    views/fileupload_functions.php


    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. :)


    • I am not supporting providng support.
    • The replacements zip for fileupload version 1.82 works for me in vanilla 2.1rc1
    • If it works for you great. then it would be cool if you said it worked for you. just to know.

    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!

  • peregrineperegrine MVP
    edited May 2014

    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! :)

  • IonmarcuIonmarcu Bucharest

    worked for me, thank you,

    Ion

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    hi @peregrine: When i download replacements-2.zip and unzip, there is nothing inside the folder. Just as info.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • edited June 2014

    @phreak said:
    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.

  • peregrineperegrine MVP
    edited June 2014

    @phreak said:
    hi peregrine: When i download replacements-2.zip and unzip, there is nothing inside the folder. Just as info.

    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.

  • @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?

  • peregrineperegrine MVP
    edited June 2014

    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.

  • karenrkarenr Vanilla 2.1 stable New

    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" o:) in my book!

  • @karenr said:
    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" o:) 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?

  • peregrineperegrine MVP
    edited July 2014

    @dimi3 said:
    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.

Sign In or Register to comment.