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)
 Mike's File Attachment Mod for Snitz
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 15

homeacademy
Junior Member

USA
163 Posts

Posted - 04 December 2002 :  11:38:00  Show Profile
quote:
homeacademy, I owe you a great deal of thanks. I even used the code from the smiles but was still missing something and your code works like a charm.


Thanks alot! I'm glad my code could be of assistance. This is a great MOD, and I appreciate the time and effort everyone has put in to making this a useful addition to Snitz. Keep up the good work!
Go to Top of Page

hahnsolo
Starting Member

8 Posts

Posted - 04 December 2002 :  14:15:35  Show Profile
Is there a way to assign specific members the ability to upload
Go to Top of Page

homeacademy
Junior Member

USA
163 Posts

Posted - 04 December 2002 :  14:24:17  Show Profile
I use this file attachment mod exclusively for image upload/insertation. Is there a way to use forum code & this mod to set the image size?
Go to Top of Page

aluminumcan
New Member

63 Posts

Posted - 04 December 2002 :  18:01:34  Show Profile
Is there a relatively painless way to restrict the file upload ability to only a certain # of people (I'm a complete ASP newbie!)

I'd like it so that only moderators could post files, so I'm thinking along the lines of:

if userStatus = Moderator, then show FileUploadOption
else don't show it

Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 04 December 2002 :  23:38:20  Show Profile  Visit James's Homepage
quote:
Originally posted by aluminumcan

Can someone summarize?

I'm an ASP and Snitz newbie, so I apologize in advance for asking anything stupid ;o)

I've been looking for a way to have a person in our company post a
file to the intranet and allow others to comment on said file.

I got Snitz 3.4.03 installed (I was impressed with how easy it was to
install!) and then ended up in this forum to find out a bit more
about Mike's File Upload.

Of course, reading through this, I see that there seems to be a lot
more options out there. Can anyone give a brieve synopsis on the
different between Mike's, Dayve's, and HuwR's Mods?

I've also seen a lot of code snippets that appear to offer file
uploading capabilities as well, but where, exactly, should this code
be inserted?







Aluminumcan, Mike's File Upload (this post) should work for what you
need. Get the complete mod at
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=67
and follow the directions to install. You can also get my version of
the outputFile.asp file and exchange it with the one included with
the mod by clicking here.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*

Edited by - James on 05 December 2002 00:06:38
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 05 December 2002 :  00:05:18  Show Profile  Visit James's Homepage
quote:
Originally posted by homeacademy

I use this file attachment mod exclusively for image upload/insertation. Is there a way to use forum code & this mod to set the image size?



Since it displays the image using image tags, I don't think inserting
something within the image tags will do it. You might have to take a
look at where the image tags are defined in the snitz code to
accomplish that.


aluminumcan, In the readme.txt instructions for Mikes there's a
section that says:


- Open your existing "post.asp" file
- ..at approximately the line number 1051, locate the code:

change the code that's there to read:


