Difference between revisions of "Template:PetRanking"

From NeoDex
Jump to navigation Jump to search
(added vandagyre (and krawk, which was missing as well for some reason). Removed default text)
m (updated vandagyre)
Line 53: Line 53:
| Lutari = 85,726 (52<sup>th</sup> - 0.03%)
| Lutari = 85,726 (52<sup>th</sup> - 0.03%)
| Draik = 39,532 (53<sup>th</sup> - 0.01%)
| Draik = 39,532 (53<sup>th</sup> - 0.01%)
| Vandagyre = 3,165 (54<sup>th</sup> - 0.00%)
| Vandagyre = 8,470 (54<sup>th</sup> - 0.00%)
| Krawk = 2,507 (55<sup>th</sup> - 0.00%)
| Krawk = 2,507 (55<sup>th</sup> - 0.00%)
| #default =  
| #default =  

Revision as of 17:04, 15 November 2014

Instructions to update the list

If you want to update this list yourself quickly, follow these instructions, otherwise it'll be slow to update each one manually, especially if they change places.

1. Go to the Pet Ranking Page and view the source of the page

2. Copy from

</tr><tr style="background-color: #EDEDED;">
<td align=center><b>1</b></td>
<td align=center width=90 height=90 border=0><img src='http://images.neopets.com/pets/80by80/shoyru_green_happy.gif' width=80 height=80 border=0></td>
<td align=center><b>Shoyru</b></td>
<td align=center><b>17,268,615</b></td>
<td align=center><b>6.17%</b></td>

all the way down to

</tr><tr style="background-color: #FFFFFF;">
<td align=center><b>54</b></td>
<td align=center width=90 height=90 border=0><img src='http://images.neopets.com/pets/80by80/krawk_blue_happy.gif' width=80 height=80 border=0></td>
<td align=center><b>Krawk</b></td>
<td align=center><b>2,499</b></td>
<td align=center><b>0.00%</b></td>

and paste into Notepad++. Note the exact figures will change, you're basically looking for those bold numbers and the HTML surrounding them. It'll be 324 lines of code to be exact.

3. Use the find and replace feature with Regular Expression selected. (Remove the quote marks)

Find: "</tr>.*?<b>(.*?)</b>.*?<b>(.*?)</b>.*?<b>(.*?)</b>.*?<b>(.*?)</b></td>"

Replace with: "| $2 = $3 \($1<sup>th</sup> - $4\)"

4. Change 1st, 2nd and 3rd places from "1th, 2th, 3th"

5. Replace in current template

Done!