Thanks herrkaleun, Its greate!
thank you for testing 😊
the next release will be better 😊
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
May 01, 2009 2:46pm
Subscribe [26]#61 / May 06, 2009 11:44am
Thanks herrkaleun, Its greate!
thank you for testing 😊
the next release will be better 😊
#62 / May 08, 2009 10:26pm
Hey this is very cool.
Only I don’t want my table prefix in the controller names and so forth.
So I changed your list of links for each table into a form, with a checkbox for each table name, and some extra fields for what I want to name my stuff.
function_select()<br />
{<br />
...<br />
$this->load->helper('form');<br />
$rows='';<br />
foreach ($tables as $table)<br />
{<br />
$rows .= form_checkbox(<br />
array(<br />
'name' => 'NAMETABLE',<br />
'value' => $table,<br />
'checked' => FALSE,<br />
'style' => ''<br />
) );<br />
$rows .= " $table<br />
\n";<br />
}<br />
$form=’‘;<br />
$form .= form_open(‘generate/ProcessTable/process’);<br />
$form .= $rows;<br />
$form .= form_input(‘gen[NAMEMODEL]’, ‘MyModel’);<br />
$form .= “<br />
\n”;<br />
$form .= form_input(‘gen[NAMEVIEW]’, ‘MyView’);<br />
$form .= “<br />
\n”;<br />
$form .= form_input(‘gen[NAMECONTROLLER]’, ‘MyController’);<br />
$form .= “<br />
\n”;<br />
$form .= form_submit(‘submit’,‘gen’);<br />
$form .= form_close();<br />
echo $form;<br />
}</p>
<p> function ProcessTable ( $table_name )<br />
{<br />
$table_name = $this->input->get_post('NAMETABLE');<br />
$gen = $this->input->get_post('gen');</p>
<p>$name_controller = ucfirst( strtolower( $gen['NAMECONTROLLER'] ) );<br />
$name_view = ucfirst( strtolower( $gen['NAMEVIEW'] ) );<br />
$name_model = ucfirst( strtolower( $gen['NAMEMODEL'] ) );<br />
$name_model_lower = strtolower( $name_model );</p>
<p>echo '</p><pre>';
print_r($gen);
echo '</pre><p>‘;<br />
echo “<br />
table_name=$table_name”;<br />
echo “<br />
name_controller=$name_controller”;<br />
echo “<br />
name_model=$name_model”;<br />
echo “<br />
name_view=$name_view”;<br />
die(‘end’);
... you have doubled up “$table_name” to also be the controller name etc.
In the next release, if you set those variables at the top of the ProcessTable() function, and separate out the subsitutions for table_name from NAMECONTROLLER etc, then we can modify it to suit our needs faster. As it is, we sorta gotta hunt through your code.
Also needs some documentation, maybe just a little more blurb on the welcome page.
Ie:
Look in the /templates folder to see create your own output.
The following substitutions are made during generation:
%FIELDS_ID%
%FIELDS_STRING%
%MODEL_CALL%
%NAME_CONTROLLER%
%NAME_MODEL%
%NAME_MODEL_LOWER%
%NAME_VIEW_FORM%
%SET_RULES%
%SET_VALUE%
%TABLE_NAME%
%VALIDATION_FALSE%
%VALIDATION_TRUE%
%VALUES_INIT%
%VALUES_INIT_EDIT%
It’s a great idea and a good start. Thanks!
#63 / May 09, 2009 2:47am
Steward: thank you very much for your interest.
We will have a look at all suggestions these days,
since exams hunt me 😊
i will definitely have a look at your suggestion and
making the modifying easier.
take care and thanks again 😊
#64 / May 09, 2009 1:00pm
Having slept on it, it is probably better to have an INI or INCLUDE file…
NAMECONTROLLER=MyController
NAMEVIEW=MyView
etc
or
define (’%NAMECONTROLLERR’, ‘MyController’);
...
-saves your code from being cluttered by form handling. Bloat-free.
-just as easy for us developers to modify.
-same result, allows us to specify/fine-tune details.
Either way, the main thing is to collect your assignments into one place, so it is obvious which variables we can set.
Good luck with your exams.
#65 / May 09, 2009 3:58pm
> Having slept on it, it is probably better to have an INI or INCLUDE fileā¦
Inch by inch we go to yml 😊
#66 / May 09, 2009 4:01pm
😊 hehehe
hello again.
the whole idea is, if you have a database design, and no written code, you run the database trough iScaffold, and you have a basic application to work on.
i however, included templates in the folder, where you can change everything to work with everylib or way you have.
since i believe, there is not much to do in terms of updating a crud engine (except for a major CI release) you could safely modify the templates or add your own
so every flavour would fit it, with or without yml or any other templating system 😊
#67 / May 11, 2009 12:30pm
I had this idea last night—I’ve been using codeigniter for about a week and a half now or so and I thought to myself surely the majority of projects I create that use a database are going to be very similar in their CRUD layout.
I thought about using XML to explain relationships between the database, and codeigniter to do some similar code generation as you have in your script.
For example:
<layout>
<schemas>
<table>
...
<relationship foreign_key="photos.fk_photo_id" primary_key="photos.id">photos</relationship>
...
</table>
<schemas>
</layout>You get the gist, I haven’t sat down and planned out the XML language to do this 100% but I know that it wouldn’t take very long and it could be extended to form complex database relationships with minimal code. For example you could generate the CI structure with 100% database support (say you’re editing the photos in a photo gallery, etc.)
Imagine being able to design the entire database, then create an XML file FROM that database. Create uniform database design conventions and you could almost create entire images/scripts/xml/sql that could create a project in seconds. Include the SQL and XML instructions, load it into the CI CRUD generator and v’oila, 90% done, now just customize. My only worry is that this would become too “frontpagesque” with users having the ability to create “cool stuff” with minimal, or relatively no working knowledge of the actual CI framework which is not what I would want.
Let me know if I can help contribute on google code, or I’ll just modify your source and post it back here 😉
#68 / May 11, 2009 12:34pm
hello tekhneek,
we’ve almost a release ready.
please modify the existing source and provide an example in your free time.
im sure everyone would be glad 😊
#69 / May 14, 2009 4:04am
Hello friends, the code has been updated for easier modification and a cleaner look.
take care
#70 / May 14, 2009 7:34pm
AWESOME! will check it out later.
#71 / May 24, 2009 12:49pm
First let me say, great work. My only suggestion right now is to ignore the .svn files in the compressed download.
#72 / May 24, 2009 2:21pm
First let me say, great work. My only suggestion right now is to ignore the .svn files in the compressed download.
thank you very much 😊
we appreciate your comments.
#73 / Jun 30, 2009 12:06am
Has anyone tried with this oracle? I setup database.php with a working coonfig that I got from a server running Linux (I’m using windows).
The error that I got is:
++++++++++
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: models/model_iscaffold.php
Line Number: 41
++++++++++++++++++
#74 / Jun 30, 2009 4:20am
hello, the package should run out of the box.
is there any space before the <?php tag in any of the files maybe?
#75 / Jul 03, 2009 11:57pm
I forgot to say that the error only happens after clicking on the “generate” link.