html_helper - some small changes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: html_helper - some small changes (/showthread.php?tid=14116) |
html_helper - some small changes - El Forum - 12-18-2008 [eluser]bgougent[/eluser] Like mentioned in the users guide any type of helper, library etc can be extended. There are some basic things I was missing in the html_helper: A <hr /> and a good print_r function. So I made this small solution (file is called MY_html_helper.php and is placed in the helper folder of the application) Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); If there are some others adds please provide them. Maybe something for CI 1.7.X html_helper - some small changes - El Forum - 12-18-2008 [eluser]cahva[/eluser] Heh, I personally havent seen any good reason to print multiple horizontal rulers and this function definately does not help in view files. Its easier to just write <hr /> than write <?php echo hr() ?> In the other hand that pre function is usefull. I found my self writing that debug code all over again many times per project so that might save a few mins html_helper - some small changes - El Forum - 12-18-2008 [eluser]bgougent[/eluser] Multiple HR is mostly not used. That is correct. Typing <hr /> is the same like the <br />. Is use the br() a lot. And when I would like to separate blocks during debug a hr() is very easy to type. |