Author |
Topic |
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 10 March 2015 : 04:40:27
|
It's actually not needed. Leave a blank line where the Thanks_ID is. I was going to use it for a future change, but go without it. |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 10 March 2015 : 15:19:13
|
I've installed it but get the following error in a reply after the opening post after someone 'thanks' the first post.....
quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.73-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
/forum/topic.asp, line 945
Lines 942-945 read:
When thanking a reply to a topic the initial post is also credited with a thanks
Also when clicking to see who has 'thanked' the pop up returns the following error..
quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.73-community]Table 'database_name.reply' doesn't exist
/forum/pop_thanks.asp, line 14
It's a MySql databse if that helps at all |
Edited by - Webbo on 10 March 2015 16:23:04 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 10 March 2015 : 18:51:37
|
quote: Originally posted by Webbo
Lines 942-945 read:
There's nothing wrong with that line that I can detect.
quote: When thanking a reply to a topic the initial post is also credited with a thanks.
Yes, that's an easy fix, neglected to include a tiny bit of code. I'll make the change as soon as I finish this reply. Done.
quote: Also when clicking to see who has 'thanked' the pop up returns the following error..
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.73-community]Table 'database_name.reply' doesn't exist
That's because you never configured your strActivePrefix in config.asp ... a lot of the code uses that and you're going to run into errors until you add it. But for the purpose of this, I'll change it to strTablePrefix and the error will go away.
There was one other tiny error in "pop_thanks.asp" having to do with counting the topic "thanks". I had neglected to exclude replies. All code has been fixed on the post and on SnitzBitz. |
Edited by - Carefree on 10 March 2015 19:30:27 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 11 March 2015 : 02:35:13
|
Still can't seem to get rid of the error message...
quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.73-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
/forum/topic.asp, line 946
Here's a link to my topic.asp (.txt) with the changes implemented it you wish to take a look: topic.txt |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 March 2015 : 04:36:43
|
The lines surrounding 946 in this file:
[scrollcode] '## Ignore Post mod if strIgnorePost = "1" then boolIgnoreReply = ChkIgnoreList(arrIgnoreMemberList, Reply_MemberID) end if [/code]
The word "thanks" does not appear. I don't think this is the right file..... |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 11 March 2015 : 13:42:48
|
My mistake, please try again, both pieces of code start at lines 940 and 1380 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 March 2015 : 16:24:23
|
It should work fine the way it is, but it's misbehaving. Replace that block of code with this, maybe MySQL will not hiccup.
|
Edited by - Carefree on 11 March 2015 16:25:37 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 11 March 2015 : 16:41:04
|
Replacing the first block of code resulted in the following error...
quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.73-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
/forum/topic.asp, line 948
Replacing both blocks of code with the same caused the thread not to display and the initial post to be replaced with an error |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 March 2015 : 17:23:37
|
The code isn't the same for both sections. One is for topics, the other for replies. This is the 940 block:
This is the 1380 block:
When you thank the topic, do you get an error? |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 March 2015 : 17:25:32
|
Is anyone else running this on a MySQL database? If so, are you experiencing the errors that Webbo has? |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 11 March 2015 : 17:48:32
|
Okay,
starting with a new file and the changes above....
when thanking the initial post in the topic I get the following error in the first reply and no other replies show...
quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.73-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
/forum/topic.asp, line 945
Emptying the table (thanks) to start again....
If I 'thank' the first reply in the thread it works
However if I 'thank' the initial post or subsequent replies, whilst they add 1 'thanks' to that it adds a further 4 thanks to the first reply also, and the table in the database looks like this...
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 March 2015 : 20:31:23
|
You have a loop someplace. It definitely won't do that the way I wrote it. I tested this on a pristine (virgin) Snitz installation and it works perfectly. Look for something like this (surrounding the Thanks code).
For i = 1 to 4
or
Do while
or
Do until
|
Edited by - Carefree on 11 March 2015 20:38:10 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 12 March 2015 : 13:20:27
|
I thought I'd found the problem and that is with the way that the database was set up as MySql apparently doesn`t like Auto Increment unless the column is Primary
However changing the database table 'thanks' to add auto increment resulted in the following error and also the author of the post below the one I chose to 'thank' being thanked ....
quote: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.73-community]Duplicate entry '180108' for key 'PRIMARY'
/forum/topic.asp, line 946
There are three instances where loops are created and they are within the 'Polls' mod code and the 'Active Users' mod code, line 182, 1107 and 1135
|
Edited by - Webbo on 12 March 2015 13:28:13 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 12 March 2015 : 19:57:30
|
You don't need to worry about the Thanks_ID. It's not necessary for the mod as it stands now. So auto-increment isn't a factor. |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 03 April 2015 : 06:10:58
|
Discovered that screen refreshing can cause thanks counter to increase, so modified code to use "select distinct". Get the update on SnitzBitz. |
|
|
Topic |
|