Okay I had to delete a bunca of messages from a forum, but later wanted to show the messages total as the one before the deletions.
From the SMF forum, I found out that if I add:
$context['num_posts'] += 20000;
where 20000 is the number of posts I want to be added to what it currently shows, then I get the correct one.
However, when I look at the TP Stats block on the left menu, I see that the number is updated only when I got to the Stats page. On any other page, I see the old number of posts.
Could anyone help me tweak TP Stats block to show the updated one on each page?
Im not sure how to do that, i think the number of posts are fetched from the DB, but you can chek the Tportalblocks.php in the sources directory and see if and what the calls for the members could be for TP
yup theoritically u can add it as a mathematical function to the Tportalblocks.php where the stats block is defined
hmm...cheating? :P
Quote from: khoking on March 04, 2007, 12:50:47 PM
hmm...cheating? :P
No because my Monthly Summary shows the correct statistics. I'm jst trying to make the forum total match that.
There's two ways that you can do this.
The first way is to go into the database itself (via phpMyAdmin, or however else you access your database) and find the smf_settings table. Look for totalMessages in the "variable" column. Edit the record and add 20000 to the value in the "value" column.
The second way is to open Load.php (in your Sources directory). After
while ($row = mysql_fetch_row($request))
$modSettings[$row[0]] = $row[1];
mysql_free_result($request);
add
$modSettings['totalMessages'] += 20000;
Either way, you'll want to remove the code you added in Stats.php.
Thank you very much. :)
I had already tried the first method you mentioned, that does not work for me as after some period of time, the statistics go back to the old one.
But the second method has worked. :)
Glad to see you sorted it out in the end :)
Please post the answer on SMF in your post there to, it can be good for them to know to if some one else wants the same thing some time :)
Quoteafter some period of time, the statistics go back to the old one.
Ah. The script must recount the number of posts from time to time. Good to know.
Glad I was able to help. :)