06-02-2008, 03:37 AM
[eluser]abmcr[/eluser]
A small fix in the plugin text_box:
adding stripslashes ifor not showiing the \
After
[quote author="jTaby" date="1212265104"]abmcr, In your field, you can add a "table_access_restriction" which does exactly that. http://codeextinguisher.pbwiki.com/Creat...-own-pages
[/quote]
I have try with this code
but nothing change....
And it is possible to set a restriction acces to the table on the related field?
My case is: i have a table "books" withAfter i have the table of the preview_chapter, with Finlay i have the books_preview_chapter table with a structure as
with the related data.
I want to display a view with a selec as
And, yet, it is possible to get dinamyc the id, using a uri_segment?
My idea was a code as
There is a more simple way to get this goal?
A small fix in the plugin text_box:
Code:
$html .= ' <input class="text" type="text" value="'.stripslashes($this->value).'
After
[quote author="jTaby" date="1212265104"]abmcr, In your field, you can add a "table_access_restriction" which does exactly that. http://codeextinguisher.pbwiki.com/Creat...-own-pages

I have try with this code
Code:
$config = array(
'db_table' => 'example', //The name of the table associated with this controller
'form_setup' => $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('example_form')), //The array that holds our elements
'controller_name' => 'Example', //The name of the controller, so that it can be used when generating the URLs
'primary_key' => 'my_id', //The name of the controller, so that it can be used when generating the URLs
'display_fields'=>array('textbox_test','checkbox_test','related2'),
'order_by' => 'textbox_test',
'order_type' => 'ASC',
'table_access_restrictions '=>'textbox_test LIKE "r%"',
'rules'=>$rules
);
And it is possible to set a restriction acces to the table on the related field?
My case is: i have a table "books" with
Code:
id, book....
Code:
id_chapter, description....
Code:
bk_cp_id,books_id,chapter_id
I want to display a view with a selec as
Code:
SELECT preview_chapter.*
FROM preview_chapter
INNER JOIN books_preview_chapter ON preview_chapter.id_chapter= books_preview_chapter.chapter_id
WHERE books_preview_chapter.books_id= 5567
And, yet, it is possible to get dinamyc the id, using a uri_segment?
My idea was a code as
Code:
$config = array(
'db_table' => 'preview_chapter', //The name of the table associated with this controller
'form_setup' => $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('example_form')), //The array that holds our elements
'controller_name' => 'Example', //The name of the controller, so that it can be used when generating the URLs
'primary_key' => 'id_chapter', //The name of the controller, so that it can be used when generating the URLs
'display_fields'=>array('description','pdf','books_preview_chapter'),
'order_by' => 'textbox_test',
'order_type' => 'ASC',
'table_access_restrictions '=>'books_preview_chapter LIKE "'.$this->uri->segment(4)."',
'rules'=>$rules
);
There is a more simple way to get this goal?