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

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 November 2000 :  17:07:40  Show Profile  Visit HuwR's Homepage
Well here goes,

Instructions for installing are included in the Zip file.
It also contains animedj's Mod Commander which you ned to install first.

Any questions, you know who to ask.

download

'Resistance is futile'

Edited by - huwr on 29 January 2001 10:31:23

isuru
Junior Member

464 Posts

Posted - 01 November 2000 :  18:45:50  Show Profile
Thanks a lot for sharing your code HuwR.

-=-=-=-=-=-=-=-
Isuru Amarasena
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 November 2000 :  20:07:58  Show Profile  Visit HuwR's Homepage
Found a couple of probs in the file_attach_setup.asp,

I have updated the Zip, but if you have already downloadd it, you can get the new setup here

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

pk_zone
New Member

Canada
69 Posts

Posted - 13 November 2000 :  03:01:22  Show Profile  Send pk_zone an ICQ Message
Huwr,

Mind if I e-mail you on this mod? I have a few questions as I am getting database errors even though I have manually entered the proper fields and tables.

I also get an error from Post.asp when trying to upload, "exception occured" error which is not too informative, hehe.. Has something to do with the chunk of code put in the post.asp right after the "Include inc_top.asp" line. Don't think something is being defined properly.

Thanks

PK


Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 13 November 2000 :  03:07:52  Show Profile  Visit HuwR's Homepage
No prob, just mail me.

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

Aznknight
Senior Member

USA
1373 Posts

Posted - 14 November 2000 :  14:50:59  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
I'm in the process of installing this mod and here are my preliminary comments.

1) .mod file says this
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>File Attachments
<b>Mods/</b>admin_fileattachment.asp
true
1.10
<b>Mods/</b>file_attach_setup.asp
Huwr
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Since fileattachment.mod is already in a directory called mods, it'll look for file_attach_setup and txt in "mods/Mods/" directory. I removed the "Mods/" in the .mod file.

Wow how manytimes did I write mode in that last paragraph hehe <img src=icon_smile.gif border=0 align=middle>

2) I ran file_attach_setup.asp and it returned the following errors. I will investigate this more by looking in that asp code.

<pre id=code><font face=courier size=2 id=code>
0 |
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Table 'FORUM_MODS' already exists.
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.

Database set-up finished..
</font id=code></pre id=code>


- Alan
alan@calvsa.net
www.calvsa.net
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 14 November 2000 :  15:41:00  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
I added some response.write's to see the strSql.<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
CREATE TABLE FORUM_USERFILES ( F_FILEID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , MEMBER_ID int NOT NULL ,F_FILENAME varchar (255) NOT NULL ,F_FILESIZE int NULL ,F_REPLY_ID int NULL ,F_TOPIC_ID int NULL )
0 |

CREATE TABLE FORUM_MODS ( M_NAME varchar (20) NULL ,M_CODE varchar (20) NULL ,M_VALUE varchar (30) NULL )
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Table 'FORUM_MODS' already exists.

ALTER TABLE FORUM_MEMBERS (ADD COLUMN M_ALLOWDOWNLOADS int,ADD COLUMN M_ALLOWUPLOADS int )
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.

ALTER TABLE FORUM_MEMBERS WITH NOCHECK ADD CONSTRAINT DF_FORUM_MEMBERS_M_ALLOWUPLOADS DEFAULT (1) FOR M_ALLOWUPLOADS,CONSTRAINT DF_FORUM_MEMBERS_M_DOWNLOADFILES DEFAULT (1) FOR M_ALLOWDOWNLOADS
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.

Database set-up finished..
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

- Alan
alan@calvsa.net
www.calvsa.net



Edited by - aznknight on 14 November 2000 15:46:07
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 November 2000 :  16:11:57  Show Profile  Visit HuwR's Homepage
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I'm in the process of installing this mod and here are my preliminary comments.

1) .mod file says this
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>File Attachments
<b>Mods/</b>admin_fileattachment.asp
true
1.10
<b>Mods/</b>file_attach_setup.asp
Huwr
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Since fileattachment.mod is already in a directory called mods, it'll look for file_attach_setup and txt in "mods/Mods/" directory. I removed the "Mods/" in the .mod file.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
That was me, I had to change it to accomodate some of my other mods which wouldn't work from the mods directory.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<pre id=code><font face=courier size=2 id=code>
0 |
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Table 'FORUM_MODS' already exists.
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.

Database set-up finished..
</font id=code></pre id=code>

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

You can ignore those errors, you already had the mod commander installed.

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

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 November 2000 :  16:16:24  Show Profile  Visit HuwR's Homepage
There is one more thing, I forgot to put it in the setup.

