PDA

View Full Version : Wiki cleric page


sereal
11-19-2017, 12:13 AM
Dunno where to post this, so apologies ahead of time -

On: https://wiki.project1999.com/index.php?title=Cleric&action=edit

In spells, some levels are missing the <tr> tag for the first element.


==Level 50==
<table cellpadding='5' cellborder='0' cellspacing='0' width='92%'>
<tr bgcolor="#cccccc"><td width='22%' valign='top'><b>Spell Name</b></td><td width='52%' class='spti' valign='top'><b>Spell Description</b></td><td width='5%' class='spti' valign='top'><b>Era</b></td><td width='5%' class='spti' valign='top'><b>Class</b></td><td width='8%' class='spti' valign='top'><b>Location</b></td><td width='5%' class='spti' valign='top'><b>Mana</b></td></tr>
<td width='22%'>[[Improved Invis to Undead]]</td><td width='52%'>Self-only invisibility to undead (fixed duration)</td><td width='5%'>Vel.</td><td width='5%'>Abj.</td><td width='8%'>NPC Drop.</td><td width='5%'>75</td>
</table>




Others are fine.


==Level 49==
<table cellpadding='5' cellborder='0' cellspacing='0' width='92%'>
<tr bgcolor="#cccccc"><td width='22%' valign='top'><b>Spell Name</b></td><td width='52%' class='spti' valign='top'><b>Spell Description</b></td><td width='5%' class='spti' valign='top'><b>Era</b></td><td width='5%' class='spti' valign='top'><b>Class</b></td><td width='8%' class='spti' valign='top'><b>Location</b></td><td width='5%' class='spti' valign='top'><b>Mana</b></td></tr>
<tr><td width='22%'>[[Abolish Poison]]</td><td width='52%'>Removes poison effects</td><td width='5%'>&nbsp;</td><td width='5%'>Alt.</td><td width='8%'>Vendor.</td><td width='5%'>100</td></tr>


I don't know if this is true of all classes or not. https://validator.w3.org might help if you can get it to be quiet about CSS errors.

paulgiamatti
11-19-2017, 12:22 PM
That might be my fault - I redid that spell list a couple years back because it was an absolute mess. In any case: https://wiki.project1999.com/Template:Disclaimer

loramin
11-19-2017, 02:21 PM
I created a new "SpellRow" template, then applied it to the whole Cleric spell page. This should make everything have uniform HTML (no missing TRs), plus it will be easier to edit spell lists (not like that happens much anymore). As an added bonus, once I apply the template to all of the other classes it makes the possibility of switching to an improved style (eg. http://wiki.project1999.com/Bard/Songs) a lot easier.

If anyone out there wants to help and knows regular expressions (all I did to "upgrade" the Cleric page was use a regex-based find/replace) here are the basic regexs I used (although I had to tweak and re-run them a few times to handle slight variations):

Find:
\w*(?:<tr.*?>)<td width='22%'>\[\[(.*?)\]\]</td><td width='52%'>(.*?)</td><td width='5%'>(?:&nbsp;)</td><td width='5%'>(.*?)</td><td width='8%'>(.*?)</td><td width='5%'>(.*?)</td></tr>
<td width='22%'>\[\[(.*?)\]\]</td><td width='52%'>(.*?)</td><td width='5%'>(?:&nbsp;)</td><td width='5%'>(.*?)</td><td width='8%'>(.*?)</td><td width='5%'>(.*?)</td>(?:</tr>)

Replace:
{{SpellRow
|name=$1
|description=$2
|era=$3
|school=$4
|location=$5
|mana=$6
}}

If there are no brave souls I'll try to do the rest of the pages when I have time (and after that I'll start trying to switch to the improved style).