Welcome Guest, Not a member yet? Register   Sign In
how to implement dynamic "routes"?
#3

[eluser]narkaT[/eluser]
that was my initial aproach Wink

but I encountered several problems:

1. utf-8 chars aren't allowed in the URI. Adding them to the permitted chars fails,
because the 'permitted_uri_chars'-config value is escaped by preg_quote
which turns "\x81-\xFF" to "\\x81-\\xFF".

2. passing "arrays" of values is not possible without a custom implantation,
which parses the URI.

(3. the total number of parameters is "unpredictable", so statically mapping
segment x to value y won't work)

Problem 3 could be eliminated with the $this->uri->uri_to_assoc()-method,
but problem 2 would still consist.


Problem 2. exists because there will be multi-select-fields on the page,
which will transform to a parameter-string like "select[]=1select[]=2".


One solution could be usring post for the form, and convert the post data
to a valid CI-URI, but that would be a little bit "hacky" to implement.
encode/decode text-data that my contain utf-8-chars and parse the "arrays"
back to an array and so on...

the site will be "good visited", so every millisecond/byte counts Wink
if it isn't possible on any other way I'll have to stick with that solution.

edit: Just read through the URI-Class, I'm going to resume my Hook-Aproach.


Greeting
Jan


Messages In This Thread
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 05:42 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 07:11 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 07:53 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 08:09 AM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 05:32 AM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 12:24 PM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 04:17 PM
how to implement dynamic "routes"? - by El Forum - 09-12-2008, 07:58 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 07:19 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 10:58 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 01:23 PM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 01:25 PM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 03:03 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 03:06 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 05:55 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 06:41 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 07:03 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 11:54 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 01:44 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 07:56 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 09:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB