News News
News News
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.
Former programmer for the TMWA server.
Re: News News
Small random suggestion: https://github.com/mojombo/jekyll
- Freeyorp101
- Archivist Prime
- Posts: 765
- Joined: 04 Nov 2008, 09:17
- Location: New Zealand
Re: News News
It's [already served], and has to be in order for the client to be able to fetch it.o11c wrote:* 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
---Freeyorp
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
Re: News News
Yes. It should not be too hard to build up this file from single files (once per entry) and generate this news.txt + the website news from it.
Re: News News
Yeah, but that's the client news in text format, not the main page news in html format.Freeyorp101 wrote:It's [already served], and has to be in order for the client to be able to fetch it.
Former programmer for the TMWA server.
Re: News News
PHP is not an awful language, it is a tool like any other which can be used good or bad.
Try programming on a mainframe, that is a real pain
Now get off my lawn!
Try programming on a mainframe, that is a real pain
Now get off my lawn!
Re: News News
PHP serves a purpose.Matt wrote:Try programming on a mainframe, that is a real pain
Now get off my lawn!
I once tried to write a line-oriented text editor in FORTRAN77. That...was not successful.
You earn respect by how you live, not by what you demand.
-unknown
-unknown
Re: News News
It is an awful language. That's why it should be avoided for any new projects.Matt wrote:PHP is not an awful language
But for a professional software developer, that is not a reason to refuse to maintain existing PHP applications when it is needed. When people would have the same attitude towards other widely-used and widely-loathed legacy languages like COBOL, the world would sink into chaos.
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Re: News News
What is the status of this?
I picked up on the homepage and want to improve it. Maybe with more news than there are on the server. I also started to edit some of the pages and make some things more user friendly.
About the news I'm a little bit puzzled as it seems no one updates it and just some know how to :/.
Could you enlighten me on that and maybe let me in on the secrets ?
I picked up on the homepage and want to improve it. Maybe with more news than there are on the server. I also started to edit some of the pages and make some things more user friendly.
About the news I'm a little bit puzzled as it seems no one updates it and just some know how to :/.
Could you enlighten me on that and maybe let me in on the secrets ?
Re: News News
Nice IdeaAblu wrote:Small random suggestion: https://github.com/mojombo/jekyll
"The language of everyday life is clogged with sentiment, and the science of human nature has not advanced so far that we can describe individual sentiment in a clear way." Lancelot Hogben, Mathematics for the Million.
“There are two motives for reading a book; one, that you enjoy it; the other, that you can boast about it.” Bertrand Russell, Conquest of Happiness.
"If you optimize everything, you will always be unhappy." Donald Knuth.
“There are two motives for reading a book; one, that you enjoy it; the other, that you can boast about it.” Bertrand Russell, Conquest of Happiness.
"If you optimize everything, you will always be unhappy." Donald Knuth.
Re: News News
I think I know what I'll do, now - php include a cron-cached plain html file (since all html is also php).
One static site generator is no better or worse than another. Well, it could be, but there's the cost of learning something if I'm only going to use it once.
One static site generator is no better or worse than another. Well, it could be, but there's the cost of learning something if I'm only going to use it once.
Former programmer for the TMWA server.