Oooooh! Another fabulous helper I just discoverd - ellipsize - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Oooooh! Another fabulous helper I just discoverd - ellipsize (/showthread.php?tid=64816) |
Oooooh! Another fabulous helper I just discoverd - ellipsize - PaulD - 03-29-2016 Just discovered this in the text helper, http://www.codeigniter.com/user_guide/helpers/text_helper.html#ellipsize Wow, that has made my 'much too massive' urls suddenly fit beautifully. It was driving me mad that character_limiter was not working on the urls, and for the life of me I couldn't work it out until I noticed, Quote:" ..It maintains the integrity of words.. " Amazing how you skim read when you do not think you are. It dawned on me that a url is one word. And like magic the very next note was about ellipsize. Please don't deprecate the text helper :-) Note to self: Must take a closer look at all the helpers again! Just thought I would share, Best wishes, Paul. RE: Oooooh! Another fabulous helper I just discoverd - ellipsize - InsiteFX - 03-29-2016 Also take a look at the core classes you would be surprised what you find in them. RE: Oooooh! Another fabulous helper I just discoverd - ellipsize - PaulD - 03-29-2016 What do you mean by 'Core classes'. Do you mean the libraries or the system files? I was just looking through the libraries docs wondering what a core class was (and where to find it) and I found a library (actually a few of them) that I had not really noticed before, Trackback Class, that sparked my interest. I shall be looking into that in more detail. It seems that the more I know about CI, the more I realize how much I do not know and how much there actually is. Got to say, I do love CI. It is truly awesome. It is like it was written specifically for me :-) Best wishes, Paul. RE: Oooooh! Another fabulous helper I just discoverd - ellipsize - InsiteFX - 03-30-2016 All of them PaulID there are some hidden gems in them. When I started learning CodeIgniter years ago I took the first month and just read the documentation and looked through all of the core and library classes. RE: Oooooh! Another fabulous helper I just discoverd - ellipsize - Avenirer - 03-31-2016 My revelation today was the methods that allow you to retrieve form validation errors inside the controller: $this->form_validation->error_array() (https://codeigniter.com/user_guide/libraries/form_validation.html#CI_Form_validation::error_array) and $this->form_validation->error_string() (https://codeigniter.com/user_guide/libraries/form_validation.html#CI_Form_validation::error_string). Good to know, especially when using ajax type of forms. These guys thought of everything. Great framework. |