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)
 MOD: News Forum Refreshed for v3.4
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 7

Dan Martin
Average Member

USA
528 Posts

Posted - 28 January 2003 :  01:37:08  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
I'm sorry to see some of you've had so many problems with this. I honestly don't know enough about the limitations of the various ODBC drivers to explain these issues. I do know they are obviously related to MySQL and SQL Server - neither of which I've tested the MOD with.

John - the implementation on your website looks great. Your idea for multiple forums is interesting. I originally tried to write it that way, but it was causing me too much trouble (particularly the admin interface).

I think you'd really need to change the whole design. Add a field to the FORUM_FORUM table that is a boolean that indicates if a Forum is a "News Forum". Then you could move the administration to a simple checkbox on the Forum Properties page. Then you could add a FOR loop based on "SELECT FORUM_ID WHERE isNews = True".

But, alas - probably not something I'll get around to. But I wouldn't be offended at all if you update the MOD with your ideas. I open sourced it with intent.
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 02 February 2003 :  00:14:05  Show Profile
I've got mine working on my site fine. If anyone needs help with 3.4.03 I might be able to lend a hand. A bit.
Go to Top of Page

webbee
Junior Member

100 Posts

Posted - 16 February 2003 :  14:40:50  Show Profile  Visit webbee's Homepage  Send webbee an AOL message  Send webbee a Yahoo! Message
I was wondering if this feature could be added to this mod. When you create a post you have a checkbox that says news and only those postes will be shown on the main page. Also, admins and or moderators will have that checkbox so not everyone can do it. Could this happend? Thank you.

garnold@teamfatbastard.net
Go to Top of Page

webbee
Junior Member

100 Posts

Posted - 17 February 2003 :  14:57:27  Show Profile  Visit webbee's Homepage  Send webbee an AOL message  Send webbee a Yahoo! Message
I started working on this and so far so good. I think I'll start a thread in the Mods w/o code forum and see if anyone wants to help.

garnold@teamfatbastard.net
Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 20 February 2003 :  21:17:19  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
So, is your intent to make it where you don't create a forum specifically for news? Instead any post in any forum could be a news item? Interesting twist. I'm happy with the way it is, but I can see where you might prefer your way. As I've said before, feel free to modify the MOD as you desire and post other versions.

Go to Top of Page

famdylan
Starting Member

15 Posts

Posted - 21 February 2003 :  10:57:36  Show Profile
I am having the problems that was mentioned beofre of the

Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/forum/inc_news.asp, line 15

line 15 has

rs.open strSql, my_conn

I have tried a coule of things but I am not quite sure of the problem
Go to Top of Page

Schwanke
New Member

77 Posts

Posted - 21 February 2003 :  17:48:01  Show Profile  Visit Schwanke's Homepage
Ive got a different select statement problem with this mod.

I got to the point where we use the TopSql instead of doing the TOP x in the select. Thats fine.

But now I get:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E09)
[TCX][MyODBC]You have an error in your SQL syntax near '(FORUM_MEMBERS INNER JOIN FORUM_TOPICS ON FORUM_MEMBERS.MEMBER_ID = FORUM_TOPICS' at line 1
/forums/inc_news.asp, line 35


The whole select statement is:

SELECT FORUM_FORUM.F_SUBJECT, FORUM_TOPICS.FORUM_ID, FORUM_TOPICS.TOPIC_ID, FORUM_TOPICS.CAT_ID, FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_NAME, FORUM_TOPICS.T_SUBJECT, FORUM_TOPICS.T_MESSAGE, FORUM_TOPICS.T_DATE, FORUM_MEMBERS.M_SIG FROM FORUM_FORUM INNER JOIN (FORUM_MEMBERS INNER JOIN FORUM_TOPICS ON FORUM_MEMBERS.MEMBER_ID = FORUM_TOPICS.T_AUTHOR) ON (FORUM_FORUM.FORUM_ID = FORUM_TOPICS.FORUM_ID) AND (FORUM_FORUM.CAT_ID = FORUM_TOPICS.CAT_ID) WHERE FORUM_FORUM.FORUM_ID=1 and FORUM_TOPICS.T_STATUS < 2 ORDER BY FORUM_TOPICS.T_DATE DESC

I dont know how inner joins work yet so I cant debug it myself. ANyone have any ideas?

Im getting so close! :)

<><
Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 21 February 2003 :  23:34:14  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
Famdylan - That error is because MYSQL doesn't support SELECT TOP X. You'll have to use the TopSql function instead. If someone would like to send me the code for this (dmartin-at-dmartin.org), I'll update the archive.

Schwanke - no idea what causes that, sorry. Surely MySQL supports inner joins?!? An Inner Join means "Give me all records from TableA joined to TableB where my join criteria is equal." It will leave out any records from either table who don't have a match in the joined field. Alternatively a Left Outer Join gives every record from the first table, linked to the second table where your criteria is true. A Right Outer Join gives every record from the second table, linked to the first table where your criteria is true. Not sure if that's a good explanation, but its the best I can do.

So for instance (FORUM_MEMBERS INNER JOIN FORUM_TOPICS ON FORUM_MEMBERS.MEMBER_ID = FORUM_TOPICS.T_AUTHOR). This bit of code links the MEMBER_ID stored in the posted message to the FORUM_MEMBERS table to retreive the details about the author(the name: FORUM_MEMBERS.M_NAME and the sig:FORUM_MEMBERS.M_SIG).
Go to Top of Page

