-function shownewsarticle($url, $link = TRUE, $title = NULL)
-{
- $html = ob_get_clean();
- $date = shownewsdate($url);
- ob_start();
- print $title ?: '\1';
- print '[[1]]';
+ function file()
+ {
+ return fopen($this->page, 'r');
+ }
+
+ function title()
+ {
+ return preg_replace('{<h2>(.*)</h2>\s*}', '\1', fgets($this->file));
+ }
+
+ function safetitle()
+ {
+ return strip_tags($this->title);
+ }
+
+ function date()
+ {
+ if (!preg_match('</(\d{4})/(\d{2})-(\d{2})->', $this->page, $parts)) return;
+ return showdate($parts);
+ }