Run this query:
[sql]ALTER TABLE `forum` CHANGE `views` `view` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL[/sql]
Open file ./includes/functions_forumlist.php
Find:
PHP Code:
$forumfields = 'forum.forumid, views, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount';
Replace with:
PHP Code:
$forumfields = 'forum.forumid, view, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount';
Save up.
Open forumdisplay.php
Find:
PHP Code:
// ############################### Forum counter by AnhTuanCool ###############################
if ($vboptions['forumviewslive'])
{
// doing it as they happen
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "forum
SET views = views + 1
WHERE forumid = " . intval($foruminfo['forumid'])
);
}
else
{
// or doing it once an hour
$DB_site->shutdown_query("
INSERT INTO " . TABLE_PREFIX . "views (forumid)
VALUES (" . intval($foruminfo['forumid']) . ')'
);
}
Replace with:
PHP Code:
// ############################### Forum counter by AnhTuanCool ###############################
if ($vboptions['forumviewslive'])
{
// doing it as they happen
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "forum
SET view = view + 1
WHERE forumid = " . intval($foruminfo['forumid'])
);
}
else
{
// or doing it once an hour
$DB_site->shutdown_query("
INSERT INTO " . TABLE_PREFIX . "view (forumid)
VALUES (" . intval($foruminfo['forumid']) . ')'
);
}
Save up
Open template forumhome_forumbit_level2_post
Find
Replace with:
Save up and problem solved