The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I created a datamanager for Reputation. I had to do this so I could give reputation for something which pertains to a custom mod i'm working on. Basically to summarize, whenever a member submits feedback, the feedback is rated by a moderator and given a score. The member then receives the same amount of feedback as the score.
I added the column 'scstfbid' to the reputation table, therefore reputation.scstfbid holds the id of the feedback report for which the reputation is given. Naturally since the reputation given isn't for a post, the value inserted into the column for reputation.postid is '0'. The problem which arises however is that by default, the reputation table has an index named whoadded_postid. This index is built off the columns `whoadded` and `postid`. The index type however is that of unique, which makes sense (since reputation can only be given to any specific post by a specific user no more than once). My problem is that in my custom mod, the post id is filled with a value of '0' when reputation is given for a feedback report, therefore if any moderator gives reputation for more than 1 feedback report, the mysql engind returns the following error: MySQL Error : Duplicate entry '1-0' for key 2 Error Number : 1062 Because (when giving reputation for feedback), the post id is entered as '0'. I know that I could change the type of the index from unique to normal and my problem would likely go away, however it's likely that would screw up some of the default functionality of vbulletin, wouldn't it? Does anyone have an idea of how to work around this issue? it's been stumping me for the entire day... ![]() |
#2
|
||||
|
||||
![]() Quote:
There is no work around with the schema you are using. I suggest creating an entirely new table for your feedback reputation |
#3
|
||||
|
||||
![]()
ugh... I didn't want to do that! I guess i'm running out of options here.
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|