Part of the EllisLab Network
   
1 of 2
1
TableEditor 0.4
Posted: 11 January 2010 06:08 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  267
Joined  07-31-2008

Hey there.

During a customer-project, I created some code I thought it might be helpful to others! TableEditor lets you edit tables in your database in an easy and robust way, combining CI’s powerful form validation. No more boring CRUD-coding for simple table editing, it is done by this little framework.

Check it out here!
Or in the Wiki.

Added features v0.4:
- Besides manual order, it is now possible to define column(s) according to which overview will be ordered
- Search form! You can define which columns shall be searchable, including wildcards


Added features v0.3:
- Hooks: Teach TableEditor some behaviour
- Fully featured example for uploading files, taking advantage of the hooks


Added features and some bug-fixing in v0.2:
- Hooking up lookup-tables
- CSS based on CodeIgniter’s scaffolding-css

Any form of feedback is welcome! Please bear with my language in the documentation: English is not my native language. Drop me a PM if you have corrections…

 Signature 

RostElyn - Russian Language in Switzerland
TableEditor: No more tirying CRUD-code

Profile
 
 
Posted: 11 January 2010 07:22 PM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2770
Joined  07-27-2006

Thanks for sharing. I toyed around with building this once. It’s certainly a fun exercise

 Signature 

Check out the Template Library
Oh yeah, I tweet, too (regarding CodeIgniter on occassion).

Profile
 
 
Posted: 11 January 2010 08:53 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  16
Joined  08-20-2009

I was trying to write something like this, but got to lazy)) I wanted to make it fully OO. The idea was to make a base table class, which devs could extend as they like, specifying columns to show, labels, preformatting cells etc.


Too bad that you did’n make any theme. You coul’d use CI scaffolding css…

I dont like the rule that you have to make specialy named columns. Does it means that i cant use it on existing db and i have to alter all tables?


But the idea is good, CI needs a good DB administrative tool!

Do carry on)

Profile
 
 
Posted: 12 January 2010 04:10 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  267
Joined  07-31-2008
MaD HamsteR - 11 January 2010 08:53 PM

Too bad that you did’n make any theme. You coul’d use CI scaffolding css…

Yeah, maybe I should provide here something out of the box since I anyhow provide a bundle for download. Without any kind of formatting, it doesn’t look neat at all…

MaD HamsteR - 11 January 2010 08:53 PM

I dont like the rule that you have to make specialy named columns. Does it means that i cant use it on existing db and i have to alter all tables?

That’s right. And this might be some drawback. Especially the order-column might not exist in most of the tables. Maybe I should make it more flexible. Note that you could change the constants in mdl_tableeditor.php if you would like to use different names for the given columns…
The main-idea of mine was to create a stable solution for editing so-called lookup-tables. Further ideas I have is to provide functionality for 1:n relations. Furthermore it would be nice if we could edit the meta-data with a GUI instead of editing directly in the config-file smile

But it’s a start, I hope I did not reinvent the wheel for everybody wink Thx for feedback!

 Signature 

RostElyn - Russian Language in Switzerland
TableEditor: No more tirying CRUD-code

Profile
 
 
Posted: 12 January 2010 08:52 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Avatar
Total Posts:  16
Joined  08-20-2009

1:n relations sounds interesting!

Profile
 
 
Posted: 14 January 2010 11:55 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  267
Joined  07-31-2008

v0.2 released.

 Signature 

RostElyn - Russian Language in Switzerland
TableEditor: No more tirying CRUD-code

Profile
 
 
Posted: 15 January 2010 08:14 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  267
Joined  07-31-2008

Added some small demo, as it is contained in the bundle.

 Signature 

RostElyn - Russian Language in Switzerland
TableEditor: No more tirying CRUD-code

Profile
 
 
Posted: 15 January 2010 04:02 PM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  293
Joined  05-29-2006

Thank you for the very useful (and rapyd) tool; only one feature request….. how to manage a upload filed, i.e.: i want to set into a field the name (only the name not the file wink ) of a upload file…Now this is not possible, but may be in the future…..

Ciao!

 Signature 

CI Js_calendar plugin click

WYSIWYG with CI

Profile
 
 
Posted: 16 January 2010 06:10 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  267
Joined  07-31-2008

I was already thinking about implementing a way to upload files. But this might be something better solved with a hook-system. Right now, there are no hooks.
I don’t quite understand your question though. Do you mean something like a selection-field which points to a directory with files? To write manually a filename into a string-column would be no problem, but rather error prone.

 Signature 

RostElyn - Russian Language in Switzerland
TableEditor: No more tirying CRUD-code

Profile
 
 
Posted: 16 January 2010 07:45 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  293
Joined  05-29-2006

No i want no write manually the filename: i want an input type=“file” who upload the file into a folder and insert the filename in the db
wink

 Signature 

CI Js_calendar plugin click

WYSIWYG with CI

Profile
 
 
Posted: 04 February 2010 10:19 PM   [ Ignore ]   [ # 10 ]  
Summer Student
Total Posts:  1
Joined  02-04-2010

UPDATE: never mind I realize that you can not use the “private” declaration in a PHP4 environment. In fact your code is PHP 5 exclusive, you should mention that in the documentation.

Could you please post some system requirements, or help determine why I am getting an error?

Without any manipulation of your files I am getting this error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in [...]/system/application/controllers/tableEditor.php on line 11

Which refers to this line of code in your controller:
  private $controllerPath   = ‘’;

I have installed your files manually instead of uploading your whole bundle.

I have the most recent build of Codeigniter 1.7.2
I use 1and1.com as a hosting company.
The php version is PHP Version 4.4.9
and MySql 5

Thanks

Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 148261 Total Logged-in Users: 67
Total Topics: 103041 Total Anonymous Users: 2
Total Replies: 515894 Total Guests: 479
Total Posts: 618935    
Members ( View Memberlist )