FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » rdf.php accept multiple cat arguments
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
rdf.php accept multiple cat arguments [message #16401] Wed, 28 January 2004 18:03 Go to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
Hi Ilia!

Well, I can say one thing for sure, the RDF feed is awesome. Instead of using some of the more complicated hacks for getting a list of recent messages/topics on my site's main page, I am simply parsing the RDF feed, and it works great!

Now that I have flattered you, on to the suggestion: Very Happy

I have a category in my forums that just holds mailing list mirrors, and I do not want to list any posts from those forums on my main page, just posts to the other two categories.

Now, from the looks of things this is the handler for category:

if (isset($_GET['cat'])) {
                                $lmt .= ' AND f.cat_id ='.(int)$_GET['cat'];
                        }


Now it seems to me that if you changed the equals sign to an IN() clause the user could pass a comma-seperated list of categories and you would probably get the same end result, but allow for more than one category to be specified.

What do you think?
Re: rdf.php accept multiple cat arguments [message #16405 is a reply to message #16401] Wed, 28 January 2004 18:51 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Added in CVS.

FUDforum Core Developer
Re: rdf.php accept multiple cat arguments [message #16406 is a reply to message #16401] Wed, 28 January 2004 18:57 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
Awesome, how long do you think it will be until we see 2.6.1?
Re: rdf.php accept multiple cat arguments [message #16407 is a reply to message #16406] Wed, 28 January 2004 19:01 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Depends on how much time I have avaliable to add all of the functionality.

FUDforum Core Developer
Re: rdf.php accept multiple cat arguments [message #16408 is a reply to message #16401] Wed, 28 January 2004 19:06 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
I swear we need a grant program in Canada to Open Source developers can just code all day.
Re: rdf.php accept multiple cat arguments [message #16412 is a reply to message #16401] Wed, 28 January 2004 23:00 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
Error in CVS:

function multi_id($data)
{
	$list = explode(',', $data);
	$out = array();
	foreach ($data as $v) {
		$out[] = (int) $v;
	}
	return implode(',', $out);
}


Foreach references original argument and not $list. Should be:

function multi_id($data)
{
	$list = explode(',', $data);
	$out = array();
	foreach ($list as $v) {
		$out[] = (int) $v;
	}
	return implode(',', $out);
}
Re: rdf.php accept multiple cat arguments [message #16413 is a reply to message #16412] Wed, 28 January 2004 23:09 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Thanks, fixed.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: User list in admin panel
Next Topic: Multiple topic hits in RDF feed
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 09:43:11 GMT 2024

Total time taken to generate the page: 0.02134 seconds