2010-12-11, 20:19:11
(This post was last modified: 2010-12-11, 20:19:49 by jorgerembu.)
Hello, first of all thanks for this great plugin. On a sidenote I would like to point out that the krsort performed at the end of the get_articles() function is actually the wrong one.
The function I use looks as follows
Also it would be easy to add a parameter to only select and return the most recent entries.
The function I use looks as follows
Code:
function get_articles() {
$articles = array();
$files = getFiles(GSDATANEWSPATH);
foreach ($files as $file) {
if (is_file(GSDATANEWSPATH . $file) && preg_match("/.xml$/", $file)) {
$articles[] = $file;
}
}
sort($articles);
return array_reverse($articles);
}
Also it would be easy to add a parameter to only select and return the most recent entries.