CodeIgniter Forums
Please consider querystring support in 2.x - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Please consider querystring support in 2.x (/showthread.php?tid=31698)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Please consider querystring support in 2.x - El Forum - 07-01-2010

[eluser]pbreit[/eluser]
WanWizard, thanks, I will give that a try! If this works reliably and performance-wise, it would be a great enhancement for all CodeIgniter developers to be able to safely and easily use querystrings where it make sense.


Please consider querystring support in 2.x - El Forum - 07-01-2010

[eluser]Dan Horrigan[/eluser]
A while back i submitted a pull request to EllisLab on BitBucket for v2.0. Here is the commit: http://bitbucket.org/dhorrigan/codeigniter/changeset/8e4d17281982

Probably won't get into the core, but hey...it was worth a try.

Dan


Please consider querystring support in 2.x - El Forum - 07-01-2010

[eluser]pbreit[/eluser]
Does anyone here have good relations with EllisLabs to see if they would consider this?


Please consider querystring support in 2.x - El Forum - 07-01-2010

[eluser]pbreit[/eluser]
Does this look right for 2.0?


Please consider querystring support in 2.x - El Forum - 07-02-2010

[eluser]WanWizard[/eluser]
Looks ok.

The changes for 2.0 are exactly the same as for 1.7.2.


Please consider querystring support in 2.x - El Forum - 07-13-2010

[eluser]coldclimate[/eluser]
[quote author="Phil Sturgeon" date="1277913614"][quote author="Crimp" date="1277913451"]Why segments are better?
CI is designed to work with segments, great. We just need a way to easily throw in some ?foo=bar for Twitter, oAuth support, Facebook Connect, etc without recoding our apps or hacking it with hooks like mentioned above.
Let's put our heads together and come up with a solution. "Go team!"[/quote]

I can't agree more.
If building your site from the ground up and the lack of query strings is rarely a problem (or hasn't been for me ever). Once you have to deal with other people's code (especially my current nemesis Facebook) and you do have to hack about a bit. Using Elliot Haughin's new facebook library we've had a lot of success, but it's still very much feels like hacking about, not clean coding.

My ideal solution would mean that segments worked via routes for pointing to controllers, methods and passing in data, but that tagging a query string on the end would then make these variables available to that controller/method and not end up in 404's or routing problems. We've nearly got this by using a combination of $config['uri_protocol'] = "PATH_INFO"; and modifying $config['permitted_uri_chars']


Please consider querystring support in 2.x - El Forum - 07-13-2010

[eluser]WanWizard[/eluser]
That might work in your case, but I prefer not to fiddle with config values, that might have side-effects elsewhere.

On one of my servers p.e., PATH_INFO doesn't work, no segments can be loaded and the application fails miserably...


Please consider querystring support in 2.x - El Forum - 07-13-2010

[eluser]pbreit[/eluser]
Wan, your solution works with no side effects?


Please consider querystring support in 2.x - El Forum - 07-13-2010

[eluser]Unknown[/eluser]
[quote author="pbreit" date="1279056494"]Wan, your solution works with no side effects?[/quote]

Looks ok.


Please consider querystring support in 2.x - El Forum - 07-13-2010

[eluser]WanWizard[/eluser]
[quote author="pbreit" date="1279056494"]Wan, your solution works with no side effects?[/quote]
Never say never, but until now I haven't seen any.

If you come across them (I can't test every possible situation), let me know, and I'll fix it.