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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Proeder's Attachment Size Limit
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

leatherlips
Senior Member

USA
1838 Posts

Posted - 18 July 2009 :  22:49:38  Show Profile  Visit leatherlips's Homepage
I am testing out the Proeder's File Attachment MOD. It is working fine (after all of the code fix's).

However, I have it set to allow files up to 5mb. If I upload something under 1mb it works fine. If it goes higher than that it says it can not upload.

Is this something that can be fixed in the MOD or is this something my host has to allow?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

iane87
Starting Member

USA
42 Posts

Posted - 18 July 2009 :  23:09:22  Show Profile  Visit iane87's Homepage
Well I'm not sure about that specific file attachment mod. But I know with the file attachment mod I am using we are only able to attach up to about 2-3MB. Our host has set a script timeout limit that we are unable to override. I'm guessing your host has done something similar and probably with a lower script timeout limit. If that is the case there is not much you can do about it. (except switch hosting companies or get a dedicated server) Users with faster connection speeds to the server will be able to upload larger files.

P.S. We are on IIS 7. So we probably have higher limits than IIS 6.

Twitter MOD | Search Provider MOD | W3C Valid RSS MOD | Google Translate MOD

Edited by - iane87 on 18 July 2009 23:42:52
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 18 July 2009 :  23:28:10  Show Profile
Look for AspMaxRequestEntityAllowed in the search, the host may restrict the upload to the server to 1 MB. or click here
quote:
Originally posted by leatherlips

I am testing out the Proeder's File Attachment MOD. It is working fine (after all of the code fix's).

However, I have it set to allow files up to 5mb. If I upload something under 1mb it works fine. If it goes higher than that it says it can not upload.

Is this something that can be fixed in the MOD or is this something my host has to allow?

Awhile ago we discussed the default for IIS 6 being only 200Kb for upload. See how you go.

Cheers,

David Greening
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 19 July 2009 :  12:45:15  Show Profile  Visit leatherlips's Homepage
I called my host and they told me they do not have a 1mb restriction limit.

Here is the message I am getting from the mod:



Is there something I can fix in the mod code?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 19 July 2009 :  13:07:14  Show Profile  Visit leatherlips's Homepage
Well I think I solved it. If I upload a file name that has spaces in it, I get the error. If I rename it and remove all spaces, it uploads.

Now to tweak the mod for my needs.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 19 July 2009 :  13:47:50  Show Profile  Visit modifichicci's Homepage
in output file
find
if not bTemp then
bTemp = InStr(sValidate, " ") > 0
end if
it is possible that there is only one space between the " add a space

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 19 July 2009 :  15:20:08  Show Profile  Visit leatherlips's Homepage
quote:
Originally posted by modifichicci

in output file
find
if not bTemp then
bTemp = InStr(sValidate, " ") > 0
end if
it is possible that there is only one space between the " add a space


Adding that extra space did the trick! Thanks!

How many more coding error are in this thing? I'm surprised at how long this mod has been around that they haven't been fixed yet.

By the way, is this the mod most people use for the file attachments? If not, what is the "best" one?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 19 July 2009 :  15:37:24  Show Profile  Visit modifichicci's Homepage
not many bugs.. i have fixed some of them, and others are fixed from others..

I think the last version in 5 in 1 from snitzbitz is quite completed..


Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 19 July 2009 :  16:04:28  Show Profile  Visit leatherlips's Homepage
Thanks for the info.

I'm trying to get it to use my new mp3 tag.

I noticed this section (I've modified it from the original):

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\nInsert Image:
[img]<% =strForumURL %><% =SUBFOLDER %>/<% =filename %>[/ img]
 <% =strFileSize %>";
          } else {
          opener.document.PostTopic.Message.value+="\n\nInsert Image:
[img]<% =strForumURL %><% =SUBFOLDER %>/<% =filename %>[/ img]
 <% =strFileSize %>";
          }
          </script>
         <%
       Else
         %>
          <script>
          if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
            var caretPos = opener.document.PostTopic.Message.caretPos;
            caretPos.text = "[img]<% =SUBFOLDER %>/<% =filename %>[/ img]";
          } else {
          opener.document.PostTopic.Message.value+="[img]<% =SUBFOLDER %>/<% =filename %>[/ img]";
          }
          </script>
         <%
       End If
If a user uploads an image, it automatically places it in the image tag and appears in the post.

I'd like to do the same for an mp3 file. I tried putting this after it:

If MP3FileType=true then
         %>
          <script>
          if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
            var caretPos = opener.document.PostTopic.Message.caretPos;
            caretPos.text = "\n\nInsert MP3:
[mp3]<% =strForumURL %><% =SUBFOLDER %>/<% =filename %>[/mp3]
 <% =strFileSize %>";
          } else {
          opener.document.PostTopic.Message.value+="\n\nInsert MP3:
[mp3]<% =strForumURL %><% =SUBFOLDER %>/<% =filename %>[/mp3]
 <% =strFileSize %>";
          }
          </script>
         <%
       Else
         %>
          <script>
          if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
            var caretPos = opener.document.PostTopic.Message.caretPos;
            caretPos.text = "[mp3]<% =SUBFOLDER %>/<% =filename %>[/mp3]";
          } else {
          opener.document.PostTopic.Message.value+="[mp3]<% =SUBFOLDER %>/<% =filename %>[/mp3]";
          }
          </script>
         <%
       End If
But all this ends of doing is placing the link to the file in both an img and an mp3 tag.

