@ECNet

I looked at your "Who's Online" page, and noticed your site is getting seriously spidered.

Every time a post is viewed, a line is written to the TOPIC_VIEWS table. The only time that table is ever flushed in UBB.threads 7.5.x is when a new post is created. The TOPIC_VIEWS table can easily hit 1,000 lines every few minutes.

This normally shouldnt be a problem if you have an active forum. But for many of us who've had forums for a very long time, and are now using our forums as a CMS for all the important information thats been created over the years, a new topic/post can be days away. Heck, we've talked about everything already -- and the questions have already all been answered. So the forum is basically a gold mine of answers and information.

Anyways, adding an additional trigger to process the TOPIC_VIEWS table is just whats needed for us. This will handle the job every time someone visits the Login page. It processes the TOPIC_VIEWS and updates the view count within the TOPICS table, then purges and gives you a fresh TOPIC_VIEWS record to work with. This is the normal procedure for when a new post is added. I've just updated the code so that the procedure is also triggered with each Login page visit.

This should help to keep the TOPIC_VIEWS table from getting out of hand, by allowing it to be processed more often.

This update has been added to UBB.threads 7.6.0, but I am posting here, because it sounds like you (and others) might need it now.

Cheers! laugh

FIND IN /scripts/login.inc.php (around line 27)
Code
	// TRIGGER: pointer_delete
	include("libs/triggers.inc.php");
	trigger_pointer_delete();
	trigger_subscriptions();

ADD JUST BELOW IT
Code
	// TRIGGER: Update the views
	update_views_counter();


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com