Page 1 of 1

News News

Posted: 23 Oct 2012, 19:19
by o11c
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.

Re: News News

Posted: 24 Oct 2012, 18:14
by Ablu
Small random suggestion: https://github.com/mojombo/jekyll

Re: News News

Posted: 25 Oct 2012, 00:57
by Freeyorp101
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
It's [already served], and has to be in order for the client to be able to fetch it.


---Freeyorp

Re: News News

Posted: 25 Oct 2012, 04:43
by Ablu
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

Posted: 25 Oct 2012, 19:46
by o11c
Freeyorp101 wrote:It's [already served], and has to be in order for the client to be able to fetch it.
Yeah, but that's the client news in text format, not the main page news in html format.

Re: News News

Posted: 25 Oct 2012, 20:39
by Matt
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 :roll:

Now get off my lawn!

Re: News News

Posted: 25 Oct 2012, 20:47
by Frost
Matt wrote:Try programming on a mainframe, that is a real pain :roll:

Now get off my lawn!
PHP serves a purpose.
I once tried to write a line-oriented text editor in FORTRAN77. That...was not successful. :lol:

Re: News News

Posted: 26 Oct 2012, 12:27
by Crush
Matt wrote:PHP is not an awful language
It is an awful language. That's why it should be avoided for any new projects.

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.

Re: News News

Posted: 14 Nov 2012, 15:24
by tux9th
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 ;)?

Re: News News

Posted: 14 Nov 2012, 15:34
by Nard
Ablu wrote:Small random suggestion: https://github.com/mojombo/jekyll
Nice Idea :)

Re: News News

Posted: 14 Nov 2012, 21:43
by o11c
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.