List - Showing data row without limitation of chars.
- Single Page
Posted 20 April 2012 - 07:01 AM
For example on my database the data is: "This callback runs on each row. It escapes the auto column value and runs the callback." on the view it will only show "This callback runs on each row. It escapes..."
Posted 20 April 2012 - 17:28 PM
$crud->callback_column('text_to_show', array($this, '_full_text'));
And write function "_full_text":
function _full_text($value, $row)
{
return $value = wordwrap($row->text_to_show, 50, "<br>", true);
}
I added 50 character limit, cause of if we have too long text, it will make too long field in the page - looks not well(( Look http://ua2.php.net/manual/en/function.wordwrap.php for more info about "wordwrap" function.
Posted 20 April 2012 - 21:07 PM
and change the :
case 'text':
$value = $this->character_limiter(strip_tags($value),30,"...");
break;
to whatever number you like for example:
$value = $this->character_limiter(strip_tags($value),50,"...");
Posted 23 April 2012 - 03:23 AM
Posted 28 August 2012 - 02:44 AM
Posted 28 August 2012 - 06:15 AM
Today the new stable grocery CRUD version 1.3 was released. And now we can handle the number of characters just editing the 1 line at the ./application/config/grocery_crud.php. The default is 30 characters, but you can easilly change it on what you need.
For more info about new features of grocery CRUD 1.3, please, see the change_log file or the author's topic at the forum about announcing the new version. Hope that it will be interesting and helpful for you!
Best regards!