if strRqMethod = "Edit" or strRqMethod = "URL" or strRqMethod = "EditURL" or strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or strRqMethod = "EditTopic" or strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
   if mLev = 3 or MLev = 4 then
      Response.Write	"              <tr>" & vbNewLine & _
						"                <td bgColor=""" & strPopUpTableColor & """> </td>" & vbNewLine & _
						"                <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine
   end if
end if


hahnsolo, Use the same thing I posted above but change the line that reads

   if mLev = 3 or MLev = 4 then


to read
   if mLev = 3 or MLev = 4 or strDBNTUserName = "username1" or strDBNTUserName = "username2" then


Change the username to what user you want to be able to upload and
add more or strDBNTUserName = "username" as needed. It's crude but it should work.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

aluminumcan
New Member

63 Posts

Posted - 05 December 2002 :  11:06:54  Show Profile
James...thanks alot.

I think there is a minor error in your explanation though. The if/endif statement should be wrapped around Mike's code...not the first response.write (which is creating the reply table row). And you only need one if.

That may be due to the fact that I have a few other MODs adding code in that section, however.

Regardless, I got it work, and it works great! Thanks!
Go to Top of Page

leblanc9425
New Member

USA
92 Posts

Posted - 05 December 2002 :  12:37:04  Show Profile  Visit leblanc9425's Homepage
How do I get this Mod to upload the image link to a different table and field? My goal is to modify this code to write the same image link information into my Classified Ads Mod table so that people can upload images of the items for sale. Everything else can stay the same.

My first guess was to modify the Outputfile.asp around line 76 but I'm not sure how to do this. I assume the portion of the script that writes to the FORUM_TOPICS table is at:

If ImageFileType=true then
%>
<script>
if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
var caretPos = opener.document.PostTopic.Message.caretPos;
caretPos.text = "\n\nImage Insert:

<% =strFileSize %>";
} else {
opener.document.PostTopic.Message.value+="\n\nImage Insert:

<% =strFileSize %>";
}
</script>
<%
Else
%>
<script>
if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
var caretPos = opener.document.PostTopic.Message.caretPos;
caretPos.text = "\n\nDownload Attachment: [url=\"<% =strForumURL %><% =SUBFOLDER %>/<% =filename %>\"] <% =oldfilename %>[/url]
<% =strFileSize %>";
} else {
opener.document.PostTopic.Message.value+="\n\nDownload Attachment: [url=\"<% =strForumURL %><% =SUBFOLDER %>/<% =filename %>\"] <% =oldfilename %>[/url]
<% =strFileSize %>";
}
</script>
<%
End If

However, I'm not familiar enough with code to figure out how to change the table and field from FORUM_TOPICS and T_message to something else.

Any help????

www.Slug-Lines.com
Snitz Version 3.4.07

Edited by - leblanc9425 on 05 December 2002 12:39:24
Go to Top of Page

ranafrognet
Starting Member

USA
13 Posts

Posted - 05 December 2002 :  13:43:07  Show Profile  Visit ranafrognet's Homepage
Great mod!

I noticed that when I attach an image, it places the [img] forum code around it. How do I get this to actually show the image that was uploaded?

joe mcbride
"It's a new error. That means we are getting somewhere!"
http://www.ranafrog.net/
Go to Top of Page

aluminumcan
New Member

63 Posts

Posted - 05 December 2002 :  13:46:24  Show Profile
ranafrognet...click on page 6 of this very discussion. James had some info on that.
Go to Top of Page

ranafrognet
Starting Member

USA
13 Posts

Posted - 05 December 2002 :  13:48:42  Show Profile  Visit ranafrognet's Homepage
Sorry, read up to page 4, then 7, then posted. Will read through next time. My problem was that I did not realize that the [img] tag had to be turned on through admin options.

Thanks

joe mcbride
"It's a new error. That means we are getting somewhere!"
http://www.ranafrog.net/
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 05 December 2002 :  19:43:44  Show Profile  Visit James's Homepage
Ranafrognet, there was also some change to the code that
Homeacademny let me in on that makes sure it will insert
image tags for all browsers, not just IE.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

kgeissler
Starting Member

9 Posts

Posted - 05 December 2002 :  20:27:28  Show Profile
How come when people attach a file to my forum, it looks like this:

Attachment: KPIndy_race_v1.cup.zip#9;907 Bytes

There is always a "#9" after the filename.
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 05 December 2002 :  23:27:55  Show Profile  Visit James's Homepage
quote:
Originally posted by kgeissler

How come when people attach a file to my forum, it looks like this:

Attachment: KPIndy_race_v1.cup.zip#9;907 Bytes

There is always a "#9" after the filename.



Look through your outputFile.asp file.
Do a search for "#9".
If you find anything, post the code around that area.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page

BritishAndy
Starting Member

United Kingdom
15 Posts

Posted - 07 December 2002 :  18:17:27  Show Profile  Visit BritishAndy's Homepage  Send BritishAndy an ICQ Message  Send BritishAndy a Yahoo! Message
ASCII OK but can't upload Binaries

Help! I have implemented the mod and it is probably set up ok because I can upload text files ok, they appear in the correct user directories etc.
The problem is that when I try to upload a picture file the file is being altered during the upload. An example is a gif file that was 15,348 bytes before the upload is 15,019 bytes after the upload. If I try to view this file it just says it is corrupt.

I uploaded Dave's new upload.asp file but it didn't make any difference. (I had to change a '\' to a '/' on line 56)

I am wondering if there is an issue caused by the Unix filesystem on my isp's cobalt server.

Incidentally, the text file is also different after the upload. It is 2 bytes less on a 10k file.

Any ideas?

Andy.
Go to Top of Page
Page: of 15 Previous Topic Topic Next Topic  
Previous Page | 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.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07