html-code in the news:
look for...
PHP Code:
$newstext=bbcodeparse($getnews[pagetext]);
replace with..
PHP Code:
$newstext=bbcodeparse($getnews[pagetext],$newsforum,1);
$newstext=str_replace("<br />","",$newstext);
Thanks to nakkid, Gimp and FireFly for drawing attention to me on this.
2 new actions (getdaily and getsticky!) and threads-table-title depends on the action!
look for...
PHP Code:
if ($action=="" or $action=="getactive") {
// active threads
$threadsquery = $DB_site->query("SELECT threadid,forumid,title,postusername,lastposter,replycount,iconid FROM thread WHERE forumid!=$newsforum AND forumid!=$pollsforum ".$threadsql." AND visible=1 order by lastpost desc limit $numthreads");
}
if ($action == "getnew") {
// new posts
$threadsquery = $DB_site->query("select threadid,forumid,title,postusername,lastposter,replycount,iconid from thread WHERE visible=1 AND lastpost>=".$bbuserinfo[lastvisit]." AND open<>10 ".$threadsql." order by lastpost desc limit $numthreads");
}
replace with...
PHP Code:
if ($action=="" or $action=="getactive") {
// active threads
$threadsquery = $DB_site->query("SELECT threadid,forumid,title,postusername,lastposter,replycount,iconid FROM thread WHERE forumid!=$newsforum AND forumid!=$pollsforum ".$threadsql." AND visible=1 order by lastpost desc limit $numthreads");
$threadstitle="Latest Threads";
}
if ($action == "getnew") {
// new posts
$threadsquery = $DB_site->query("select threadid,forumid,title,postusername,lastposter,replycount,iconid from thread WHERE visible=1 AND lastpost>=".$bbuserinfo[lastvisit]." AND open<>10 ".$threadsql." order by lastpost desc limit $numthreads");
$threadstitle="Newest Posts";
}
if ($action == "getdaily") {
// posts today
$threadsquery = $DB_site->query("select threadid,forumid,title,postusername,lastposter,replycount,iconid from thread WHERE visible=1 AND thread.lastpost>=".(time() - (24 * 60 *60 * $days)).$threadsql." order by lastpost desc limit $numthreads");
$threadstitle="Posts Today";
}
if ($action == "getsticky") {
// sticky threads
$threadsquery = $DB_site->query("select threadid,forumid,title,postusername,lastposter,replycount,iconid from thread WHERE visible=1 AND sticky=1 ".$threadsql." order by lastpost desc limit $numthreads");
$threadstitle="Sticky Threads";
}
now modify the template "home_threads":
- 2 new options (select)
- replace "Latest Threads" (title) with $threadstitle
that's it. all these improvements will be included in version 1.4.
pls write me all suggestions and ideas how we all can improve this script

.