PDA

View Full Version : getnew but restricted to certain forums?


The Geek
03-15-2007, 02:15 PM
Hey guys!

I was wondering if anyone knew how to add a navbar link to allow users to choose between new posts on the entire site or to limit to certain forums?

I know how to do all the navbar stuff - but I was curious about the other bit? I'm looking to add an option of new professional posts and all new posts. The former limiting to a set of pre defined forums.

Thanks!

Brad
03-15-2007, 02:22 PM
Easy way to do this would be to pass a list of forum ids in the url.

You can use this to exclude forums from the search;

http://www.forum.com/search.php?do=getnew&exclude=1

This will pull posts only from forums you specify;

http://www.forum.com/search.php?do=getnew&include=1

You can pass multiple ids at once, like so;

http://www.forum.com/search.php?do=getnew&exclude=1,2,3,4,5
http://www.forum.com/search.php?do=getnew&include=1,2,3,4,5

This also works with getdaily. :)

The Geek
03-15-2007, 02:49 PM
You are a freaking genius Brad. Thanks for that!

Brad
03-15-2007, 02:55 PM
Ah thank you. It's about time someone noticed. ;)