Welcome to our site!
Or Join with

0

633 views
If the !config.ini file is setting the minimum reputation in order to add comments to 1, and a user has a reputation of 1, they are unable to add a comment. They are getting a message that they need a reputation of 1 to add a comment (and they have a reputation of 1). I found this snippet of code in the qa.js file:

//if( isModerator() || (reputation > 0) || el.test('.uid-' + ge$if (('1' === getMeta('comment')) || (getMeta('asker_id')== vid) || (rep > minrep) || el.test('.uid-' + vid)) { Not the part where it says if rep > minrep -- shouldn't this be a greater than or equal to comparison? If that is true, what is the syntax so I can change this in our production instance? Thank you.  asked August 29, 2013 at 12:03 PM You probably right. Keep in mind that every new user has a reputation set to 1 when they join. So by setting min reputation to 1 you are essentially saying "any registered user". You might as well then set min reputation to 0 flag Aug 30, 2013 06:50 AM They have a reputation of 1 once they acknowledge their registration, correct? So if they register (or someone registers for them), until they respond to the initial e-mail, they have a reputation of 0. We don't want those with 0 being able to respond because it could be an error or someone not verified. flag Sep 3, 2013 05:46 AM But the point was not really WHAT we are setting the reputation at (it's our discretion as to what we want it set at), but that the code needs to be 'tweaked". If, for example, we wanted anyone with a reputation of 10 or greater to be able to comment, and we set it to 10 in the config file, it would not let them comment until they had a reputation of 11. Should the syntax be rep > = minrep to fix this? flag Sep 3, 2013 05:47 AM ### 1 Answer 0 Changing the code in the qa.js file from this: if (ensureLogin()) { //if( isModerator() || (reputation > 0) || el.test('.uid-' + ge$
if (('1' === getMeta('comment')) || (getMeta('asker_id')== vid) || (rep > minrep) || el.test('.uid-' + vid)) {

to this
//if( isModerator() || (reputation > 0) || el.test('.uid-' + ge\$
if (('1' === getMeta('comment')) || (getMeta('asker_id')== vid) || (rep >= minrep) || el.test('.uid-' + vid)) {

solved the problem for us.

flag
 answered September 3, 2013 at 9:04 AM