News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

No page views?

Started by solitario, November 18, 2004, 01:21:05 AM

Previous topic - Next topic

solitario

Hello all.
How do I get rid of page views?
I have removed all outward appearances of page views. But I'm wondering if anyone can tell me how to find and change the SQL code so the forum will not bother with it.
Thanks

andrea

This can be altered in your template settings. For help getting started to create own templates and howto modify them -> read first the sticky topics in the Graphics/Templates board before asking questions.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



[Unknown]

If you want to reduce load on the server, this is probably a good idea.  To do it is simple, luckily ;).  In Sources/Display.php, find this and simply remove it:

db_query("
UPDATE {$db_prefix}topics
SET numViews = numViews + 1
WHERE ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);


If you don't show views, this is actually a very good thing to do, because the above query is one of the worst in terms of bogging down MyISAM tables :/.  There's not much to do about it, but if you don't need it calculated by all means take it out ;).

-[Unknown]

solitario


Advertisement: