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

Home » FUDforum » FUDforum Suggestions » rdf.php accept multiple cat arguments
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 13:03 Go to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 13: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
add to buddy list
ignore all messages by this user
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 13:57 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 14: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
add to buddy list
ignore all messages by this user
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 14:06 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 18:00 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 18:09 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Thanks, fixed.

FUDforum Core Developer
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Tue Oct 24 01:57:42 EDT 2017

Total time taken to generate the page: 0.00643 seconds