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 Attachments
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 9

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 15 November 2000 :  13:37:08  Show Profile  Visit HuwR's Homepage
Should be ok, let me know if you need any help

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

pk_zone
New Member

Canada
69 Posts

Posted - 22 November 2000 :  01:57:45  Show Profile  Send pk_zone an ICQ Message
Hello,

I was looking at this too. I have my own file upload utility and I think Huwr's is a little better thought out, mine is more like an ftp server rather than a message download link like Huwr's. I am looking at combining the two of them together, combining the best parts of both and releasing it here. News at 11....and yes, it will integrate with the profile mod so users can upload their pictures and use 'em.

if you're curious what my file upload/download mod does go here:

http://www.daccomp.com/gamma2/forum/default.asp

and click on the "File Center" link in the top right corner, you will need to register on the board before you can use the file utility though....

Cheers!

PK

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 22 November 2000 :  05:06:33  Show Profile  Visit HuwR's Homepage
let me know If you need any help.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

infinity
New Member

New Zealand
90 Posts

Posted - 22 November 2000 :  14:54:40  Show Profile  Visit infinity's Homepage
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hello,

I was looking at this too. I have my own file upload utility and I think Huwr's is a little better thought out, mine is more like an ftp server rather than a message download link like Huwr's. I am looking at combining the two of them together, combining the best parts of both and releasing it here. News at 11....and yes, it will integrate with the profile mod so users can upload their

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Hey Pk... this sounds great.
Do keep us posted on how you go.
Also, if you had not already thought of it, it would be good to be able to turn the whole file feature off and on in the admin.

Blessings,

Infinity

Life is but a dream... and that dream is Here and Now. Therefore, Be here Now.
Go to Top of Page

pk_zone
New Member

Canada
69 Posts

Posted - 27 November 2000 :  03:50:05  Show Profile  Send pk_zone an ICQ Message
Well, you know, the more I look at Huwr's file attachment thingy the more I like it. Hats off to Huwr for that one <img src=icon_smile.gif border=0 align=middle>. As for mixing mine and Huwr's together, hmmm, not going to work too well I don't think. I use a custom OCX and DLL file with mine and Huwr is using straight ASP. I think the best thing here maybe is to collaborate with Huwr and refine and expand on his idea. Like I said, mine is more of a scaled down FTP server type add-in rather than a mod, which seemed like a good idea at the time. But who knows, I might come up with something that is a freak of nature and blows everything out of the water <img src=icon_smile_tongue.gif border=0 align=middle> !! Well, time is a-wasting so back to the secret laboratory I go.... E-gor my coach!.....

Cheers!

PK



Go to Top of Page

jkubecki
Starting Member

USA
4 Posts

Posted - 30 November 2000 :  15:09:15  Show Profile
Great mod! However... (You knew it was coming...)

Files don't get deleted properly (and the entries from FORUM_USERFILES are still there) when you delete a reply. I've traced it down to the fact that none of the files seem to be actually associated with the replies:

In post.asp, the code builds the link to the "Attach File" page as such:
<pre id=code><font face=courier size=2 id=code>pop_upload.asp?TOPIC_ID=" & Request.Querystring("TOPIC_ID") & "&REPLY_ID=" & Request.Querystring("REPLY_ID")</font id=code></pre id=code>

The problem is that there <i>is</i> no "Request.QueryString("REPLY_ID")" - you're composing the reply at this point, so it hasn't been saved to the DB and hence no ID value could be assigned yet. So, the mod puts in a "-1" for the Reply ID.

When you delete the reply, it looks for any entries in FORUM_USERFILES which match the reply ID that you're deleting. There are none, since they're all -1.

Has anyone found a way around this?

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 30 November 2000 :  15:27:19  Show Profile  Visit HuwR's Homepage
The reply id should get added in post_info.asp, I will check and let you know.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

jkubecki
Starting Member

USA
4 Posts

Posted - 04 December 2000 :  16:26:46  Show Profile
I checked for it in post_info.asp, but I don't see it there. Then I went back to the mod info (FileAttachment.txt) and don't see any changes there for post_info.asp. Any thoughts?

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 04 December 2000 :  16:45:21  Show Profile  Visit HuwR's Homepage
You're absolutely right, there is a whole bit missing,

in post_info.asp, search for
<font color=red>strSql = "INSERT INTO " & strTablePrefix & "REPLY "</font id=red>
scroll down until you find the
<font color=red>my_Conn.Execute (strSql)</font id=red> line, insert the following code imediately after
it.

<pre id=code><font face=courier size=2 id=code><font color=blue>
strSQL = "SELECT MAX(REPLY_ID) AS MAXID FROM " & strTablePrefix & "REPLY "
strSQL = strSQL + "WHERE TOPIC_ID = " & Request.Form("TOPIC_ID")
strSQL = strSQL + " AND R_AUTHOR = " & rs("MEMBER_ID")
set rs2 = my_Conn.Execute (strSql)
intReplyID = rs2("MAXID")
rs2.close
strSQL = "UPDATE " & strTablePrefix & "USERFILES "
strSQL = strSQL & "SET F_REPLY_ID = " & intReplyID
strSQL = strSQL & " WHERE MEMBER_ID = " & rs("MEMBER_ID")
strSQL = strSQL & " AND F_REPLY_ID = -1 AND F_TOPIC_ID =" & Request.Form("TOPIC_ID")
my_Conn.execute (strSQL)
</font id=blue></font id=code></pre id=code>

<font color=blue>'Resistance is futile'</font id=blue>

