Version: , by TheSaint-AeD
Developer Last Online: Jan 2004
Version: Unknown
Rating:
Released: 10-22-2002
Last Update: Never
Installs: 0
No support by the author.
I have a serious Problem with the Querries in showthread.php. Everytime I post in an Thread, next time I open the thread it needs exactly 2 Querries more. As I have 25 Threads / Page this means 50 additional Querries on a full Page! As I already have about 25 Querries as default, i got between 30-80 Querries in a Thread
Can anybody explain to my why this happens and why other users on my board don't seem to add so many querries per post? I have access-masks enabled and Quick-Reply + Lesanes Award-System + Quick Delete installed.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
if ($post[award]=="1")
{
$result=$DB_site->query("SELECT * FROM useraward WHERE userid='$post[userid]' AND awardsid=aw ");
while ($awardsp=$DB_site->fetch_array($result))
{
eval("\$post[hasaward] .= \"".gettemplate("awards")."\";");
}
}
This is the only query performed in getpostbit, may there be some messed codes in Lesanes Award-Hack? Me and some other Useres got even more Problems with it. Sometimes donating an Award doubles all DB-Entries which is only shown in user.php but not in awards.php.
Thx 4 your help, Xenon, but I don't know enough about PHP + MySQL to solve this Problem myself. I read the whole Support Thread (which is quite long ) 3 Times because I couldn't believe noone else notices the Problems with the Hacks, but it seems, as if I was the only one.
I don't think there's gonna be a fix of Lesane, as he already had to give up his "Tribute to 2Pac" Board due to his lack of Time. Could anybody else of the vb.org-Staff take care of that Thread? Missing the Award-Hack would be missing one of the most ruling Features of vB
I've got about 20 Awards in total and an average of 1-2 per User. Due to the other Problem (Awards get Duplicated when giving to certain users) I deleted all Awards, but still the same Problem.
Man, Lesane, that was fast . Are you the Neighbour of Xenon? *G*
I'll be looking nervously forward to it, refreshing vb.org every 10 minutes ^^ Btw, Lesane: You had a great board, I'm missing it already though I had only few time to visit it.
@Saint: hmm, you can try this, it will save at least some of the queries if you have more posts of the same user on one page:
change the postbit code to this:
PHP Code:
if ($post[award]=="1")
{
if(isempyt($awardresultcache[$post['userid']]) $awardresultcache[$post['userid']]=$DB_site->query("SELECT * FROM useraward WHERE userid='$post[userid]' AND awardsid=aw ");
while ($awardsp=$DB_site->fetch_array($awardresultcache[$post['userid']]))
{
eval("\$post[hasaward] .= \"".gettemplate("awards")."\";");
}
}
then in getpostbitfunction after
PHP Code:
global $bbuserinfo,$session,$ignore,$cookietimeout;