Quote:
Originally Posted by Jaxx
Thanks a bunch.
I very pleased with it, you did a great job on it.
Is there any chance of getting some type of mod that would count the replies to a news article and put (# comments) next to it?
|
Easy enough. Open the provided newsdigest.php file. Find this code (It's almost at the start):
PHP Code:
SELECT thread.threadid,
IMMEDIATELY AFTER INSERT
The query should read like this after you're done
PHP Code:
SELECT thread.threadid, replycount, postusername, postuserid,
and so on.
Doing that captures the reply count. You can now slip it into the news item by putting $news[replycount] into the template. For example, change the adv_portal_newsdigest_item template to:
HTML Code:
<div align="justify">$news[message] - submitted by $news[postusername]. <a href="showthread.php?t=$news[threadid]">Comments: $news[replycount]</a></div>