Instructions1. copy the adjacent php code into a standalone php file anywhere in your webspace. Change the variables in class Vars.
2. right at the bottom you'll find some perl. Copy into gm.cgi near the top immediately after the line: The RSS files will now be rebuilt every time you run gm.cgi, eg when you add an entry to your Blog or run Rebuild |
Convert Greymatter to RSS 2.0 and Atom 1.0 feeds
<?php
var $title = "title of your feed";
}
$vars = new Vars;
$lines = explode("|", $an_entry);
/* build name of archive htm file for this entry: needed for link tag in xml file eg 00000001.htm */
}
} // end loop
}
function writeRSS2Feed($entries)
$vars = new Vars;
fwrite ($fh, "<item>\n");
if ( substr($entry['time'],0,2) < 12)
}
}
}
$vars = new Vars;
fwrite ($fh, "<entry>\n");
}
}
/* break at end of last full word */
}
$stringmonth = array("filler", "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
}
Convert Greymatter to RSS 2.0 and Atom 1.0 feeds: code for gm.cgiprint <<EOF; |