News News

Web discussions, including project website, forums, wiki, and others.


Post Reply
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

News News

Post 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.
Former programmer for the TMWA server.
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: News News

Post by Ablu »

Small random suggestion: https://github.com/mojombo/jekyll
User avatar
Freeyorp101
Archivist Prime
Archivist Prime
Posts: 765
Joined: 04 Nov 2008, 09:17
Location: New Zealand

Re: News News

Post 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
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: News News

Post 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.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: News News

Post 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.
Former programmer for the TMWA server.
Matt
Grand Knight
Grand Knight
Posts: 1759
Joined: 07 Aug 2004, 10:47
Location: Germany->Bavaria

Re: News News

Post 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!
Frost
TMW Adviser
TMW Adviser
Posts: 851
Joined: 09 Sep 2010, 06:20
Location: California, USA

Re: News News

Post 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:
You earn respect by how you live, not by what you demand.
-unknown
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: News News

Post 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.
  • 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.
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: News News

Post 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 ;)?
User avatar
Nard
Knight
Knight
Posts: 1113
Joined: 27 Jun 2010, 12:45
Location: France, near Paris

Re: News News

Post by Nard »

Ablu wrote:Small random suggestion: https://github.com/mojombo/jekyll
Nice Idea :)
"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.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: News News

Post 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.
Former programmer for the TMWA server.
Post Reply