News about news about news
Posted: 24 Jan 2013, 17:12
I finally implemented unified news generation for the game and the front page.
From now on, to news entry, copy the template in world/map/news.d to a filed named ##-shortdescription.txt, then run 'make news'. The ## should increment; it will be automatically displayed in reverse order. I started the in-game news about news entry as 10, so that the 00-old-news.txt can be expanded into multiple entries properly (currently it's all dumped in one file as if it's a single entry); future news should start at 11.
I also edited news.php to change the minimum client version and reject all TMW-based clients, I've also set up a can't-happen-yet infrastructure for rejecting less than Mana/0.5.0 - which we can easily change once we decided to drop support for 0.5. Note that 0.5.1 is the one that will finally allow us to use CSV maps ... Since ManaPlus sends a more complicated version string, I haven't implemented any out-of-date checking for it.
Note that:
From now on, to news entry, copy the template in world/map/news.d to a filed named ##-shortdescription.txt, then run 'make news'. The ## should increment; it will be automatically displayed in reverse order. I started the in-game news about news entry as 10, so that the 00-old-news.txt can be expanded into multiple entries properly (currently it's all dumped in one file as if it's a single entry); future news should start at 11.
I also edited news.php to change the minimum client version and reject all TMW-based clients, I've also set up a can't-happen-yet infrastructure for rejecting less than Mana/0.5.0 - which we can easily change once we decided to drop support for 0.5. Note that 0.5.1 is the one that will finally allow us to use CSV maps ... Since ManaPlus sends a more complicated version string, I haven't implemented any out-of-date checking for it.
Note that:
- I can't actually pull this onto the web server account until the next game data update.
- The HTML file actually served from updates.themanaworld.org/news.html does not include <html> or <body> tags.
- This requires a request via http to the same physical machine. This could probably be improved by using a cron cache.
- The ManaPlus client is still buggy and refuses to display a blank line in news.txt, so I have to put trailing whitespace. I put a .gitattributes file to silence the warning, but it should still be fixed.
- Some of the old news entries display suboptimally in html mode because they don't put a blank line between paragraphs.
- I've probably forgotten something.