Although this isn't a fix, and might fuddle it up even more, what happens when you user this:
$countquery = "SELECT COUNT(DISTINCT uid) FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE stories > 0";
Tried that. It's the very same outcome. Though I'm not sure if that's generally or if it's because moi had been fiddling a little in some parts of the coding *lol* I'll try an fresh installation tomorrow and let you know what's happening then. Just to make sure it wasn't me π
Just a little late now. almost midnight already and I gotta get up tomorrow. π
It is, btw, an admin only feature. So I'm not really feeling bad about it because users won't see it anyway. I just attempted to help out by having a look at the code rather than just posting the errormessage and let you guys work it out π
Damdidaaa... now it IS past midnight, I should have been in bed already ... well, doesn't matter.
I tried a completely fresh installation of 3.5 with nothing but the challenge module, set up a couple of authors, chars and a category, added a dummy rating, added some dummy stories and a dummy-challenge. I tried the fix I provided and the fix Lyndsie suggested and I tried your version, too. All three have the same outcome. multiple listings of ALL members instead of authors only.
So it wasn't me *lol*
BUT! What I can say now is this:
Site A has 3 Authors and all Members get listet 3times (it breaks off after 75 listings, though so it doesn't show all members)
Site B has only one Author so far .... and all members get listet once. (again the same listing-version. 3 columns, but column 1 & 2 only have one name, while all the other names are listed in the third, very right column)
Site C has 2 authors ... and now guess what? Yes. All members get listet twice. π
Don't know if that is any help, though.
fresh installation for testing was done on xxamp again, as are my two installations I'm currently working on, but that's not the problem, either; I uploaded the changed challenge.php to my webspace where I have the very same sites (only less data and skins as that's what I'm working on in my testenvironment - saves me the style.css upload business after changing stuff *lol*) and the same error occured there, too. multiple listings of all members instead of authors only, depending on the number of authors in the archive.
Almost half past ... I'll have a ciggi now and go to bed then. I'm happy to play around some more, tomorrow.
Old
URL: http://fiction.intayale.de
Version: 3.3.1
Modules: Challenges, Story Tracker, Mulit-lang. eFiction
PHP: 4.4.8
MySQL: 5.0.51a
New
URL: http://intayale.de/deFiction
Version: 3.5
Modules: Last Login
PHP: 5.2.9
MySQL: 5.0.77
