Author |
Topic |
homeacademy
Junior Member
USA
163 Posts |
Posted - 04 December 2002 : 11:38:00
|
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! |
|
|
hahnsolo
Starting Member
8 Posts |
Posted - 04 December 2002 : 14:15:35
|
Is there a way to assign specific members the ability to upload |
|
|
homeacademy
Junior Member
USA
163 Posts |
Posted - 04 December 2002 : 14:24:17
|
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? |
|
|
aluminumcan
New Member
63 Posts |
Posted - 04 December 2002 : 18:01:34
|
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
|
|
|
James
Average Member
USA
539 Posts |
Posted - 04 December 2002 : 23:38:20
|
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 |
|
|
James
Average Member
USA
539 Posts |
Posted - 05 December 2002 : 00:05:18
|
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/* |
|
|
aluminumcan
New Member
63 Posts |
Posted - 05 December 2002 : 11:06:54
|
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! |
|
|
leblanc9425
New Member
USA
92 Posts |
Posted - 05 December 2002 : 12:37:04
|
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 |
|
|
ranafrognet
Starting Member
USA
13 Posts |
Posted - 05 December 2002 : 13:43:07
|
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/ |
|
|
aluminumcan
New Member
63 Posts |
Posted - 05 December 2002 : 13:46:24
|
ranafrognet...click on page 6 of this very discussion. James had some info on that. |
|
|
ranafrognet
Starting Member
USA
13 Posts |
Posted - 05 December 2002 : 13:48:42
|
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/ |
|
|
James
Average Member
USA
539 Posts |
Posted - 05 December 2002 : 19:43:44
|
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/* |
|
|
kgeissler
Starting Member
9 Posts |
Posted - 05 December 2002 : 20:27:28
|
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. |
|
|
James
Average Member
USA
539 Posts |
Posted - 05 December 2002 : 23:27:55
|
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/* |
|
|
BritishAndy
Starting Member
United Kingdom
15 Posts |
Posted - 07 December 2002 : 18:17:27
|
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. |
|
|
Topic |
|