Version: , by tubedogg
Developer Last Online: Dec 2016
Version: 2.2.x
Rating:
Released: 03-22-2001
Last Update: Never
Installs: 70
No support by the author.
This one is a request from JJR512. It shows, in the user's publicly-accesible profile (member.php?action=getinfo), how many threads that user has started.
Hack version: 0.0.2
For version: 2.0.0 Final
Files needed: memberadd.txt, getinfoadd.txt
Files to edit: member.php
Templates to edit: getinfo
Instructions
1] Open memberadd.txt from the zip file in a text editor.
I ran the query as above, and it said 1. I tried it withouth the final AND open!='10' as I tried in the member.php as I said above, and it said 2.
BTW, I've requested an authorization from your ICQ number, but it looks like you're not connected. If you think that would be easier and faster, we could work on this by ICQ. My # is 52675695
bira...check your database. Check the thread table, and look specifically at the postuserid fields. Most of mine were set to 0. (The postusername fields are fine, which is why I think I didn't notice any problems where it is supposed to say who started the thread.)
I think the problem seems to come from updating counters, specifically update forums info. I did this while I was looking at the table, and afterwards, most of the postuserid that wasn't already 0 now was.
tubedogg, I finally got my db backed up, so I tried that script you sent. I got this error message:
Quote:
Warning: Supplied argument is not a valid MySQL result resource in /home/jjr512/jjr512-www/forums/admin/updatepostuserid.php on line 3
Done updating users
Originally posted by JJR512 bira...check your database. Check the thread table, and look specifically at the postuserid fields. Most of mine were set to 0. (The postusername fields are fine, which is why I think I didn't notice any problems where it is supposed to say who started the thread.)
I think the problem seems to come from updating counters, specifically update forums info. I did this while I was looking at the table, and afterwards, most of the postuserid that wasn't already 0 now was.
tubedogg, I'm back on ICQ.
Yep, you're right.
OK, so I changed the query in members.php to
Code:
SELECT COUNT(title) AS starts FROM thread WHERE postusername='$userinfo[username]' AND open!='10'
And it works fine.
I'm curious to know why the update counters change the postuserid column to 0 though...
I'm looking at the update thread thing. I can see where it would edit the postuserid, but why it changes them all to 0 is another story. I have posted a note in the bug reports forum.
For all you that can't get this to work, change the query to what bira has posted. I also posted the correct code in the first post in this thread.
By the way ive just installed it in RC2 and works great.
Those of you who use this may be interested in a script i just wrote using the info i learned from installing this hack.
Its similar but shows when the user was last online.
I've updated the files to reflect the fact that it works in v2.0.0 and made a cosmetic change so the words "Threads Started" are capitalized and have a colon after them to match the other fields in getinfo. No need to change or upgrade if you have this successfully working.
Heya! I installed this hack, but can I request an modification? It would be cool if the threads started are placed below the "posts:" in the postbit template.
Thnx