rgrund
Junior Member

Austria
206 Posts

Posted - 22 February 2003 :  11:08:45  Show Profile
Hi,

mssql can use Top only that the sql statement looks different. I have added an example which i am using in one mof my mods. You will need to amend the script so that it will work for you, but this should not be to difficult.

If strDBType = "mysql" then
strSql = "SELECT SITESTAT_YESTERDAY_COUNT,SITESTAT_YESTERDAY_VISITOR "
strSql = strSql & "FROM " & strMemberTablePrefix & "SITESTAT "
strSql = strSql & "ORDER BY SITESTAT_YEAR DESC, SITESTAT_MONTH_COUNT DESC LIMIT 1"
Else
strSql = "SELECT TOP 1 SITESTAT_YESTERDAY_COUNT, SITESTAT_YESTERDAY_VISITOR "
strSql = strSql & "FROM " & strMemberTablePrefix & "SITESTAT "
strSql = strSql & "ORDER BY SITESTAT_YEAR DESC, SITESTAT_MONTH_COUNT DESC"
End If

Bob

Internet should be OPENSOURCEd!
Go to Top of Page

Schwanke
New Member

77 Posts

Posted - 22 February 2003 :  23:07:00  Show Profile  Visit Schwanke's Homepage
Figured it out..

Aparently with mysql sometimes you ahve to reverse the table1 and some-other-join when you are innerjoining a second join.

See the user comment at the end of this page for more information:
http://www.mysql.com/doc/en/JOIN.html

I made it into this:

strSql ="SELECT " & strTablePrefix & "FORUM.F_SUBJECT, " & strTablePrefix & "TOPICS.FORUM_ID, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.CAT_ID, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_MESSAGE, " & strTablePrefix & "TOPICS.T_DATE, " & strMemberTablePrefix & "MEMBERS.M_SIG"
strSql = strSql & " FROM (" & strMemberTablePrefix & "MEMBERS INNER JOIN " & strTablePrefix & "TOPICS ON " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR) INNER JOIN " & strTablePrefix & "FORUM ON (" & strTablePrefix & "FORUM.FORUM_ID = " & strTablePrefix & "TOPICS.FORUM_ID) AND (" & strTablePrefix & "FORUM.CAT_ID = " & strTablePrefix & "TOPICS.CAT_ID)"
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID=" & strNewsForum_ID & " and " & strTablePrefix & "TOPICS.T_STATUS < 2"
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_DATE DESC"




<><
Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 23 February 2003 :  06:57:15  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
Schwanke, if you get a chance, send me your inc_news.asp. I'll test it, and if it works with non-MySQL databases, I'll merge it for everyone's benefit. dmartin-at-dmartin.org.

Thanks,
Dan
Go to Top of Page

webbee
Junior Member

100 Posts

Posted - 12 March 2003 :  22:57:49  Show Profile  Visit webbee's Homepage  Send webbee an AOL message  Send webbee a Yahoo! Message
Ok I think you folks might like this. I just tweaked this mod a little and added this feature. I wanted to be able to allow admins only to post news but allow anyone to reply to the news. Here's what I got so far. Take a look at this pic



See when you make a post you can check if you want it to be part of the news query and only those posts get added to the main page. This check box will only show for admins. The down side is it will show on all posting but it's not like it will hurt anything. Anyway tell me what you think and if I should post the code.

garnold@teamfatbastard.net
Go to Top of Page

blues
Starting Member

26 Posts

Posted - 28 May 2003 :  11:50:40  Show Profile
quote:
yes, i think the "SELECT TOP xx" only supported on Access,(and SQL ?? ) in MySQL, it seem have another syntax can be used.

i'm also know MySQL nothing.... but do'nt worry.. i know there is new and very useful function TopSQL in 3.4.

for example, in your situation, i think the SQL string should be modified to this.. (inc_news.asp about line.28 & line.33)
change this
strSql ="SELECT TOP "& strNewsTopicCount & " " & strTablePrefix & "FORUM.F_SUBJECT, " &..........
to
strSql ="SELECT " & strTablePrefix & "FORUM.F_SUBJECT, " &..........

and this
rs.open strSql, my_conn
to
rs.open TopSQL(strSql,strNewsTopicCount), my_conn


the problem is the same


Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax near '(FORUM_MEMBERS INNER JOIN FORUM_TOPICS ON FORUM_MEMBERS.MEMBER_ID = FORUM_TOPICS' at line 1

/forum/inc_news.asp, line 33


Go to Top of Page

Viv
Starting Member

Belgium
8 Posts

Posted - 26 July 2003 :  08:24:16  Show Profile
I installed the MOD too
and I have this error on the portal:

Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment: 'chkDate'
/Oktobermamas/Forums/inc_news.asp, line 54

What's wrong?

viv
Go to Top of Page

Viv
Starting Member

Belgium
8 Posts

Posted - 26 July 2003 :  17:30:56  Show Profile
When I delete this line:
On <%=ChkDate(rs.Fields("T_Date"))%> At <%=ChkTime(rs.Fields("T_Date"))%>

It works but it display no date of posting

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