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)
 File Lister add-on for Mike's File Attachment mod
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 5

James
Average Member

USA
539 Posts

Posted - 29 November 2002 :  05:42:14  Show Profile  Visit James's Homepage
Files lister Add-on for Mike's File Attachment mod.
Ver. 2.0

If you have user file uploads on your site, then this is a must-have
mod that lets them browse their upload directories (with thumbnails),
reuse their uploaded files, etc.

What's it do?

This mod gives your users the ability to see what files they have
uploaded. It adds a button to their profile to click and display a
dynamic listing of their upload directory and color codes the file
list by file type with thumbnails for images. It adds the ability to
reuse a uploaded file. It let's Admins view all upload directories.

This mod assumes you have Mike's File Attachment mod installed and
set-up to create User directories for uploads.

Note: Updated the file (to ver 2.02) on 22:56 EST Jan 7, 2003 to add a couple bug fixes.

Note: Updated the file (to ver 2.0 ) on 22:43 EST Dec 8, 2002. Now has the ability to insert previous uploads into post.

Note: Updated the file on 22:43 EST Dec 4, 2002 to include better format with tables, thumbnails with links, etc.

Note: Updated the file on 00:30 EST Nov 30, 2002 to include thumbnails and entire uploaded files list for Admin

Download it at http://www.snitzbitz.com/mods/details.asp?Version=All&mid=67

