• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[patch] Fix HTML tables

adakraz

New Member
Joined
Aug 16, 2010
Messages
7
Reaction score
0
The following patch changes HTML table rendering in views:
- changes '<td><center><b>T</b></center></td>' nonsense to nice '<th>T</th>' in headers (the most important change, allows table theming)
- changes all '<centers>' in tables to ' style="text-align: center;"', in some places removing them entirely ('center' is a deprecated HTML element)
- changes ' width="X%" to ' style="width:X%"' (same as above)
- splits some gigantic php code lines in table views. (self explanatory)

I tested everything the patch touches except "fragers" subpage and guilds joining (couldn't figure out how to setup it). Everything else looks good.
Also, magiclevel highscores don't work, but it is independent of the patch.

View attachment modern.patch.txt
 
Thanks. You just read my mind. :)

I'll implant it in the dev source for testing.

EDIT: Patch invalidated, wrong line ending?
 
It applied to like 4-5 files. Not all of them.
The second one was made with
Code:
LANG=en_US svn diff system/pages/ system/application/views/ >~/otserv/modern2.patch.txt
Maybe it could be done better, but I don't know how.

I can apply it to a freshly downloaded svn checkout with:
Code:
[b]cd trunk/system[/b]
patch -p1 </path/to/modern2.patch.txt
 
Back
Top