Quote:
Originally posted by ExAvIoUr
Roody (and any else who doesn't want to read through) ... in a good mood today, so I compiled the optimizations from the posts here and here it is:
:::Since Your Last Visit:::
*** optimized per the suggestions of the posts here. I also changed the text to display "There are X new thread and X new posts! ... simply b/c the other way made it seemed crowded up top. change it to whatever you'd like. 
Run this query on your DB:
Code:
ALTER TABLE `post` ADD INDEX(`dateline`) ;
Edit: "index.php"
Find:
Code:
// if user is know, then welcome
Add below it:
Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE dateline > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
Edit Template: /Forum Home Page Templates/"forumhome_welcometext"
Find:
Code:
Welcome back, <b>$bbuserinfo[username]</b>
Add below it:
Code:
<br>There are <b>$getnewthread[threads]</b> new threads and <b>$getnewpost[posts]</b> new posts!
|
hi, this does speed things up, but when i mark all forums read or when i log out, and log back in, it still displays new threads.
hidjra