BTW with a few minor edits, this should work with any set-up (not
just Mike's) where you have user directories and want to have the
ability for them to view their files.

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

Edited by - James on 07 January 2003 22:59:56

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 29 November 2002 :  09:09:45  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
that mod is kinda... semi-helpful... you should make it so when people click "attatch file" there is a link below the upload stuff and it says "Your Older Uploads" and when people click on the filename it inserts it into a post, instead of being in the profile
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 29 November 2002 :  09:24:25  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
or make a 2nd file like "upload_myfiles.asp" using short header/footer and have it do what i said
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 29 November 2002 :  10:34:52  Show Profile  Visit Etymon's Homepage
The most "semi-helpful" response I have for you James is, "Thanks! Great job! Your efforts and kindness are very appreciated!"

I'm looking forward to more of your MODs!

Have a happy holiday,

Etymon

Edited by - Etymon on 29 November 2002 10:40:05
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 29 November 2002 :  11:12:46  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
ok since i have no life, i did it

make a file named uploaded_myfiles.asp and put this in it
quote:
<%
Server.ScriptTimeout = 5000
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%

if strDBNTUserName = "" then
Err_Msg = "<li>You must be logged in to view the Members List</li>"

Response.Write " <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 & """>You must be logged in to view this page</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

Dim Path, Fso
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Files in your upload directory...</b></font></p>"


Path = server.mappath("\forum\uploaded\" + strDBNTUserName)
Response.Write("Using path: http:\\forumz.sytes.net\forum\uploaded\" & strDBNTUserName & "\<p>")

Dim fs, f, folder, fc, s
Set Fso = CreateObject("Scripting.FileSystemObject")
if FSO.FolderExists(Path) then
%><font size = 1 face="arial, helvetica, sans-serif"><%
Call ScanFolders(Path)

%></font><%
else
response.write "There are no files in your directory..."
end if
end if
%> <!--#INCLUDE FILE="inc_footer_short.asp"--> <%

Function ScanFolders(PathSpec)
Dim fs, f, Folder, fc, s, File, FileList, FolderInfo, FileName, Name
'##Response.Write(PathSpec & "<br>")
%><BLOCKQUOTE><%
Set FolderInfo = Fso.GetFolder(PathSpec)
Set FileList = FolderInfo.Files
For Each File in FileList
Name = Cstr(File.Name)
FileName = UCase(Name)

Response.Write " <FORM METHOD=""Post"" ENCTYPE=""multipart/form-data"" ACTION=""outputFile.asp"">" & vbNewLine & _
" <input type=""hidden"" name=""blob"" value=""" & path & "\" & Name & """>" & vbNewline & _
" <input type=""hidden"" name=""memberName"" value=""" & strDBNTUserName & """>" & vbNewline & _
" <INPUT TYPE=""submit"" NAME=""Enter"" value=""" & Name & """ onclick=""value='Inserting Image..';"">"
Response.Write " </FORM>"
Next

%></BLOCKQUOTE><%

Set f = Fso.GetFolder(PathSpec)
'##Set fc = f.SubFolders
'##For Each Folder in fc
'## %><BLOCKQUOTE><%
'## Call ScanFolders(PathSpec & "\" & Folder.Name)
'## %></BLOCKQUOTE><%
'##Next
End Function


%>


DONT FORGET TO CHANGE THE URL TO YOUR FORUM'S URL!

in outputFile.asp replace
byteCount = Request.TotalBytes
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
membername = UploadRequest.Item("memberName").Item("Value")
subfolder = subfolder & "/" & membername
contentType = UploadRequest.Item("blob").Item("ContentType")
filepathname = UploadRequest.Item("blob").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
oldfilename = filename
filename = Year(Now) & Month(Now) & Day(Now) & Hour(Now) & Minute(Now) & Second(Now) & "_" & filename

' --- CHECK FILE FOR ACCEPTABILITY ---

with this
byteCount = Request.TotalBytes
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
membername = UploadRequest.Item("memberName").Item("Value")
subfolder = subfolder & "/" & membername
contentType = UploadRequest.Item("blob").Item("ContentType")
if UploadRequest.Item("blob").Item("FileName") <> "" then
filepathname = UploadRequest.Item("blob").Item("FileName")
else
filepathname = UploadRequest.Item("blob").item("Value")
end if
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
oldfilename = filename
if UploadRequest.Item("blob").Item("FileName") <> "" then
filename = Year(Now) & Month(Now) & Day(Now) & Hour(Now) & Minute(Now) & Second(Now) & "_" & filename
else
filename = filename
end if

' --- CHECK FILE FOR ACCEPTABILITY ---

lastly, in pop_upload_new.asp, replace
" <td bgColor=""" & strPopUpTableColor & """ align=""center"" width=""100%"">" & vbNewline & _
with
" <td colspan=""2"" bgColor=""" & strPopUpTableColor & """ align=""center"" width=""100%"">" & vbNewline & _
and
" </FORM>" & vbNewline & _
" </td>" & vbNewline & _
" </tr>" & vbNewline & _
"</table>" & vbNewline
end if

with
" </FORM>" & vbNewline & _
" </td>" & vbNewline & _
" </tr>" & vbNewline & _
" <tr>" & vbNewline & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap width=""100%"" height=""1""><b><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>View your <br />Uploaded Files</font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""middle""><center> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""View"" type=""button"" value=""View"" onclick=""JavaScript:location.replace('upload_myfiles.asp')""> </td>" & vbNewLine & _
" </tr>" & vbNewline & _
"</table>" & vbNewline
end if






sorry that the proper spaces arent in place, but thats how it works on this forum, anyways, thats a real quick and basic way to do it, any questions, e-mail my (click the e-mail button on the forum, i have my e-mail in)

Edited by - ZeroAvengerX on 29 November 2002 11:41:24
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 29 November 2002 :  11:46:24  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
new coding for thumbnail's in the file listings
upload_myfiles.asp
quote:
<%
Server.ScriptTimeout = 5000
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%

if strDBNTUserName = "" then
Err_Msg = "<li>You must be logged in to view the Members List</li>"

Response.Write " <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 & """>You must be logged in to view this page</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

Dim Path, Fso
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Files in your upload directory...</b></font></p>"


Path = server.mappath("\forum\uploaded\" + strDBNTUserName)
Response.Write("Using path: http:\\forumz.sytes.net\forum\uploaded\" & strDBNTUserName & "\<p>")

Dim fs, f, folder, fc, s
Set Fso = CreateObject("Scripting.FileSystemObject")
if FSO.FolderExists(Path) then
%><font size = 1 face="arial, helvetica, sans-serif"><%
Call ScanFolders(Path)

%></font><%
else
response.write "There are no files in your directory..."
end if
end if
%> <!--#INCLUDE FILE="inc_footer_short.asp"--> <%

Function ScanFolders(PathSpec)
Dim fs, f, Folder, fc, s, File, FileList, FolderInfo, FileName, Name
'##Response.Write(PathSpec & "<br>")
%><BLOCKQUOTE><%
Set FolderInfo = Fso.GetFolder(PathSpec)
Set FileList = FolderInfo.Files
For Each File in FileList
Name = Cstr(File.Name)
FileName = UCase(Name)

Response.Write " <FORM METHOD=""Post"" ENCTYPE=""multipart/form-data"" ACTION=""outputFile.asp"">" & vbNewLine & _
" <input type=""hidden"" name=""blob"" value=""" & path & "\" & Name & """>" & vbNewline & _
" <input type=""hidden"" name=""memberName"" value=""" & strDBNTUserName & """>" & vbNewline
If Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR Instr(FileName,".GIF") Then
Response.Write " <img src=""uploaded/" & strDBNTUserName & "/" & Name & """ height=""200"" width=""200""><br><INPUT TYPE=""submit"" NAME=""Enter"" value=""" & Name & """ onclick=""value='Inserting Image..';"">"
Else
Response.Write getCurrentIcon(strIconEditorUrl,"","") & "<INPUT TYPE=""submit"" NAME=""Enter"" value=""" & Name & """ onclick=""value='Inserting File..';"">"
End If
Response.Write " </FORM>"
Next

%></BLOCKQUOTE><%

Set f = Fso.GetFolder(PathSpec)
'##Set fc = f.SubFolders
'##For Each Folder in fc
'## %><BLOCKQUOTE><%
'## Call ScanFolders(PathSpec & "\" & Folder.Name)
'## %></BLOCKQUOTE><%
'##Next
End Function


%>



and in myfiles.asp replace
If Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR Instr(FileName,".GIF") Then
with
If Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR Instr(FileName,".GIF") Then
Response.Write "<img src=""uploaded/" & strDBNTUserName & "/" & Name & """ height=""200"" width=""200"">"

NOTE: there may be an ELSEIF instead of an IF in front of the Instr, depends on how yours is moded
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 29 November 2002 :  14:15:04  Show Profile  Visit James's Homepage
Etymon, thank you.

Zero, I will check out your changes. My advise is to only add the ability to show thumbnails (not clickable and no links) in myfiles.asp and keep it viewable from the profile.

Then make your changes as you suggested to a file named upload_myfiles.asp and have the changes you made to be able to insert those files (something you don't need if you're in your profile) into the message.

I left some extra code in the myfiles.asp (commented at the bottom) that will be used to display subdirectories. This way a link can be placed on Admin Options and a check in myfiles.asp to scan the entire uploads directory with subdirectories. This is useful for an admin that wants to get an idea of how many files his users have uploaded. I was pretty tired last night and stopped before finishing that feature.

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

James
Average Member

USA
539 Posts

Posted - 29 November 2002 :  15:29:11  Show Profile  Visit James's Homepage
Ok, to have it when the Admin list the files he sees a breakdown of all users files allong with their directories, use this myfiles.asp instead:


<%
Server.ScriptTimeout = 5000
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%



if strDBNTUserName = "" then
            Err_Msg = "<li>You must be logged in to view the Members List</li>"
            
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 & """>You must be logged in to view this page</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

if (mLev = 4) then
AdminAllowed = 1
else 
AdminAllowed = 0
end if

Dim Path, Fso, SubFolderName
SubFolderName = ""


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>"

if AdminAllowed then 
  Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Files in the upload directories...</b></font></p>"
  Path = server.mappath("\forum\uploads\")
  Response.Write("Using path: http:\\www.yourdomain.com\forum\uploads\<p>")
else
  Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Files in your upload directory...</b></font></p>" 
  Path = server.mappath("\forum\uploads\" + strDBNTUserName)
  Response.Write("Using path: http:\\www.yourdomain.com\forum\uploads\" & strDBNTUserName & "\<p>")
end if

Dim fs, f, folder, fc, s
Set Fso = CreateObject("Scripting.FileSystemObject")
if FSO.FolderExists(Path) then
%><font size = 1 face="arial, helvetica, sans-serif"><%
Call ScanFolders(Path)

%></font><%
else 
response.write "There are no files in your directory..."
end if
Response.Write	"    <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</a></font></p>" & vbNewLine
end if
%> <!--#INCLUDE FILE="inc_footer.asp"--> <%

Function ScanFolders(PathSpec)
Dim fs, f, Folder, fc, s, File, FileList, FolderInfo, FileName, Name
'##Response.Write(PathSpec & "<br>")
%><BLOCKQUOTE><%
Set FolderInfo = Fso.GetFolder(PathSpec)
Set FileList = FolderInfo.Files
For Each File in FileList
	Name = Cstr(File.Name)
	FileName = UCase(Name)
	if AdminAllowed then 
	  Name =  SubFolderName & "\" & Name
    end if
	If Instr(FileName,".HTM") OR Instr(UCase(FileName),".HTML") Then
		Response.Write("<Font color =Teal>" & Name & "<br></font>")
	ElseIf Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR  Instr(FileName,".GIF") OR Instr(FileName,".PNG") Then
		Response.Write("<Font color =Red>" & Name & "<br></font>")
	ElseIf  Instr(FileName,".ASP") Then
		Response.Write("<Font color =Blue>" & Name & "<br></font>")
	ElseIf  Instr(FileName,".TXT") Then
		Response.Write("<Font color =Green>" & Name & "<br></font>")
	ElseIf  Instr(FileName,".ASA") Then
		Response.Write("<Font color =Silver>" & Name & "<br></font>")
	ElseIf Instr(FileName,".MAP") Then
		Response.Write("<Font color =Fuscia>" & Name & "<br></font>")
	ElseIf Instr(FileName,".CSS") Then
		Response.Write("<Font color =Olive>" & Name & "<br></font>")
	Else
		Response.Write("<Font color =Maroon>" & Name & "<br></font>")
	End If
Next

%></BLOCKQUOTE><%

Set f = Fso.GetFolder(PathSpec)
if AdminAllowed then 
  Set fc = f.SubFolders
  For Each Folder in fc
  SubFolderName = Folder.Name
  %><BLOCKQUOTE><%
  Call ScanFolders(PathSpec & "\" & Folder.Name)
  %></BLOCKQUOTE><%
  Next
end if

End Function


%>



Be sure to change your damin name in the 2 instances and also changed "uploads" if you have named your upload folder something else. these changes only affect the admins view, not the users. They will still see the original view they had with the first myfiles.asp from their user profile. You can implement ZeroAvengerX's upload_myfiles.asp along with the two Mike's Files (outputfile.asp and pop_upload_new.asp) along with this mod to have the ability to select from your uploaded files when you want to include one in a post.

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

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 29 November 2002 :  15:59:29  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
yeah james thats what i did, there are only thumbs on the myfiles.asp page and clickables on the upload_myfiles.asp

i will add your admin stuff in a sec
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 29 November 2002 :  16:15:07  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
questions and a fix

Q: does it show ALL admins the files or just the main admin?
Q: could you make an option somewhere in admin options to display it to admins, moderators, or all users?

when using this version of the mod you put
if AdminAllowed then
Response.Write "<img src=""uploaded/" & Name & """ height=""200"" width=""200"">"
else
Response.Write "<img src=""uploaded/" & strDBNTUserName & "/" & Name & """ height=""200"" width=""200"">"
end if

instead of
Response.Write "<img src=""uploaded/" & strDBNTUserName & "/" & Name & """ height=""200"" width=""200"">"
that in the older mod
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 29 November 2002 :  23:40:58  Show Profile  Visit James's Homepage
Zero, it should show to all admins.

If you want to make changes, the mlev values are:

mlev=4 -> Admin
mlev=3 -> Moderator
mlev=2 -> Normal Member
mlev=1 -> Author
mlev=0 -> Non-member

I would not set it anything lower than moderator as there is no reason for regular users to see a breakdown of all the files in your uploads directories.

As for your upload_myfiles,asp page, I'd leave the admin code out of it and only pull upload_myfiles.asp when I wanted the ability to insert a file in a post, then use myfiles.asp when you want to list them from a profile or admin options page.

In your code to display thumbnails in myfiles.asp, I'd leave the admin listing as text as I have and if not an admin, then show thumbnails. If you have it show thumbnails with the Admin list, then if you have quite a few users that have uploaded files it can take quite some time to build that page. The admin doesn't really need to see the thumbnails for that list anyway, it's basically just to let him know how many files are in his upload directory and which users they belong too. However, there are also some advantages to the admin seeing thumbnails too.

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

James
Average Member

USA
539 Posts

Posted - 30 November 2002 :  00:42:12  Show Profile  Visit James's Homepage
For the myfiles.asp to display thumbnails to users, but just text to the admin, change the following:

	ElseIf Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR  Instr(FileName,".GIF") OR Instr(FileName,".PNG") Then
		Response.Write("<Font color =Red>" & Name & "<br></font>")


to read:


	ElseIf Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR  Instr(FileName,".GIF") OR Instr(FileName,".PNG") Then
		if AdminAllowed then
	      Response.Write("<Font color =Red>" & Name & "<br></font>")
	    else
	      Response.Write("<Font color =Red>" & Name & " <img src=""uploads/" & strDBNTUserName & "/" & Name & """ height=""200"" width=""200""><br></font>")
	    end if


Make sure to change "uploads" if your uploads directory is something different.

If you want it to show the admin thumbnails too, then change it to read:


	ElseIf Instr(FileName,".JPG") OR Instr(FileName,".JPEG") OR  Instr(FileName,".GIF") OR Instr(FileName,".PNG") Then
		if AdminAllowed then
	      Response.Write("<Font color =Red>" & Name & " <img src=""uploads/" & Name & """ height=""200"" width=""200""><br></font>")
	    else
	      Response.Write("<Font color =Red>" & Name & " <img src=""uploads/" & strDBNTUserName & "/" & Name & """ height=""200"" width=""200""><br></font>")
	    end if



Note: I updated the zip file in the original post of this topic to include this and Admin listing of all uploaded files

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

Arne2
New Member

Denmark
51 Posts

Posted - 30 November 2002 :  00:57:09  Show Profile
I like this MOD.
Now, with the myfiles.asp - how about having a button there so the user could click on to delete his own file? Now users have to email me in order to get a file deleted, and everybody knows how that ends. (Files are piling up :-)

Regards
Arne
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 30 November 2002 :  13:47:22  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
thats a good idea, i will have to look into that, but im not sure how it would be done, something with outputFile.asp im sure
Go to Top of Page

DJ5A
Junior Member

163 Posts

Posted - 30 November 2002 :  15:09:26  Show Profile
Hello Everybody:

I think I have some thing wrong here or?

Ok, I'm not using the View Images Link in the Profile.

Now lets say I have 3 images Uploaded & they work fine the first time. Now I go back &
click on the Paper clip to insert image, Now I click on "View" Button to "View your
Uploaded Files" now I see my 3 Files that I've Uploaded. These work fine first time
around, but the second time...

If I click on one of the Buttons that has the File name on it, it inserts the script in
to the subject of the Reply just like the first time, but now it's only 418 bytes,
there's no image there & it reduces the original file size in the folder to less than 1
KB? So now the Image is gone & just an X there now.

How can this be corrected?

Thank You for Your Time!!!!!
DJ5A

Edited by - DJ5A on 30 November 2002 15:10:55
Go to Top of Page

James
Average Member

USA
539 Posts

Posted - 30 November 2002 :  21:29:29  Show Profile  Visit James's Homepage
Arne, that's what I was planning on adding next. I just have to make
sure it's secure. Having someone find a way to look at your uploaded
files is not that big a problem. Having someone figure out a way to
delete them is.

DJ5A, that problem lies in Zero's upload_myfiles.asp addition which I
haven't had a chance to go through yet. i'm still trying to sort out
a problem with mikes file attachment mod where it will not insert the
code for netscape users (driving me nuts). I didn't plan on trying
Zero's version until I got that sorted out.

*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Go to Top of Page
Page: of 5 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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07