CodeIgniter Reactor
Welcome to the CodeIgniter Reactor! This is where ideas spark, igniting new code and changes from both EllisLab and the community to keep CodeIgniter awesome.
-
Allow CI_Session to store OBJECTS of Model types
The problem at hand:
CI_Session does not allow storing objects.
It does however store a bunch of objects itself which seems like unnecessary overhead (CI object with lots of CI objects and recursions etc).More detailed: If you store objects (instances of Models in my case) in the Session right now, the data cannot be accessed, because any object you store there will have a “incomplete object error” which makes the data unusable. This is, because the object definitions in the classes (models) is loaded AFTER the session is started.
I would have expected, that auto-loading the respective models would… more8 votes -
3 votes
-
Allow encryption and decryption of URI segments as a uri_protocol option in APPPATH.'config/config.php' file. so http://example.com/control
Allow for auto encryption and decryption of URI segments as a uri_protocol option in APPPATH.'/config/config.php' file such that:
http://example.com/controller/method/param-1/value/.../param-N/value
BECOMES
http://example.com/c9Zmxo7VSwyF0gnHtw4D.
encryption and decryption is done internally so this feature is version compatible...
3 votes -
move system folder into its own github repo
makes it much easier make structure changes in the root folder, also gives users ability to use as submodule
26 votes -
OAuth 2.0 server and client library
OAuth 2.0 being the de-facto standard for third party communication an OAuth server (auth server & resource server) and client library similar to the XML-RPC implementation would be very helpful.
Some attempts have already been made by Alex Bilbie (https://github.com/alexbilbie/CodeIgniter-OAuth-2.0-Server).
29 votes -
Form validation method exists
Why you dont add this new method to the validation process..
It will be just as is_unique but with the opposite result ..It can be very usefull for all developers.
For example at LOGIN(almost all site have logins..) we can check for username, email, with this validation.
Currently either we have to extend Form_validation class or to write our own error method for this simple check.4 votes -
Exception (Error) handling
Whenever CodeIgniter encounters an error it simply dies (show_error).
However, I would like to decide myself whether an error or failure should result in an exit. (For example, I would like to load a language file, but even if it does not exist I still want to continue or use a fallback.)
Therefore instead of the different show_error functions, Exceptions should be thrown so we could try-catch them.
To retain the functionality of showing the error, if no catch-block is defined, set_exception_handler can be used to set the default exception handler.19 votes -
Join method on CI_DB_active_record to support string-based joins
I recently had a problem whereby I needed custom join conditions based on user values. This is not allowed in the join method, as it ends up surrounding the value like so: `'value`', which results in an SQL error. This is easily solved by ensuring that the join() method can support join strings, like so:
public function join($table, $cond = '', $type = '') {
$num_args = func_num_args();
if ($num_args == 1) {
// only 1 arg passed, full join string
$this->ar_join[] = $table;
return $this;
}The $table argument then becomes a multi-purpose variable (probably worth changing the name… more
4 votes -
Add function to get the array (instead of a string) when validation fails
This will be helpful when handling the errors of a form validation from the client side, allowing us to mark which fields were invalid instead of blindly throwing the entire string anywhere.
I took the code from validation_errors() (./system/helpers/form_helper.php) and modified it to return the array. You can see the code here: http://codeigniter.com/forums/viewthread/211917/
4 votes -
better image library
we need something like http://wideimage.sourceforge.net
right now you cant do zoom crop and other basic image manipulation without writing tons of code, so i end it up always using wideimage in CI
examples:
1)
- you need a thumb (fixed size)
- you upload several images, they have different aspect ratio and sizes
- thumb must be generated without any border left, so you need to resize up if the image is already smaller than the thumb, scale up if its bigger (by choosing one of the axis) and crop the rest2) you need to resize and merge png… more
3 votes -
Do this ... instead of this ...
Do this (just an example):
/* End of file ./application/config/routes.php */
or even:
/* End of ./application/config/routes.php */
Instead of this:
/* End of file routes.php */
/* Location: ./application/config/routes.php */19 votes -
multi_query support
CI supports mysqli driver which has got mysqli_multi_query method.
On some forums there are opinions that CI is not suitable for more complex tasks. Lack of multi_query support seems to confirm this "bad" idea.
As far as I understand there is also no PDO_MySQL support, and also as I read somewhere DB class is the only not extendable class which make things harder for community support.
1 vote -
Isolate helpers in classes instead of declaring global functions
Helpers could be like this :
$this->load->helper('text_helper');
and called like this :
$this->text_helper->the_function().
This would avoid conflicts when using Codeigniter with other applications.
10 votes -
CodeIgniter needs next page links on online documentation
The online documentation needs next page buttons... it adds extra work to open drawer each time. Thanks.
11 votes -
log current page url into log file when show_404() is called without any parameter.
Codeigniter logs the value of $page parameter into file but if not supplied, it doesn't log any url. This makes it difficult to identify which page was accessed when the 404 occured. It's better to make the default value of $page to current url by using something like $CI->uri->uri_string();
1 vote -
"Rails" Style application logging
I would love to see application logging in code igniter like as happens in ruby in rails by default.
Here is a snippet from the rails application log (in production mode)
Processing ClientsController#index (for 192.168.1.179 at 2011-12-18 19:27:18) [GET]
Session ID: BAh7CToOcmV0dXJuX3RvMDoMdXNlcl9pZGkGOgxjc3JmX2lkIiVmMGYxMmVj
MWFhNjRiZDg3ODJlNDZjZjY1YzhiZjU5YyIKZmxhc2hJQzonQWN0aW9uQ29u
dHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA==--4f94c0adec212d51709562b2a6f4996ef0ef5e99
Parameters: {"action"=>"index", "controller"=>"clients"}
Rendering template within layouts/clients
Rendering clients/index
Completed in 0.04318 (23 reqs/sec) | Rendering: 0.03273 (75%) | DB: 0.00295 (6%) | 200 OK [http://testsite.com
/clients]This log snippet tells me what controller & action are being used, input parameter, how long it takes, and what url has been hit etc.
I would like… more
10 votes -
Cache/Output Library Improvements (Overhaul)
1. (at least optionally:) HTTP Cache Headers that match the server-side cache expirations. (Google doesn't need to crawl a page again and again if we know for sure it hasn't changed. Proper HTTP headers would resolve this.)
2. The ability to selectively flush pages from the cache. (I do it with a ?flush_cache query string, but there's probably some better method).
3. Query-string aware.
4. GZip content before caching it and then serve it in its GZipped form to browsers that support decompression (and decompress it for the edge case that doesn't), to cut down on both disk space and… more4 votes -
Smarter crop function
I would like a smarter crop function. If you upload a normal photo (1000x750px) and want a 80x80 thumbnail for that, you get some sky in an 80x80 box.
The best thing (imo) would be to resize the image until the width or height hits 80px, then crop the rest.
Right now it can be done, but it's a hassle and the file needs to be written to disk twice.Or maybe you can, but I'm not seeing it.
19 votes -
a road map of changes
I would like to see a road map of planned changes so we as a community know what changes are coming down the line
52 votes -
get_where() to behave more like where()
get_where() currently only supports an Array in the where clause.
ie. from the user guide:
$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);Yet where() has 4 ways of specifying a where condition:
Simple key/value method...Custom key/value method...Custom string and so on.Why can't we supply the same 4 formats used in the where() function as in get_where()?
Even the function comment reads...
/**
* Get_Where
*
* Allows the where clause, limit and offset to be added directly
*
* @param string the where clauseYet, a string doesn't work :(
6 votes