Welcome Guest, Not a member yet? Register   Sign In
Extracting Web Application
#11

[eluser]wiredesignz[/eluser]
Oops xwero, I prefer $this->input->get() after the segemnts, anyhting else is just... old fashioned :lol:
#12

[eluser]xwero[/eluser]
[quote author="wiredesignz" date="1207159634"]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[/quote]
I was thinking how kerell78us wanted to use the url that's why i asked for the examples and he wants a only query string url but with routing like it exists for the pathinfo urls.

Another long shot is routing everything through the default controller.
#13

[eluser]kerell78us[/eluser]
Guys,
Thank you all for your input.

How difficult is it to remove the application logic from CI and modify the aspects that used CI.
Would that be a plausible solution?

how would I rewrite the following to accommodate query string url?

$data = array();
$data = $datas;

if($this->uri->segment(3)!='') {
$newsId = $this->uri->segment(3);
} else {
$newsId = $userId;
$data['view_news'] = true;
$data['user_id'] = $userId;

// code continues...
#14

[eluser]webthink[/eluser]
The critical question was asked above 'why do you want to do this?' Codeignter is a very powerful framework, its very likely that whatever you are trying to accomplish can be accomplished within the framework. If you could provide some insight into why you need to do this, we might be able to provide better answers.
It's starting to sound as if you want to take an application that was written in CodeIgniter and reverse engineer it to be a non MVC procedural web application. In that case it goes quite a bit further than query strings vs url segments.
#15

[eluser]Jamie Rumbelow[/eluser]
You could do something like this:

$data = array();
$data = $datas;

if($this->input->get("politics")!=’’) {
$newsId = $this->input->get("politics");
} else {
$newsId = $userId;
$data[’view_news’] = true;
$data[’user_id’] = $userId;

Its the same priciple - just using $_GET instead of segements.

I'l look into writing a class that does exactly as you described.
#16

[eluser]kerell78us[/eluser]
[quote author="webthink" date="1207165600"]
It's starting to sound as if you want to take an application that was written in CodeIgniter and reverse engineer it to be a non MVC procedural web application. In that case it goes quite a bit further than query strings vs url segments.[/quote]

You are correct, that's exactly what I am trying to accomplish. However, it's not entirely procedural. If I am able to accomplish the usage of query string url in the manner that I have stated, then certainly I would keep my app in Code Igniter. I wish to share mash-ups with a couple of sites and we're not familiar with frameworks.

So I am basically doing some research.
#17

[eluser]kerell78us[/eluser]
[quote author="Jemgames" date="1207166299"]You could do something like this:

$data = array();
$data = $datas;

if($this->input->get("politics")!=’’) {
$newsId = $this->input->get("politics");
} else {
$newsId = $userId;
$data[’view_news’] = true;
$data[’user_id’] = $userId;

Its the same priciple - just using $_GET instead of segements.

I'l look into writing a class that does exactly as you described.[/quote]

I'll appreciate any assistance that could be had.
#18

[eluser]Jamie Rumbelow[/eluser]
I'm thinking about trying a hook, but I think you would have to make loads to make sure that any URL's generated by CI are query strings.




Theme © iAndrew 2016 - Forum software by © MyBB