HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
SFM Plugin: Enhancements and feedback
jackmaessen
✭✭✭
Enhancements and feedback are very welcome!
1
Comments
This is a great idea. I love seeing new addons!
I have a few suggestions:
These changes will make your plugin even better than it already is.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
In addition to that:
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
@hgtonight and @Bleistivt thanks for the suggestions. I was not sure about the safety and the logic of the script so your comments are very welcome.
@jackmaessen: Wow, amazing! I have a wish or a feedback. My users always want to stay in control of their picture uploads via Advanced Editor (they are uploading photos of their babies and themselves, its part of their communication).
Would it make sense to integrate these uploads there as well and make them for the users deleteable and maybe also viewable like a image gallery of all their uploaded files?
MyAttachments was a pretty cool addon doing that. I guess its still working with FileUpload but i use the Advanced Editor in my boards.
Willing to sponsor that integration into SFM.
MyAttachments plugin works by grabbing any image uploaded by the user no matter how it was uploaded. Does it not work for you when you use Advanced Editor?
If it no longer works I will have it deleted…
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I haven't yet had the opportunity to try this plugin but the concept is great, thank you for this plugin! If the plugin doesn't do this already, here is a suggestion: when uploading zip files offer to expand it into the target folder.
i already fixed some issues from advised comments:
Still need some help with the suggestions of @hgtonight:
Launched version 1.1 Now possible to create directories with subdirectories and upload your files in a folder or subfolder of your choice Total storage is recursively calculated
Todo's for version 1.2
Integrate a viewer for image files
extract zip files in folder
download folders; (creating .zip and download)
Still need some more advice how to handle with @hgtonight suggestions:
For those who are interested in the code of sfm.php; please read it critically and give me suggestions and improvements
shoot... I was working on the previous version.
Basically, there should be no data manipulation in your view that doesn't directly relate to how it is output. For example, the list of files should be generated in your controller. You set the data to your controller, then you use that in the view.
The upload form and handling should be done via the Gdn_Form and Gdn_Upload class.
Here is a sample of the work in progress I had:
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
V 1.2 released
xm
Fatal error: Call to undefined function mime_content_type() in Z:\home\wiki.ru\www\plugins\sfm\views\sfm.php on line 464
File Type Time Size View Down Del Rename
That's because you are using Windows: https://www.google.de/#safe=off&q=Call+to+undefined+function+mime_content_type()+windows
I have been trying this out. One thing that struck me is that you're going to the effort of hashing the user upload directory, but in such a way as to make the hashes totally predictable. I amended my code to introduce a salt variable to make the upload directory names difficult to predict.
default.php
sfm.php (line 15)
Good solution @jamesinc ! Really appreciated
Hello, i installed your addon thanks! there is a problem, i have the vanilla running under "mydomain/forum/" and when i click on MyFiles it redirect me on "mydomain/sfm" not to "mydomain/forum/sfm" doing so is not working. Any help please? thank you.
If you have installed vanilla under the
mydomain/forum/
subdomain, everything should work fine.So did you install Vanilla under the
mydomain/forum/
folder?Yes it is, but the MyFiles link doesnt work, here my website: www.proclanservers.com/forum/
Thanks for your reply.
Your url looks like this:
http://www.proclanservers.com/forum/index.php?p=/sfm
So this seems to be a problem with modification rewrite.
Check if you have these lines in your
.htaccess
fileHi thanks for your reply, my file is:
# Original
# If you modify this file then change the above line to: # Modified
RewriteEngine On
# Certain hosts may require the following line.
# If vanilla is in a subfolder then you need to specify it after the /.
# (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
RewriteBase /forum
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
what's wrong please? thanks again.
Well, it looks like he "redirects and dies" because of the url .
Open file sfm.php in plugins/sfm/views/sfm.php and look for these lines:
Now comment out the last 2 lines of it; so now it looks like this:
What happens now?