You need to add three records to FORUM_MODS as follows
<pre id=code><font face=courier size=2 id=code>
M_NAME M_CODE M_VALUE
Attachment faMaxSize 512 <i>Maximum file size</i>
Attachment faExtensions '.zip;.mdb' <i>allowed extensions</i>
Attachment faAllowUploads 1 [i]All uploads (1)= yes (0) = No
</font id=code></pre id=code>

Also if you anticipating large uploads, you may have problems with script timeouts on the server.

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

Aznknight
Senior Member

USA
1373 Posts

Posted - 15 November 2000 :  00:36:14  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
this code will add the necessary fields to the forum_mods table.

<pre id=code><font face=courier size=2 id=code>
<!--#INCLUDE FILE="../config.asp" -->
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<%
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
on error resume next

strSql = "INSERT INTO " & strTablePrefix & "MODS"
strSql = strSql & " (M_NAME , M_CODE, M_VALUE) "
strSql = strSql & " VALUES"
strSql = strSql & " ( 'Attachment', 'faMaxSize', '512') "
Response.Write "<br>" & strSql & "<br>"

my_Conn.Execute strSql
response.write(err.number & " | " & err.description & "<br>")

strSql = "INSERT INTO " & strTablePrefix & "MODS"
strSql = strSql & " (M_NAME , M_CODE, M_VALUE) "
strSql = strSql & " VALUES"
strSql = strSql & " ( 'Attachment', 'faExtensions', '.zip;.mdb') "
Response.Write "<br>" & strSql & "<br>"

my_Conn.Execute strSql
response.write(err.number & " | " & err.description & "<br>")

strSql = "INSERT INTO " & strTablePrefix & "MODS"
strSql = strSql & " (M_NAME , M_CODE, M_VALUE) "
strSql = strSql & " VALUES"
strSql = strSql & " ( 'Attachment', 'faAllowUploads', '1') "
Response.Write "<br>" & strSql & "<br>"

my_Conn.Execute strSql
response.write(err.number & " | " & err.description & "<br>")

response.write "<h1>Database set-up finished..</h1>"

my_Conn.Close
set my_Conn = nothing
Response.End
%></font>
</font id=code></pre id=code>

- Alan
alan@calvsa.net
www.calvsa.net
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 15 November 2000 :  00:57:39  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<pre id=code><font face=courier size=2 id=code>
0 |
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Table 'FORUM_MODS' already exists.
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.

Database set-up finished..
</font id=code></pre id=code>

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

You can ignore those errors, you already had the mod commander installed.

<font color=blue>'Resistance is futile'</font id=blue>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Hmm, what about the two alter table statements to the database? they returned error so the script didn't add the fields and their constraints/default to my test members database.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
ALTER TABLE FORUM_MEMBERS (ADD COLUMN M_ALLOWDOWNLOADS int,ADD COLUMN M_ALLOWUPLOADS int )
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.

ALTER TABLE FORUM_MEMBERS WITH NOCHECK ADD CONSTRAINT DF_FORUM_MEMBERS_M_ALLOWUPLOADS DEFAULT (1) FOR M_ALLOWUPLOADS,CONSTRAINT DF_FORUM_MEMBERS_M_DOWNLOADFILES DEFAULT (1) FOR M_ALLOWDOWNLOADS
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I didn't know that you can combine two add column commands into a single alter table statement like that. And is the second alter table suppose to add default of 1 to the those fields?

- Alan
alan@calvsa.net
www.calvsa.net


Edited by - aznknight on 15 November 2000 01:00:39
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 15 November 2000 :  02:40:57  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
Anyone else got this mod to work for them?

- Alan
alan@calvsa.net
www.calvsa.net
Go to Top of Page

netcall
Starting Member

United Kingdom
10 Posts

Posted - 15 November 2000 :  05:04:27  Show Profile
I have got this mod to work - mainly down to Huws hard work and patience. One thing that would benefit this mod even further would be the function to upload files on the first post, as at the moment it is used on replying.

Cheers

Iain

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 15 November 2000 :  06:33:14  Show Profile  Visit HuwR's Homepage
I will probably get round do changing this at a later date. My biggest concern initially was just to get it working, which is why I just concentrated on the replies, less code.

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

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 15 November 2000 :  06:40:21  Show Profile  Visit HuwR's Homepage
AznKnight,
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Anyone else got this mod to work for them?

- Alan
alan@calvsa.net
www.calvsa.net

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

Are you still having psobs ?
I have updated the zip file with some changes to the upload paths, you may find this will help.

Let me know what probs you are getting

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

Aznknight
Senior Member

USA
1373 Posts

Posted - 15 November 2000 :  13:20:01  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
thanks huwr, i did get it to work on my test forum when i created uploaded directory and change some of the paths in your original zip.

I like how it uploads file to each members own sub directory under uploaded.

I was thinking of applying this to allow members to upload their own pictures instead of having them store it on other servers and link it. What do you think?

- Alan
alan@calvsa.net
www.calvsa.net
Go to Top of Page
Page: of 9 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.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07