CodeIgniter Forums
CodeExtinguisher 2.0 Release Candidate 14.2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: CodeExtinguisher 2.0 Release Candidate 14.2 (/showthread.php?tid=8451)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-16-2008

[eluser]edwardmolasses[/eluser]
hi there,

I'm trying to write my own plugin, and i'd like to have it allow text fields that don't exist in the database. I'm not completely sure how to go about this though since it seems like ce requires that the field be in the database. Then i'd take that input and use it during the insert to process data.

I have a couple of concerns:

1) how do i stop ce from handling the insert? I know there's the pre and post insert functions that i can overload, but do i need to tell ce to let me handle the insert all by myself?
2) for my overloaded pre or post insert functions, can i get access to all of the fields that have been submitted? I want to use a few of them to do some data processing before the insert
<br>
Well, i think i have some missing pieces in my understanding of the code extinguisher process. It would be very much appreciated if someone could point me in the right direction. Thank you!


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-16-2008

[eluser]Majd Taby[/eluser]
1) Return NULL from prepForDb or prepForDisplay and CE will not process that data into the db
2) you can just access the $_POST array directly.


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-16-2008

[eluser]edwardmolasses[/eluser]
[quote author="jTaby" date="1224199800"]1) Return NULL from prepForDb or prepForDisplay and CE will not process that data into the db
2) you can just access the $_POST array directly.[/quote]

thanks very much!

Also, i just was wondering if it's possible to add an input in the yaml file that doesn't exist in the db? For the overview display, it looks like ce looks for the field in the table specified in the controller. I would like to exclude some fields from that lookup if possible.

thanks again!


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-16-2008

[eluser]Majd Taby[/eluser]
make getFieldName() return NULL

Also, check out this page
http://codeextinguisher.pbwiki.com/Events


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-16-2008

[eluser]edwardmolasses[/eluser]
thanks again :-)


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-21-2008

[eluser]edwardmolasses[/eluser]
hi there, another small question from me.

I was wondering how, through my plugin, i might control what value is seen in that plugin's field in the overview list?

thanks again.


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-21-2008

[eluser]Majd Taby[/eluser]
prepForDisplay returns what value should be shown in the overview.


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-21-2008

[eluser]edwardmolasses[/eluser]
[quote author="jTaby" date="1224646155"]prepForDisplay returns what value should be shown in the overview.[/quote]

cheers, thank you Smile


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-21-2008

[eluser]edwardmolasses[/eluser]
I also was wondering if i wanted to redirect to another table after a successful edit, where would the best place be to put the redirect?

I was thinking i would put a hidden plugin of my own at the end of the yaml file, and within the post edit hook of that plugin i could have the redirect. Is that a good way?


CodeExtinguisher 2.0 Release Candidate 14.2 - El Forum - 10-21-2008

[eluser]Majd Taby[/eluser]
at that point i would suggest you create a new method and overload the edit method, adding your own redirect. Take a look at the bundled example controller.