Is it possible to get it to recogize the extension and have it automatically put it between the correct tags?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 19 July 2009 16:05:15
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 20 July 2009 :  03:31:58  Show Profile  Visit modifichicci's Homepage
You need to select the extension.

After the check for allowed extension (around lines 97-110)

put a select
select case extension
case ".jpg", ".jpeg", ".gif", ".png", ".bmp"'##Image File extensions

ImageFileType=true

case ".mp3"
ImageFileType=false
MP3FileType=true
case else'##Downloadable file extensions
ImageFileType=false
end select

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 20 July 2009 :  07:06:24  Show Profile  Visit leatherlips's Homepage
I'm not getting it to work.

Could you post the whole code so I can see where I am going wrong?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 20 July 2009 :  08:10:15  Show Profile
I would say that you need to change the following in red to the new code in green:

' --- CHECK FILE FOR ACCEPTABILITY ---
  
if oldfilename = "" then
	response.redirect "pop_upload_new.asp"
else
  	extension = LCase(Mid(filename,InStrRev(filename,".")))
end if

ImageFileType=true
AllowFile=false
AllowExpression=false

select case extension

	case ".jpg", ".jpeg", ".gif", ".png", ".bmp" '##Image File extensions

	ImageFileType=true

	case ".mp3"

	ImageFileType=false
	MP3FileType=true

end select

AllowFile=false
AllowExpression=false

This is in outputFile.asp (around line 91). I hope that this helps.

Cheers,

David Greening
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 20 July 2009 :  09:44:31  Show Profile  Visit leatherlips's Homepage
Perfect!

After adding the case select code where you suggested, I then changed my other code to the following:

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 = "[img ]<% =SUBFOLDER %>/<% =filename %>[/img]";
          } else {
          opener.document.PostTopic.Message.value+="[img ]<% =SUBFOLDER %>/<% =filename %>[/img]";
          }
          </script>
         <%

else

If MP3FileType=true then

         %>
          <script>
          if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
            var caretPos = opener.document.PostTopic.Message.caretPos;
            caretPos.text = "[mp3]<% =SUBFOLDER %>/<% =filename %>[/mp3]";
          } else {
          opener.document.PostTopic.Message.value+="[mp3]<% =SUBFOLDER %>/<% =filename %>[/mp3]";
          }
          </script>
         <%

else

         %>
          <script>
          if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
            var caretPos = opener.document.PostTopic.Message.caretPos;
            caretPos.text = "[ img]<% =iconimage %>[/img] Attachment: [url=\"<% =subfolder %>/<% =filename %>\"]<% =oldfilename %>[/url]
<% =strFileSize %>";
          } else {
          opener.document.PostTopic.Message.value+="[ img]<% =iconimage %>[/img] Attachment: [url=\"<% =subfolder %>/<% =filename %>\"]<% =oldfilename %>[/url]
<% =strFileSize %>";
          }
          </script>
         <%

end if
end if


(I put an extra space in the [img] tag so it would appear in this post).

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 20 July 2009 :  14:07:40  Show Profile  Visit leatherlips's Homepage
Thank you modifichicci and Classicmotorcycling for your help!

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 20 July 2009 :  14:30:23  Show Profile  Visit modifichicci's Homepage
have you add the case
case else'##Downloadable file extensions
ImageFileType=false
?

or your downloadable files could be shown wrong..

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 20 July 2009 :  15:51:50  Show Profile  Visit leatherlips's Homepage
quote:
Originally posted by modifichicci

have you add the case
case else'##Downloadable file extensions
ImageFileType=false
?

or your downloadable files could be shown wrong..


Is this what you mean?

select case extension

   case ".jpg", ".jpeg", ".gif", ".png", ".bmp" '##Image File extensions

   ImageFileType=true

   case ".mp3" '##MP3 File Extensions

   ImageFileType=false
   MP3FileType=true

   case else '##Downloadable File Extensions

   ImageFileType=false

end select

AllowFile=false
AllowExpression=false


And then I have this code later in the file:

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 = "[img]<% =SUBFOLDER %>/<% =filename %>[/ img]";
          } else {
          opener.document.PostTopic.Message.value+="[img]<% =SUBFOLDER %>/<% =filename %>[/ img]";
          }
          </script>
         <%

else

If MP3FileType=true then

         %>
          <script>
          if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
            var caretPos = opener.document.PostTopic.Message.caretPos;
            caretPos.text = "[mp3]<% =SUBFOLDER %>/<% =filename %>[/mp3]";
          } else {
          opener.document.PostTopic.Message.value+="[mp3]<% =SUBFOLDER %>/<% =filename %>[/mp3]";
          }
          </script>
         <%

else

         %>
          <script>
          if (opener.document.PostTopic.Message.createTextRange && opener.document.PostTopic.Message.caretPos) {
            var caretPos = opener.document.PostTopic.Message.caretPos;
            caretPos.text = "[img]<% =iconimage %>[/ img] Attachment: [url=\"<% =subfolder %>/<% =filename %>\"]<% =oldfilename %>[/ url]
<% =strFileSize %>";
          } else {
          opener.document.PostTopic.Message.value+="[img]<% =iconimage %>[/ img] Attachment: [url=\"<% =subfolder %>/<% =filename %>\"]<% =oldfilename %>[/ url]
<% =strFileSize %>";
          }
          </script>
         <%

end if
end if


This seems to be working correctly. Are there any obvious errors that could potentially be a problem?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page
Page: of 2 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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07