jibinam / budabot2

Automatically exported from code.google.com/p/budabot2
0 stars 0 forks source link

Use Text::make_* methods instead of raw AOML #193

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Often in the code you might see something like:
<img src=rdb://100337>
<a href='itemref://247139/247139/300'>Strong Lead Viralbots</a>
<a href='chatcmd:///waypoint 2307.2 1767.8, 4321'>Vortexoids</a>

These should be replaced with Text class's make_item(), make_chatcmd(), 
make_image(), etc... methods.

Original issue reported on code.google.com by joye...@gmail.com on 26 Jul 2012 at 7:16

GoogleCodeExporter commented 9 years ago
some helpful regex replacements:

"<a href='itemref://([^/]+)/([^/]+)/([^/]+)'>([^<]+)</a>
$this->text->make_item\(\1, \2, \3, "\4"\) . "

<img src=rdb://([^'>]+)>
" . $this->text->make_image\(\1\) . "

Original comment by bigwheel...@gmail.com on 12 Nov 2012 at 8:36

GoogleCodeExporter commented 9 years ago
in many cases, ItemsController::getItem() and ItemsController::getItemAndIcon() 
should be used instead of Text::make_item() and Text::make_image()

Original comment by bigwheel...@gmail.com on 16 Nov 2012 at 7:34

GoogleCodeExporter commented 9 years ago
all instances in php files have been changed

Original comment by bigwheel...@gmail.com on 19 Mar 2014 at 8:18