Table: Film management, Fancy tools in the backoffice
- Single Page
Posted 17 September 2012 - 09:29 AM
The back office tools for the Film management are quite fancy, with a very nice editor, similar to this one I am writing and also some windows to pass values from left to right etc.
However, on looking at the code, I don't identify anything that makes it different to the creation of simple fields. How do I include this fancy editor ?
regards
Alvaro
Posted 17 September 2012 - 09:56 AM
$crud->change_field_type('your_field', 'text');
If you want unsets this texteditor you can use method "unset_texteditor".
Posted 17 September 2012 - 10:13 AM
$crud->change_field_type('your_field', 'text');
If you want unsets this texteditor you can use method "unset_texteditor".
[/quote]
Zdrastvuite!
but how do I include the actual text editor, I mean with all the whistles and bells the toolbar etc ?
Look:
$crud->set_table('film');
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname','priority');
$crud->set_relation_n_n('category', 'film_category', 'category', 'film_id', 'category_id', 'name');
$crud->unset_columns('special_features','description','actors');
$crud->fields('title', 'description', 'actors' , 'category' ,'release_year', 'rental_duration', 'rental_rate', 'length', 'replacement_cost', 'rating', 'special_features');
Where is the Editor for the Description column ?
spasiva zsaranee i da sdrastvuite Lukashenko, (ia belarusski patriot)
Posted 17 September 2012 - 11:01 AM
[quote name='alvarito' timestamp='1347876803' post='3478']
Where is the Editor for the Description column ?
[/quote]
http://www.grocerycr...-longtext-type/
switch ($db_type->type) {
case '1':
case '3':
case 'int':
case 'tinyint':
case 'mediumint':
case 'longint':
if( $db_type->db_type == 'tinyint' && $db_type->db_max_length == 1)
$type = 'true_false';
else
$type = 'integer';
break;
case '254':
case 'string':
case 'enum':
if($db_type->db_type != 'enum')
$type = 'string';
else
$type = 'enum';
break;
case 'set':
if($db_type->db_type != 'set')
$type = 'string';
else
$type = 'set';
break;
case '252':
case 'blob':
case 'text':
case 'mediumtext':
case 'longtext':
$type = 'text';
break;
case '10':
case 'date':
$type = 'date';
break;
case '12':
case 'datetime':
case 'timestamp':
$type = 'datetime';
break;
fix this code as you like.
Posted 17 September 2012 - 11:18 AM
Posted 17 September 2012 - 19:33 PM
seichas vsjo paniatno thank you very much now I understand what you mean, I was new to crud and I did not imagine that text field was meaning the text editor tinymce.