and thanks for finding the deliberate mistake <img src=icon_smile_blush.gif border=0 align=middle>

Edited by - huwr on 04 December 2000 16:49:47
Go to Top of Page

jkubecki
Starting Member

USA
4 Posts

Posted - 06 December 2000 :  13:44:10  Show Profile
Works like a charm!
I had one other problem, which I was able to fix:

In the DeleteUploads function in pop_delete.asp, you use this to build the path to the file to delete:

<pre id=code><font face=courier size=2 id=code>FilePath = Server.mappath("/Uploaded") & "\" & getMemberName(rs2("MEMBER_ID")) & "\"</font id=code></pre id=code>

However, this assumes that the "Uploaded" directory is right off the root of the site. When the file is uploaded, however, you use this to build the path to save it (in UploadEngine.asp):

<pre id=code><font face=courier size=2 id=code>strRoot = Server.mappath(replace(strCookieURL,"/Mods/","/",1,-1,1) & "uploaded")</font id=code></pre id=code>

which means that "Uploaded" is at the same level as the "Mods" folder. My folder tree has the forum stuff in a "snitz" directory, with "Mods" and "uploaded" right under there, so my files weren't being deleted.

<b>The Solution</b>
I put the line

<pre id=code><font face=courier size=2 id=code>strRoot = Server.mappath(replace(strCookieURL,"/Mods/","/",1,-1,1) & "uploaded")</font id=code></pre id=code>

at the beginning of DeleteUploads in pop_delete.asp. I then replaced this:

<pre id=code><font face=courier size=2 id=code>FilePath = Server.mappath("/Uploaded") & "\" & getMemberName(rs2("MEMBER_ID")) & "\"</font id=code></pre id=code>

in the same function with this:

<pre id=code><font face=courier size=2 id=code>FilePath = strRoot & "\" & getMemberName(rs2("MEMBER_ID")) & "\"</font id=code></pre id=code>

Now it works great!

<b>One other question...</b>

I couldn't help but notice in DeleteUploads you have a case "Topic" which means that you either planned to allow attachments on initial postings starting a new topic, or that you are currently working on it. This is something I'd probably customize on my end, but I'd hate to duplicate efforts. Is this something you're actively working on? Feel free to email me off-board to discuss, if you'd like. (jkubecki@made2manage.com)

<b>And FINALLY...</b>
Thanks for helping out on this. And a <b>HUGE THANKS</b> for writing such a great mod - file attachments is one of the requirements my boss has thrown at me for a message board system for our intranet. Now if I could <i>just</i> get polling working with 3.1sr2...

JFK



Edited by - jkubecki on 06 December 2000 13:44:49
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 06 December 2000 :  13:56:49  Show Profile  Visit HuwR's Homepage
Point 1 I will sort in my version of the code.
Point 2 My original ida was to allow attachments to the initial Topic, however
it requires a reply_id and topic_id, so this was not possible.
Point 3 You're welcome, I have a version of PollMentor which works with the 3.1srx of the forum

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

Dago
Starting Member

2 Posts

Posted - 08 December 2000 :  16:50:43  Show Profile
Hi HuwR, First thanks for the great code. Here is my problem. I have the Snitz Forum 2000 with the file mod running on two webservers. Both sites have all the same files. The file mod works on one ,but not on the other. The one it works on is running Windows2000sp1 with IIS5. It is my personal webserver. The other is on a commercial webserver. Everything is identical except the webservers, so I believe that the server is the problem.

Here is the error I keep running into:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/forum/Include/clsCollection.inc, line 19

Public Property Get Count()
----------------^
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
This error appears in the popup window after you click the upload button to upload the file.

Any help would be greatly appriciated .



Dago

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 08 December 2000 :  18:18:11  Show Profile  Visit HuwR's Homepage
It would appear from your error that they do not have the fileSystem object and the Scripting.Dictionary enabled on there site.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

ISJX_YICK
New Member

France
68 Posts

Posted - 09 December 2000 :  07:16:22  Show Profile  Visit ISJX_YICK's Homepage  Send ISJX_YICK an ICQ Message
to attach a file on the 1st post you can however use the EDIT function to add the attached file
you *may* have to edit the Upload mod so that the edit part shows the attach file link

but that's a tip i used to post a file on the 1st post :)



WOW THAT's NICE !!!
Go to Top of Page

pinozz
New Member

53 Posts

Posted - 22 December 2000 :  22:23:19  Show Profile
please help me, I get this error from my admin_fileattachment.asp
_____________________________________
Microsoft VBScript runtime error '800a01c9'

This key is already associated with an element of this collection

/admin_fileattachment.asp, line 10
___________________________________________

...and this from file_attach_setup.asp
______________________________________
-2147217900 | Table 'FORUM_USERFILES' already exists.
-2147217900 | Table 'FORUM_MODS' already exists.
-2147217887 | Field 'M_ALLOWDOWNLOADS' already exists in table 'FORUM_MEMBERS'.
-2147217887 | Field 'M_ALLOWUPLOADS' already exists in table 'FORUM_MEMBERS'.
-2147217900 | Syntax error in ALTER TABLE statement.
-2147217900 | Syntax error in ALTER TABLE statement.
-2147217900 | Syntax error in ALTER TABLE statement.
-2147217900 | Syntax error in ALTER TABLE statement.
-2147217900 | Syntax error in ALTER TABLE statement.

Database set-up finished..
__________________________________


How can I fix this? Please I need fast help, 'cause my forum shows bad error messages!!!

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