Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: Ben's File Attachment Mod (BETA)
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

BJH
Starting Member

16 Posts

Posted - 14 January 2003 :  15:59:26  Show Profile
hi all. i have implemented a file attachment mod in the UBB style. here's the Readme.txt contents:

Ben's Attachment Mod
Version 1.0 beta 1
By Ben Hirashima <ben@netwiz.net>
Last Updated: 1/14/03

This Snitz mod implements file attachments. It was made to work with Snitz 3.4.03. It was tested with SQL Server 2000, but should work with older versions of SQL Server and MSDE. I didn't modify any of the MySQL specific code, but if you wanted to fool with it, you could probably make it work with MySQL too.


Features:
- Allows you to attach files to posts (duh)
- No popup windows
- Displays image attachments inline
- Attachments are separate from the message text
- Allows update/delete of attachment when editing a post
- Attachments are deleted from filesystem when you delete a reply, topic, or entire forum
- One table added to database, no existing tables modified
- Allows you to specify what file extensions are allowed, and the max file size

Requires:
- Free ASPSmartUpload component must be installed on the server. http://www.aspsmart.com/aspSmartUpload
- SQL Server 2000 or similar


Installation:
1) Install the ASPSmartUpload component on the server http://www.aspsmart.com/aspSmartUpload
2) Copy the ASP scripts in the zip file to your Snitz folder. Several files will be replaced, so this mod may interfere with other mods you have installed. I'd suggest installing this mod first, then reinstall your other mods if necessary. There are simply too many modifications made to the files to do a copy and paste type of thing.
3) Copy the icon_paperclip.gif file to your images folder.
4) Create an "attachments" folder, and give the appropriate user or group read/write/modify permissions to it. If you're using NT authentication, you probably want to give the Domain Users group read/write/modify permission. If you're using regular authentication, you need to give IUSER_MACHINENAME read/write/modify permission.
5) Run the attachments.sql script in the MS Query Analyzer to create the FORUM_ATTACHMENTS table.

Configuration:
You can specify which file extensions are allowed on attachments by editing the sAllowedFiles string in inc_func_attachments.asp. You can also specify the max file size of an attachment by editing the iMaxFileSize variable.

Note: This mod includes a bug fix in inc_post_buttons.asp. The bug fix is not yet incorporated into the official snitz source code, but it was necessary to make the mod work.

Please don't email me directly with questions about the mod. Post questions to the Snitz developer forums, and I will try to answer them.


the mod can be downloaded here:
http://www.netwiz.net/~ben/snitz/bens_attachment_mod.zip

screenshots:
http://www.netwiz.net/~ben/snitz/new_topic.gif
http://www.netwiz.net/~ben/snitz/edit_topic.gif
http://www.netwiz.net/~ben/snitz/attachments.jpg

this mod is very beta. i just finished it, and i have not used it in a real world environment yet. if anyone installs it, i would love to hear feedback.

cheers,
ben

Ez4arab
Junior Member

479 Posts

Posted - 14 January 2003 :  20:24:03  Show Profile  Visit Ez4arab's Homepage
I have problem in Mike's File Attachment Mod which is Arabic username does not display there pic because it is crate Arabic folder which can not read by the browser when you want to see the file. How about this mod?

Another question
- Will this mod work with access database?
- It creates a seperate folder for each user

my old post in Mike's File Attachment
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=30761&whichpage=5

quote:

I have problem in the mod that is
- Separate Folders (Directory) or for each Member that's Uploaded Pics!

I am using Arabic version and the users used Arabic names in my forum. When they upload the files the URL gives wrong because the Arabic URL not accepted.

My idea is to convert the user name directory to he's member ID. this will be batter for other lang.



Ez4arab web site Ez4arab |
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 14 January 2003 :  21:19:45  Show Profile
hi ez4arab. all attachments are kept in the same folder, so i don't think you will have that problem with this mod.
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 14 January 2003 :  21:21:38  Show Profile
to answer your other question, i don't know if it will work with Access. it might.
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 15 January 2003 :  17:09:19  Show Profile
i fixed a bug that was preventing posts without attachments :D. version is now 1.0.1
Go to Top of Page

jkmcgrath
Junior Member

USA
145 Posts

Posted - 15 January 2003 :  19:52:24  Show Profile  Visit jkmcgrath's Homepage
Will users be able to browse what they have uploaded so they can re-use the files?

Delta Force Seals
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 15 January 2003 :  20:21:06  Show Profile  Visit dayve's Homepage
quote:
Originally posted by jkmcgrath

Will users be able to browse what they have uploaded so they can re-use the files?



since everything is in one directory I am going to assume that it will not. BJH, you should consider creating directories in the upload directory for individual forum members. keeps everything nice and tidy.

Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 16 January 2003 :  14:15:43  Show Profile
hi guys. users aren't able to browse what they've uploaded. i'm not sure what value that would have. if you need to find an old post, you can always use the search function.

i also don't quite see the purpose of keeping each user's uploads in a separate directory. however, if you really need such a feature, it should be trivial to add it yourself.

all code modifications are bracketed by <ben's attachment mod>, so it's easy to find the spots relevant to this mod.
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 16 January 2003 :  14:47:02  Show Profile
i've found another bug. attachments don't work in moderated forums. i'm working on it...
Go to Top of Page

jkmcgrath
Junior Member

USA
145 Posts

Posted - 16 January 2003 :  17:20:07  Show Profile  Visit jkmcgrath's Homepage
They can reuse the images and the admin and delete the ones that belong to past members and saves disk space.

Mikes File attachment with the addtional mod does all of that without an addtional componet. I can live with the pop up window on mikes for a bit I do like your interface though. Maybe you could make an addtion to mikes rather than a whole new mod?

Delta Force Seals
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 17 January 2003 :  01:17:59  Show Profile
well, i just made this mod because it's exactly what i needed for my scenario. while mike's mod seems like a good one, i didn't like the popup windows, so i made my own. my users are not technically sophisticated, so i wanted to simplify the interface as much as possible. if this mod happens to suit others' needs, that's great, but i primarily made it for me. i don't really have time to make this mod into a one-size-fits-all type of thing. i just threw it up here in case it might be useful to someone else.
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 17 January 2003 :  17:33:55  Show Profile
fixed a bug that prevented attachments from showing up in replies to moderated forums. also added attachment deletion when a post is deleted from the moderation popup window. the zip file at the link above has been updated.

Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 21 January 2003 :  13:48:42  Show Profile
fixed a bug that prevented attachments from being deleted when a forum is deleted.
Go to Top of Page

rond
Starting Member

2 Posts

Posted - 23 January 2003 :  17:35:37  Show Profile
I am having a problem with the quick reply feature after installing this mod. The regular reply to topic works fine and I can add attachments, however when someone uses the quick reply the get the following error:

aspSmartUpload error '800a0009'
Subscript out of range
/forum/post_info.asp, line 46

Here is the code.
43 -'this code has to come before the includes below
44 -dim oUpload
45 -Set oUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
46 -oUpload.Upload

I am running IIS 5 on Windows 2000 and this is the only mod I have installed.
I am using version 3.4.03. with MS SQL
I have aspSmartUpload installed on the server.

Can anyone help?

Thanks
Ron Dowell
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 24 January 2003 :  13:21:34  Show Profile
thanks ron, i'll check it out.
Go to Top of Page

BJH
Starting Member

16 Posts

Posted - 24 January 2003 :  13:38:17  Show Profile
ok, the bug with Quick Reply has been fixed.
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07