Got CodeExtinguisher up and running ... looks very promising and will save me a ton of work. Thanks!
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 13, 2008 3:25pm
Subscribe [27]#31 / Feb 17, 2008 1:21am
Got CodeExtinguisher up and running ... looks very promising and will save me a ton of work. Thanks!
#32 / Feb 17, 2008 1:38am
Glad you got it running freshmug 😊
vascopj, download RC7 from the main post, the changelog will go over the changes.
#33 / Feb 17, 2008 2:36am
An Error Was Encountered
Error Number: 1054
Unknown column ‘file_test’ in ‘field list’
SELECT `checkbox_test`, `date_test`, `dropdown_test`, `file_test`, `image_test`, `password_test`, `radiogroup_test`, `sessiondata_test`, `textarea_test`, `textbox_test`, `time_test`, `id` FROM (`example`) ORDER BY `id` desc
#34 / Feb 17, 2008 2:45am
I must say that this is a great tool. It saves ALOT of time for my projects. I have couple of questions. How actually does the many-to-many plugin work, how does it know what fields are asigned to what plugin.
Also is there an easy way to add regular CI controllers but still take advantage of the gui. So have a regular CI container but follows the CE page design structure. An example would help 😊
Once again, this is a great tool and keep up the good work!
#35 / Feb 17, 2008 8:30am
An Error Was Encountered
Error Number: 1054
Unknown column ‘file_test’ in ‘field list’
SELECT `checkbox_test`, `date_test`, `dropdown_test`, `file_test`, `image_test`, `password_test`, `radiogroup_test`, `sessiondata_test`, `textarea_test`, `textbox_test`, `time_test`, `id` FROM (`example`) ORDER BY `id` desc
Hum.. I’ve got exactly the same error with rc7 & PHP 4.
EDIT: just add the file_test and image_test fields to the example table and all is fine. 😉
#36 / Feb 17, 2008 9:19am
Hi jTaby,
Codex is really good addon. I have two “improvements” than can make it a lot of better 😉
I am often using db_prefix in CI, so i’ll be glad if there will be chance to use it in CE either…
And, some of my db tables haven’t identify field named ‘id’ (they have just other names) and i see error “Unknown column ‘id’ in ‘field list’”. I didn’t find any option to change the “master field”.
Keep up good work! I’m waiting for the next release 😉
#37 / Feb 17, 2008 9:40am
An Error Was Encountered
Error Number: 1054
Unknown column ‘file_test’ in ‘field list’
SELECT `checkbox_test`, `date_test`, `dropdown_test`, `file_test`, `image_test`, `password_test`, `radiogroup_test`, `sessiondata_test`, `textarea_test`, `textbox_test`, `time_test`, `id` FROM (`example`) ORDER BY `id` desc
Hum.. I’ve got exactly the same error with rc7 & PHP 4.
EDIT: just add the file_test and image_test fields to the example table and all is fine. 😉
I know. Has simply specified to the developer its mistake. It has forgotten to add these fields at installation but thus has noted them in a pattern
#38 / Feb 17, 2008 12:06pm
PedroGrilo, MaRKTD I have updated the installer in the zip to include those two fields, I apologize for that.
ehhh, Yeah, you’re probably correct. I’ll add that for the final release (both the table prefix and the primary key issue)
BeingDefined, I’m not exactly sure what you mean.. If you define your own controller and make it extend CodexController, like example.php (in controllers/) does, then you can use any of the functionality of both CI and CE.
#39 / Feb 17, 2008 2:52pm
Hi again 😊
I have found a little bug:
The Image plugin currently only works if you have also defined a fileupload at the same time but not alone.
kind regards,
mark
#40 / Feb 17, 2008 4:54pm
Hi jTaby
Still no luck even with the new RC7.
I think the problem is at live 46 in the login controller.
redirect($this->codexsession->userdata('login_success_redirect'));I don’t know where ‘login_success_redirect’ is defined.
I turned on all logging and after I try to login the last few lines of the log are:
.....
DEBUG - 2008-02-17 21:13:48—> Session Class Initialized
DEBUG - 2008-02-17 21:13:48—> A session cookie was not found.
.....
DEBUG - 2008-02-17 20:51:23—> File loaded: codex/application/views/templates/default/codex_header.php
DEBUG - 2008-02-17 20:51:23—> File loaded: codex/application/views/templates/default/codex_login_view.php
DEBUG - 2008-02-17 20:51:23—> Final output sent to browser
DEBUG - 2008-02-17 20:51:23—> Total execution time: 2.4432
DEBUG - 2008-02-17 20:51:24—> Config Class Initialized
DEBUG - 2008-02-17 20:51:24—> Hooks Class Initialized
DEBUG - 2008-02-17 20:51:24—> URI Class Initialized
ERROR - 2008-02-17 20:51:24—> 404 Page Not Found—>
Does this help at all?
#41 / Feb 18, 2008 3:39am
Looks very promising…
Somehow the download is corrupt…
Can you also use relations? E.G. show all the available rows from Table_A and make their id’s set to a field in Table_X?
Keep up the good work.
#42 / Feb 18, 2008 4:41am
Table
CREATE TABLE `category` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(128) character set utf8 NOT NULL,
`img` varchar(100) character set utf8 default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;category_form.yml
title:
class: TextBox
img:
class: Image
params:
make_thumbnail: true
height:180
width:129
url_path: img/
upload_path: D:/denwer/home/site/www/img/category.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
*
* NOTE:
* This controller does not generate tables, you must predefine you table.
*
*/
include("codexcontroller.php");
class Category extends codexController
{
function Category ()
{
// Load the CodexController
codexController::codexController();
// We include the spyc library
// So that we can define our form
// in a YAML file as opposed to
// hand-writing the array in $config
$this->load->library('spyc');
// To make the field names more human
// friendly
$this->load->helper('inflector');
/*
* ===================================
* ADDING VALIDATION
* ===================================
*
* If you would like to add form
* validation, then define your
* rules in the following format:
*
* $rules['field_name'] = "rules";
*
* then in your $config array below:
*
* 'rules' => $rules,
*
* ===================================
*/
$config = array(
'db_table' => 'category', //The name of the table associated with this controller
'form_setup' => $this->spyc->YAMLLOAD('definitions/category_form.yml'), //The array that holds our elements
'controller_name' => 'Category', //The name of the controller, so that it can be used when generating the URLs
'list_text' => array('title'), //The fields to be displayed in the "overview" view
);
$this->setConfig($config);
$this->load->scaffolding('category');
}
}
?>
error string
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Image::$CI
Filename: plugins/image.php
Line Number: 36
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: plugins/image.php
Line Number: 36
Fatal error: Call to a member function library() on a non-object in Z:\home\site\www\codex\application\plugins\image.php on line 36The example works. In what a mistake?
#43 / Feb 18, 2008 6:32am
MarKTD: The example works because a file upload field is loaded before the image upload field. Try adding “test: class: file” to your category_form.yml file. I found that bug yesterday and will look for a solution today.
Kind Regards,
Mark
#44 / Feb 18, 2008 10:12am
mandarin, MaRKTD, sorry for the delayed response, I can’t recreate the errors, i’ve used MaRKTD’s code as well, but it seems to be working on my machine.
Could you guys go to application/plugins/image.php and delete line 22 and tell me if that fixes the problem?
Thanks,
jTaby
#45 / Feb 18, 2008 10:18am
Of course! I will try that one out when I am back home 😊
Maybe in the meantime I can try and specify the bug a bit:
I am using PHP5 and CI 1.6 on a local dev box. The problem seems to be that the CI class is not instantiated when I just define a Image upload in a yml file. When I add a standard file upload field before the image field in yml file, the Image field works fine.
Kind Regards