Hi David,
Just wondered if you could possibly tell me if there are any existing feed filters which I could use to sort the words in a field in alphabetical order? I searched the forum but couldn’t spot anything.
Thanks in advance.
Best regards
Chris
Hi David,
Thank you for the above filter which works perfectly.
Best regards
Chris
Hi Chris,
Not as yet but to add a "Sort" filter, add the following code to includes/filter.php
/*************************************************/
/* Sort */
/*************************************************/
$filter_names["sort"] = "Sort";
function filter_sortConfigure($filter_data)
{
print "<p>There are no additional configuration parameters for this filter.</p>";
}
function filter_sortValidate($filter_data)
{
}
function filter_sortExec($filter_data,$text)
{
$words = explode(" ",$text);
asort($words);
return implode(" ",$words);
}
Hope this helps!
Cheers,
David.
--
PriceTapestry.com