The new and improved Attachments extension
- Uses SQL Table to store attachment information
- Faster and more stable
- Fully extendible
*NEW* You can import your old attachments (for all versions Attachments 1.x)
This is the core package.
*** Addons for this extension***
- Inline Images (display/resize the images instead of showing it as a download link)
- Multi File Upload (upload multiple attachments at once)
Other Requirements (if any):
skube I'm probably the only person who does this, but that's not stopping me from making this suggestion anyway... It would be nice if the whole attachment input/button was hidden by default. I find I'm constantly hitting the wrong button when posting (browse instead of post comment). Of all the comments created, only a very small percentage require an attachment. I think it would be sleeker, if only when you needed to attach a file, you would click an expansion box, which would reveal the necessary tools required for the task at hand.
Doesn't bother me personally, but I still like the idea :)
skube Yeah, I'm all about clean, context-dependent interfaces.
u can edit the file or use CSS to move it to another palce
Uploading images works fine. When I try to upload a PDF the following error occurs:You are not allowed to upload (filename.pdf) the requested file type: application/force-download
I tried to find a solution here, but found none. Can anybody help?
Man, this needs to go in the FAQ... There's a recent post by me on this, but basically you need to add the "application/force-download" bit to the default.php of Attachements. If you open the file up, you'll see a bunch of lines with that kinda thing in them and you should get the idea - I did and I know *very* little about PHP. Sorry I can't be more descriptive right now, but I'm off to a antenatal class... (search, and you'll find several threads on this).
Hello skube,
I think this is what you were looking for:
http://lussumo.com/community/discussion/5628/multi-file-upload/
skube You are the man, Jazzman. Thx!
Thanks Stash, that works.
I've mentioned this before, but got zero response, so I thought I'd try again because I think it's a great idea :)
Originally from Multi File Upload discussion:This extension rocks. Would be nice to have a GUI so we can manually change the max number of uploads, and perhaps also some indication by the upload box that says how many files can be uploaded at once? I have to say that this, combined with ThickBox rocks :) With Inline Images and thumbnails set to 125px, it's like an instant gallery :)
I have also been thinking a little regarding Attachments' extensions. I personally believe they should go into a subdirectory of the Attachments extension, so something like:/extensions/Attachments/InlineImages<br />/extensions/Attachments/MultiFileUpload<br />/extensions/Attachments/AnotherNewAttchmentsExtension
After all, they all REQUIRE Attachments to work any way. Then we could perhaps also have their options GUIs selectable from a dropdown menu in the Attachments Extensions Options screen? It would keep things nice and neat and together in the attachment extensions area of the panel. I mean it's fine right now with only two extensions to Attachments, but what about when there are 5, 10, 16?
This is how I would envisage the admin side looking. The relevant section wouldn't show up if the extension isnt installed.![]()
It's a great extension but I've found a minor bug in it. In default.php in three places it says MineType instead of MimeType, which makes it not retrieve the attachment MIME type properly from database. Other than that, everything's perfect, it seems.
BTW If I may have a suggestion, could you also allow Excel (XLS, application/vnd.ms-excel) and PowerPoint (PPT, application/vnd.ms-powerpoint) files by default in the next release?
@CandleWithHare naise that bug is probably the reason for some of my buggy problems... you can add any file type you want in the default.php file. so far I havent been able to see the file type options in the settings page, but have edited it manually. btw, is there a way for it to say just accept all types? i run two private forums where I trust everyone and therefore, want to let them post whatever
this add on conflicts with quotes. try to quote a message that has attachments.
it displays the quote message like this;
"Mesajlarınıza youtube, google video ve ifilm videoları ekleyebilirsiniz. Yapmanız gereken tek şey video linklerini mesajlarınıza yazmak.[div id=Attachments_16 class=Attachments][ul][div]video.gif[/div][/ul][/div]"
Hello, when posting a non-allowed file type I get this message: Some problems were encountered The requested discussion could not be found. I believe the error message is supposed to be something like "this file type is not allowed" or similar. Does anyone know how to fix this? Is it possible to configure this add-on to accept all file types? [edit] I just discovered that I also get the very same error message when deleting a discussion (the discussion gets deleted, and then the error displays). I guess the problem is related to my Vanilla configuration, and not the add-on... Disregard that - seems to be caused by me turning off Deleted comments visible for admins. The attachment-problem still persists...
Now it's working - probably caused by a recent upgrade of my mediatemple server.
I installed it, when i test posting a comment with an attachment, i get the page not found. however, the post is live and its under discussion and the attachment is there also.
how to fix this issue?
Is there any way to manage the uploaded files?
I have properly installed this extension, but I cannot add attachments. Why I select an attachment via Browse and then click "Add your comments," I get a red text error that states the following:
Some problems were encountered
An error occured while creating a new attachment folder. Check your upload path permissions
How do I fix this problem?
(I know how to change permissions on files/folders via my FTP client, so if someone can guide me to the specific files/folders that need to be changed, I would greatly appreciate it. Keep in mind though that I changed all the permissions properly to setup my Vanilla forum, in strict accordance to the 3 step guidelines for setting up Vanilla. Please also note that I have another permissions problem reported here.)
Have you made a folder named uploads in your vanilla folder? Also, it needs to be chmodded to 755.
Kim, there is more than one "vanilla" folder! There is one inside "library" and another inside "themes." I created an "uploads" folder in "library" and gave it 755 permissions. I tried attaching a file and got no error this time, but my attachment was not saved (doesn't appear in the discussion thread nor is there a file in the "uploads" directory I made). I tried it again, making another "uploads" folder in the root directory (where all my Vanilla files are stored), but when I tried it again I got the same thing -- no error, but no file uploaded.
Any further suggestions would be greatly appreciated.
Thank you!
The uploads folder needs to be in the main vanilla directory (same level as ajax, appg, conf, extensions, etc.).
Inside that folder, you need to create another folder called Attachments (note the uppercase A).
Then check the path in your admin panel for Attachment Settings, and make sure that it matches what you have on your server.
You only need to make the uploads-folder, no need for any additional folder inside it (unless you explicit specify that in your Extension settings, that's probably what dhdesign did). With the default settings, the attachments are saved in [your vanilla dir]/uploads/[year]/[month]/
dhdesign! Thank you for the extra specifics. I knew there was more to it!
I deleted the uploads folders I made earlier today. I then went to the root directory where all my Vanilla files are stored and then created a new folder called "uploads". I then opened "uploads" and created a folder named "Attachments". I made sure both folders have 755 permissions.
I then tried uploading. Just like earlier today though, I get no error but no file uploads.
I am not following you when you say: "check the path in your admin panel for Attachment Settings"! Where in the world is that? I clicked the Settings tab and checked under all the items (Application Settings, Updates & Reminders, Roles & Persmissions, Registration Settings, Categories, Extensions, Themes & Styles, Languages, and Membership Applications) -- nothing that says "Attachment Settings." I then clicked the Account tab and checked everything there (Personal Information, Change Password, Change Role, Forum Preferences, Languages) -- nothing that says "Attachment Settings."
Am I losing my mind! I think so!
kimC, like I said, it's just not working. Earlier today I created an "uploads" folder in my root directory. I didn't create a "year" or "month" sub-directory, but I don't have to right? And what of these mysterious "Attachment Settings" that dhdesign speaks of?
Thanks.
i think its pretty obvious you need to solve the database problem before looking to fix anything else JDW. check my reply on the other thread
I just replied in that thread.
JDW -
The uploads folder can be set at 755, but make sure the Attachments folder inside it has its permissions set to 777 so that the uploaded file can be saved.
Attachments Settings is found in the Settings tab under Extension Options, at the bottom of the left panel. That is where you set your path - it will probably look something ilke this: /home/yourusername/public_html/yourdomain/vanillafoldername/uploads/Attachments/. You will need to add the appropriate tags to designate how you want your uploads sorted (i.e., %day%, %month%, %year%, %userid%), if you want them sorted. Mine is set for %year%/%userid%/. Make sure you put the trailing slash at the end, after the last tag.
You don't need to create any other folders inside the Attachments for day, month, year, or userid - Vanilla will create the appropriate folders when you upload an attachment.
Hope this helps!
Thank you for the advice on setting the Attachments folder to 777. I have now done that (leaving the outside folder "uploads" set to the default 755 permissions).
Thank you for the specifics on where the Attachment Settings option should be found. Sadly, it is no where to be found. As I mentioned in my post above, you can see that no such "Attachment Settings" exists anywhere in Vanilla when I am logged in as an Admin. Here's a screenshot showing you exactly what I see. Note that although I have properly installed the Attachments 2.1 extension, "Attachment Settings" is no where to be found!
Please help!
Just a shot in the dark: Have you tried to deactivate all the extensions but the Attachment-extension, to see if the Attachment settings is still gone?
I've a similar problem to JDW
I've created the folders like described and so the system looks like:
root:
->
ajax
conf
extensions
uploads
.
.
.
Inside uplodas, there is only the AccountPicutre folder (btw: this ext. works).
The setting of the attachments is:
"http://my-url.com/Forum/uploads/%userid%/"
But whenever I want to attach a File, I get:
An error occured while creating a new attachment folder. Check your upload path permissions
Although the uploads folder has chmod 777 permission.
Need help,
Richard
KimC, thanks for the reply.
I actually have been advised to do a reinstall of Vanilla. And I attempted such yesterday as posted here. But as you can read in that post, I cannot for the life of me figure out how to do get past that error and do a clean install!
To my joy, I awoke this morning to see a post from "Mark" in that thread (I had long hoped Mark would put a reply there). But my jaw hit the floor when I read the content of his post, seeing that it had nothing at all to do with the pain and suffering I had posted in that thread over the past several days (pain and suffering which now comprises the bulk of that thread).
Suffice it to say, I am greatly disheartened about the feasibility of getting Vanilla to work at all for me at this stage. If even the author of Vanilla won't comment about fundamental problems with Vanilla, I'm not sure there is much more I can do -- I'm swimming upstream right now.
UPDATE: I started a new discussion here to see if more people would spot it and offer their thoughts. I can only hope they will.
Rysk, looks like you have the wrong path for your attachments folder. You shouldn't have your URL, but the actual filesystem path for your webserver. Yours will be different from mine, but mine looks like this:/home/.frac/exhibitq_com/exhibitq.com/talk/uploads/%year%/%month%/
Stash, if I can ever get my Vanilla installation up and running this new post will then become relevant...
What is the TRUTH about the exact path to attachments? I am hearing conflicting reports. For example, I have the following path to my Vanilla files (where "jdwdomain" is substituted for my actual domain):
www.jdwdomain.com/forum/
Now, I've been told to recreat this (with a capital "A"):
www.jdwdomain.com/forum/Attachments
But I then was told to create this:
www.jdwdomain.com/forum/Attachments/uploads/
And now I hear that I need this?
www.jdwdomain.com/forum/Attachments/uploads/%year%/%month%/
If so, just to confirm, you are saying we need to put in THAT EXACT TEXT? Meaning the percent signs and all? And so long as the permissions for Attachments and uploads and %year% and %month% are all 777, it should work?
Thanks.
pbear at the risk of totally confusing the issue...
You make your "uploads" folder (just one folder) here:
www.jdwdomain.com/forum/uploads/
If that is the folder you made and the place you made it, then the path with percentages that you enter in the extension's preferences (under Settings > Attachments) will look something like:
www.jdwdomain.com/forum/uploads/%year%/%month%/
The %year% and other variables are just placeholders for folders the Attachments extension itself will make to organize the images people attach. So you don't end up with one folder of 20,000 image files (unless you want that, of course).
Note: your Attachments extension is located here:
www.jdwdomain.com/forum/extensions/Attachments/
but that is different from the "uploads" folder.
Here's how I set mine up in the Attachments extension panel:**
... /pbear.net/aiga/uploads/user%userid%_%year%/
so Attachments makes a folder in uploads that has additional folders for each user, e.g. that ending above would become this folder for an actual User #32 who uploaded something in 2006: user32_2006. When User #32 uploads something in 2007, Attachments will create another folder in uploads called user32_2007, and so on...
I did it this way so I can keep each user's images separate from each other. And by year such I could easily find all folders for older years and delete them to make more space on the server.
** the path was a little different at the start due to my host's setup, but I dare say that Attachments found the uploads folder I created and provided the path for me. I just altered the end part.
Thank you for the reply, but I am still quite confused about those % symbols and the text in between them ("variables"). So you are saying that I do NOT create any folders named "%year%"? If not, you are telling me to create only one folder named "uploads" within my Vanilla folder root domain, as follows?
www.jdwdomain.com/forum/uploads/
If so, then I assume that the Attachments extension will then create all the folders it needs INSIDE the uploads folder automatically? Meaning if I have 200 users, then I could have 200 unique folders auto-generated by the Attachments extension each year inside that uploads folder?
Thanks.
@jdw - yes, that is correct
@Stash:
This was the crucially hint. After changing the path, I got the
application/force-download
but like you sat before, I changed the default.php and it works wunderful...
thank you very very much
Greetz, Richard
Glad it worked for you Rysk.
JDW, read my comment again. You need to have a file system path to your uplads directory, not a URL path - sorry if you already understood the difference here. The % parts are merely auto created directories and are completely optional. All you need is one directory called "uploads" created anywhere you like, then you need to supply the file system path to it.
@JDW: If you don't know, how to get this path, open any PHP-File and insert a stupid line though hitting on your
Keyboard ^^
If you then click in your forum, you'll get an error. Ths error shows you the path to your directory. It should look lik:
/home/www/bli/bla/blub/Forum/extensions/... (depending on which file you've modded)
so you can build the upload-Path, which has only instead of "extensions" a "uploads"
-> /home/www/bli/bla/blub/Forum/uplodas/ (Don't forget the Slash)
Hope I could help
How hard would it be to integrate some sort of transloading function to the upload form?
@mis-one: Can you please explain transloading? I worked in the transloading department for Conrail, but don't think that is the same thing.
hahah yeah a little different, it basically means to load an image from a URL. You can view the technique at: http://www.imageshack.us. You'll notice you a radio button to have upload locally or from a URL.
Thanks for the great example. I get it now.
pbear @JDW
Yes. You make one "uploads" folder and Attachments does the rest. The word in-between the %-signs (and including them) are all one variable. From the extension's setting page:
It supports those four variables in whatever configuration you want to make inside your uploads folder. Suppose that User #53 uploads "picture.jpg" on 12 April 2007. If the path looks like this to Attachments:
www.jdwdomain.com/forum/uploads/%userid%/%year%--%month%--%day%/
Then the folder structure it creates will look like:
www.jdwdomain.com/forum/uploads/53/2007--4--12/picture.jpg
It will make more folders as needed when the variables change (new day, different user, etc.). Remember the path you need will vary depending on your hosting. You can try what Rysk said if it Attachments doesn't put it in there automatically for you.
I just solved a problem I was having with Attachments and thought I would post it here in case anyone else was having similiar difficulties.
Sometimes when attempting to upload a .doc I would get the message:
I saw the hint here about adding file types to the 'allowed' list, but the file type it was having a problem with already seemed to be listed.
In fact, application/octet-stream is already listed, application/octect-stream is not. Duplicating the application/octet-stream line of code and adding the 'c' solves the problem.
I guess one or other ('octect', judging by a quick google search) is a typo? And I don't know where it's originating, in which case I guess this is a workaround rather than a proper fix, but hey-ho.
Qoute: alan
In fact, application/octet-stream is already listed, application/octect-stream is not. Duplicating the application/octet-stream line of code and adding the 'c' solves the problem.
thanks for sharing Alan.. typical problem that would take ages to notice :)
Friends, many thanks for all the replies about the path (especially pbear, for making it abundantly clear and in color too)!
Now that my database problem has been solved, I've restored all the Vanilla files to my server from my first Vanilla installation, which included all the extensions and php code changes I had made to make the extensions work. I can now save my Admin preferences with any errors, and everything seems to work well, EXCEPT ATTACHMENTS! Ack!
I now get this Fatal Error message when trying to save attachments. But even more worrying is that this Fatal Error occurs even when I try to start a new discussion WITHOUT saving any attachments! I even get that Fatal Error when trying to view discussions! But if I turn off the Attachments 2.1 extension, I can then create and view discussions again with no fatal errors.
I pulled up phpMyAdmin and checked, and yes that Fatal Error is correct in that the "lum_attachment" table is not in my jdwages database (although many other "LUM..." tables are in my database). Okay, so I know that not having this "lum_attachment" table is the root problem, but I haven't the faintest idea how to create it. Shouldn't Attachments 2.1 do that for me automatically? I tried disabling and then re-enabling the Attachments 2.1 extension multiple times, but "lum_attachment" is not being created in my database.
Would anyone know how I should go about solving this problem?
Thank you!
in php, click somewhere it says SQL, wich means u can run SQL commands. run this: CREATE TABLE `LUM_Attachment` (<br /> `AttachmentID` int(11) NOT NULL auto_increment,<br /> `UserID` int(11) NOT NULL default '0',<br /> `DiscussionID` int(11) NOT NULL default '0',<br /> `CommentID` int(11) NOT NULL default '0',<br /> `Title` varchar(200) NOT NULL default '',<br /> `Description` text NOT NULL,<br /> `Name` varchar(200) NOT NULL default '',<br /> `Path` text NOT NULL,<br /> `Size` int(11) NOT NULL default '0',<br /> `MimeType` varchar(200) NOT NULL default '',<br /> `DateCreated` datetime NOT NULL default '0000-00-00 00:00:00',<br /> `DateModified` datetime NOT NULL default '0000-00-00 00:00:00',<br /> PRIMARY KEY (`AttachmentID`)<br /> );
btw, its found in the extensions/Attachments/default.php
I have never seen anyone have problems like JDW does.
absolutely nothing is working for him and yet he is persistent in wanting to running vanilla.
u should consider other forum packages as well
yea he does seem to have trouble with everything. last big thing was his host. change host before vanilla :)
Mr Do,
Thank you for the advice. I opened /extensions/Attachments/default.php and found the exact code to which you are referring. But again, I ask the same question: if this code exists, why should I have to manually type it in? Why isn't default.php doing the job it should do in creating that LUM_Attachment table? I guess that is a question no one can answer.
Per your advice to "click somewhere it says SQL," I loaded phpMyAdmin, pulled up my jdwages database and then viewed the menu tabs. Those tabs read as follows:
Structure SQL Search Query Export Import Operations
I assumed that "SQL" is what you were referring to, so I clicked on it. I the saw the text below, followed by a large field:
Run SQL query/queries on database jdwages:
Clearly, a "query" is not a "command," but following your advice I pasted in all that CREATE TABLE code and then clicked the "Go" button. (And here's a screen shot for you.) Not surprisingly, it resulted in a lengthy error message (see this screen shot -- you can also see all the LUM tables at left; the 3 tables above and 3 below the LUMs are tables for another function on our server not pertaining to Vanilla).
So I'm stuck at this point, still asking myself why in the world the Attachments 2.1 extension isn't doing all this for me!
Any further specific recommendations you can offer would be greatly appreciated.
Thank you.
you did everything correct. i wrote it wrong the first time, but imidiatly fixed it. so i assume u either copied from the file or from my wrong version in those few seconds. anyways. this part is PHP and shouldnt be part of any sql u put directly into phpmydamin.".$Configuration['DATABASE_TABLE_PREFIX']."
the correct is written in my post above. its suppose to be LUM_. If u look up the DATABASE_TABLE_PREFIX in your config, thats what it will say
Dear JDW, I dont mean to be mean or judgemental, but from the amount of problems you have, and the lack of understanding in order to fix them yourself, I your probably not the right man for this job. Either hire or ask a friend or someone to do this for you.
Addons are custom features that you can add to your Vanilla forum. Addons are created by our community of developers and people like you!
We review addons to make sure they are safe and don't cause bugs. An addon is considered to be "Vanilla Approved" once our review process is complete.