For an excellent guide to using your myfreeforum forum, you can visit howtodoit
The howtodoit "readonly" forum provides answers and walkthroughs for all common questions.
This one requires a little archeology. We are running non standard code to clear out old search results, and I can't quite fathom why at the minute.
But the principle here is that every search on a phpbb2 forum does the work of clearing down old results. This in entirely unnecessary. Sure it needs doing, but not on every search.
That change went in yesterday, todays change replaces a query:
Code:
$sql = "SELECT COUNT(user_id) AS total
FROM " . USERS_TABLE
WHERE user_id <> " . ANONYMOUS . ";
break;
with:
Code:
$sql = "SELECT COUNT(user_id) AS total
FROM " . USERS_TABLE;
break;
Since there is only ever one user with the ANONYMOUS id, we really don't need to run a straight forward row count into something that makes the database have to do any work, even if the work is minimal given the way the index will operate. _________________ Family Friendly Shareware | | Web Design/Services | Free Forums
Continuing the hunt for poor database queries in some instances a user may visit a forum link having presumably just registered, at any rate with their user_lastvisit at zero.
Code:
$sql = "SELECT t.forum_id, t.topic_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['user_lastvisit'] . "
AND t.topic_moved_id = 0";
to determine new topics can then take an age to complete
Many moons ago I fixed a similar absurdity on the index page, and I have now added this :
Code:
// 60 days limit
if ($userdata['user_lastvisit'] < (time() - 5184000))
{
$userdata['user_lastvisit'] = time() - 5184000;
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum