Though I'm sure check on "Show number views" on article section but in my article it's not show correct, it still '0 views' even not ...
I'm used TP 0.98 revision 2 ,smf 1.1.2 :)
see at my site: http://www.cgezine.com
This problem is present in curent version of Tp as well ...
Sorry, you're going to have to elaborate a little. I have no idea what "show number views" is.
Ok, see number of views on article, its marked red
http://www.farmaceuti.com/forum/page.516/
Open TPortal.php and find this section:
// update views
$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}tp_articles
SET views = views + 1
WHERE ' , is_numeric($page) ? '{int:page}' : '{string:page}' , ' LIMIT 1',
array('page' => $pag)
);
Replace that code with this:
// update views
$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}tp_articles
SET views = views + 1
WHERE ' . (is_numeric($page) ? '{int:page}' : '{string:page}') . ' LIMIT 1',
array('page' => $page)
);
In the future if you wouldn't mind starting your own topic and linking to anything you find related that would be appreciated. Instead of bringing a 2007 topic back from the dead. :)
It still doesn't count new views and do not show it.
Oops, change this line:
WHERE ' . (is_numeric($page) ? '{int:page}' : '{string:page}') . ' LIMIT 1',
To this:
WHERE ' . (is_numeric($page) ? 'id = {int:page}' : 'shortname = {string:page}') . ' LIMIT 1',
Now it's ok.
Thanks.
:)