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
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

leatherlips
Senior Member

USA
1838 Posts

Posted - 20 July 2009 :  17:17:12  Show Profile  Visit leatherlips's Homepage
This is off topic from what this topic was originally about. I didn't want to start a new topic since it is dealing with this file attachment mod.

The file myfiles.asp only lets you view it if you are logged in. If you try you see a message telling you to log in. That is fine.

However, if you try to log in on the myfile.asp page you get an error:

Microsoft VBScript runtime error '800a000d' 

Type mismatch: 'sha256' 

/forum/inc_header.asp, line 206


Line 206 in inc_header.asp is in red below:

select case Request.Form("Method_Type")
   case "login"
      strEncodedPassword = sha256("" & Request.Form("Password"))
      select case chkUser(strDBNTFUserName, strEncodedPassword,-1)
         case 1, 2, 3, 4
            Call DoCookies(Request.Form("SavePassword"))
            strLoginStatus = 1
         case else
            strLoginStatus = 0
         end select
   case "logout"
      Call ClearCookies()
end select

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

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 20 July 2009 :  17:24:58  Show Profile
That is because it isn't included in "myfiles.asp". Insert the following include BEFORE the one for "inc_header.asp", anywhere after the include for "config.asp".


<!--#INCLUDE FILE="inc_sha256.asp"-->


You may get a redimensioned value error, depending on what mods you have installed. I got one on this line and had to remove the bit in red:


Dim fs, f, folder, fc, s

Edited by - Carefree on 20 July 2009 17:37:15
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 20 July 2009 :  17:58:00  Show Profile  Visit leatherlips's Homepage
Carefree, that did the trick! Thanks!

Now another thing...

If you log on while on the myfiles.asp page it takes you back to default.asp. How do you make it log on but go back to myfiles.asp? I know some other pages do that.

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 :  18:57:27  Show Profile  Visit leatherlips's Homepage
I think I got it. Unless there is a major problem I'm not seeing. It seems to be working...

First I added this to inc_header.asp:

not(Instr(Request.ServerVariables("Path_Info"), "myfiles.asp") > 0) and _


Then in myfiles.asp I replaced this:

if strDBNTUserName = "" then

   Err_Msg = "You must be logged in to see this page."

   Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _
   " <tr>" & vbNewLine & _
   " <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
   " " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
   " " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Uploaded Files</font></td>" & vbNewLine & _
   " </tr>" & vbNewLine & _
   " </table>" & vbNewLine & _
   " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There was a problem!</font></p>" & vbNewLine & _
   " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & Err_Msg & "</font></p>" & vbNewLine & _
   " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back to Forum</a></font></p>"
   WriteFooter
   response.end
else


With this:

if mLev = 0 then
   Err_Msg =   "You must be logged in before you can view this page." & _
         "  If you are a registered member and already have a valid userID and password, please wait 20 seconds to be re-directed to the login page." & _
         "      Otherwise click on the register link below to obtain your very own UserID and Password. Registration is Free." & vbNewLine

   Response.Write  "<p align=""center"" style=""margin-top:20px; margin-bottom:15px;""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Is A Problem!</font></p>" & vbNewLine & _
         "<table align=""center"" border=""0"">" & vbNewLine & _
         "  <tr>" & vbNewLine & _
         "    <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
         "  </tr>" & vbNewLine & _
         "  <tr>" & vbNewLine & _
         "    <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine

   scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
   if Request.QueryString <> "" then
      Response.Write "       <br /><a href=""login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString & """><acronym title=""Login Here or Wait to re-directed to the Login Page..."">Login Here</acronym></a> or Wait for Automatic Redirection to Login Page<br />" & vbNewLine & _
         "<meta http-equiv=""Refresh"" content=""20; URL=login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString & """>" & vbNewLine
   else
      Response.Write "       <br /><a href=""login.asp?target=" & lcase(scriptname(ubound(scriptname))) & """><acronym title=""Login Here or Wait to re-directed to the Login Page..."">Login Here</acronym></a> or Wait for Automatic Redirection to Login Page<br />" & vbNewLine & _
         "<meta http-equiv=""Refresh"" content=""20; URL=login.asp?target=" & lcase(scriptname(ubound(scriptname))) & """>" & vbNewLine
   end if

   Response.Write "       <br /><a href=""policy.asp""" & dWStatus("Register to post to our forum...") & " tabindex=""-1""><acronym title=""Register to post to our forum..."">Register Here</acronym></a> if You Don't Have a UserID and Password<br />" & vbNewline & _
         "       <br /><a href=""JavaScript:history.go(-1)"">Cancel</a> and Return to Previous Page<br />" & vbNewline & _
         "    </td>" & vbNewLine & _
         "  </tr>" & vbNewLine & _
         "</table><br /><br />" & vbNewLine

   WriteFooter
   Response.End
end if


Lastly, I had to remove an end if arond line 289.

The only thing I think could be a problem would be removing the else in the code I replaced. If I kept it, it gave an error. Removing it fixed the error.

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 20 July 2009 19:02:25
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 20 July 2009 :  19:29:41  Show Profile
Those changes are fine, no adverse effects.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 July 2009 :  08:13:56  Show Profile
quote:
Originally posted by leatherlips

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.



Regarding file names with spaces, replace the spaces with %20 (html for a blank space) and it'll work. When the file is downloaded, the spaces will be back in place.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07