Extracting Web Application

#1
[eluser]kerell78us[/eluser]
I have purchased a web application that was developed with CI. I would like to user Query String URLs with the parameter of the query string varying, e.g. ?user=1255454, ?article=1545 etc. I have noticed that CI is able to facilitate Query String URLs, but not in the way I would like to user them.

As a result, I am wondering whether it is possible to extract the application logic from CI?

#2
[eluser]wiredesignz[/eluser]
CodeIgniter application logic is far too complex to be extracted. Especially today Wink

#3
[eluser]kerell78us[/eluser]
ok thanks alot, I guess I'll have to get the php classes rewritten.

#4
[eluser]webthink[/eluser]
There may be other ways to handle this. Are you certain you need to use query strings?

#5
[eluser]kerell78us[/eluser]
[quote author="webthink" date="1207152011"]There may be other ways to handle this. Are you certain you need to use query strings?[/quote]

Hey webthink:

Certainly, I do need to use Query String Urls, any assistance in the regard would be welcomed.

#6
[eluser]xwero[/eluser]
There are a few hack on the forum that don't change the $_GET global. What do you mean when you write
Quote:I have noticed that CI is able to facilitate Query String URLs, but not in the way I would like to user them.
Can you give an example how you want to use the query string.

#7
[eluser]kerell78us[/eluser]
[quote author="xwero" date="1207156147"]There are a few hack on the forum that don't change the $_GET global. What do you mean when you write
Quote:I have noticed that CI is able to facilitate Query String URLs, but not in the way I would like to user them.
Can you give an example how you want to use the query string.[/quote]

My understanding from CI User Guide is that to use its Query Strings I need to set the following:
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';

To mean this means that I'll always be stuck with using:
www.example.com/index.php?c=articles&m=new.

What I need is to be able to use it differently
www.example.com/index.php?news=politics&elections=democrats
www.example.com/index.php?group=123456&events=campaign&user=12345

Hence my request!

#8
[eluser]webthink[/eluser]
If you didn't have a controller or action (c,m) where would the code to handle www.example.com/index.php?group=123456&events=campaign&user=12345 go?
ie. You've obtained a group, an event and a user how do you then do anything useful with that information?

#9
[eluser]wiredesignz[/eluser]
Forget all that rubbish, The $_GET values are available via $this->imput->get(), just make sure the controller/method is in the segments prior to the query_string

#10
[eluser]xwero[/eluser]
Because CI is based on the pathinfo url syntax, query string urls are a bit left in the cold. I guess you want the www.example.com/index.php?news=politics&elections=democrats url linked to the news controller with the method elections and the values are additional parameters.

I'm don't think routing works with query strings otherwise you could do something like this
Code:
$route['news=[a-z]+?&elections;=[a-z]+'] = "c=news&m=elections&newsgroup;=$1&electiongroup;=$2"

If you want to use your own routing you can replace the router and uri library to make the query string urls work the way you want.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.