News News
Posted: 23 Oct 2012, 19:19
I've been working on a system to generate news.txt and the front page of http://themanaworld.org from the same source.
I have an implementation that works for news.txt (why is news.txt in the subdirectory instead of the root?), but I'm having some problems with the front page half.
Currently, the front page is generated by a php script that parses an RSS feed. (Note: something is funky with the sourceforge RSS feed right now )
I tried to generate a fake RSS feed to feed to it, but apparently it wasn't a good enough emulation.
The alternative is to generate some sort of html directly, but that would require changing the PHP, and I don't want to have anything to do with that awful language.
The second problem with the website news is that the main page is served by the tmw account, whereas the game server (and thus, the pulled news) is on the eathena account. Platinum is set up with $HOME 700 and per-user httpd.
It seems kind of stupid - but not as far as I can tell, insecure - to +x /home/eathena for one file. The alternatives are:
* put the file somewhere eathena can write to, that is *outside* of $HOME, that tmw can read. This would require copying it *out* of the repository after pull, which could be done by a post-merge hook
* serve the news through eathena's webserver, fetched by tmw to generate the main page. This could be done on every request, or by a cronjob cache
* serve the news through eathena's webserver, and instruct the client to include it via an iframe or something.
I have an implementation that works for news.txt (why is news.txt in the subdirectory instead of the root?), but I'm having some problems with the front page half.
Currently, the front page is generated by a php script that parses an RSS feed. (Note: something is funky with the sourceforge RSS feed right now )
I tried to generate a fake RSS feed to feed to it, but apparently it wasn't a good enough emulation.
The alternative is to generate some sort of html directly, but that would require changing the PHP, and I don't want to have anything to do with that awful language.
The second problem with the website news is that the main page is served by the tmw account, whereas the game server (and thus, the pulled news) is on the eathena account. Platinum is set up with $HOME 700 and per-user httpd.
It seems kind of stupid - but not as far as I can tell, insecure - to +x /home/eathena for one file. The alternatives are:
* put the file somewhere eathena can write to, that is *outside* of $HOME, that tmw can read. This would require copying it *out* of the repository after pull, which could be done by a post-merge hook
* serve the news through eathena's webserver, fetched by tmw to generate the main page. This could be done on every request, or by a cronjob cache
* serve the news through eathena's webserver, and instruct the client to include it via an iframe or something.