Welcome Guest, Not a member yet? Register   Sign In
reroute all methods inside default controller to base
#11

[eluser]xwero[/eluser]
I'm sure you have looked at every option but i'm just trying to point out overwriting the core libraries should be the last solution you look for.
#12

[eluser]Jagar[/eluser]
Excellent work darkhouse, I've been looking for something like this for days and here it is now, you made it possible.

Any known issues?

Thanks again
#13

[eluser]darkhouse[/eluser]
Thanks, it's been working great for me. My original purpose for it was a mini-cms type system so clients could easily manage the text and images on their site. But I also wanted the ability to have custom applications and pages without needing to create modules for a full blown cms. This did the trick. Here it is in action [url="http://www.ochc.ca/services/overview"]http://www.ochc.ca/services/overview[/url]. Most of the pages on this site are cms controlled, but there are a few that are custom, like the news section. They still have a cms for it, but it's different than the other content pages.

The only issue with it is now that the client has control of their content, they have the ability to destroy it. Now we had this client fix a number of issues but this page shows a remnant of what they had going [url="http://www.ochc.ca/services/diabetes"]http://www.ochc.ca/services/diabetes[/url] with the big fat gross blue links. But that's not really a problem with the system.
#14

[eluser]Jagar[/eluser]
I made few modifications to the code and now it's working perfect

Code:
$this->set_directory('');
        $this->set_class('home');
        $this->set_method('index');
        return array();

As you see I changed from main to home, which is my default controller

also
Code:
//return $segments;
            if($found){
                return $segments;
            }else {
                show_404($this->fetch_directory().$segments[0]);
            }

I changed it to that, because the way you had it, was displaying the Controllers/home.php controller, even when sometimes the url was wrong, so now it gives 404 error, which is what i want.

Again excellent work, this is really useful
#15

[eluser]darkhouse[/eluser]
I took out the show_404 in there because I have it in my controller. I check the database to see if there's any content for that uri, and if not, then display the 404. Anyways, glad you could use it.




Theme © iAndrew 2016 - Forum software by © MyBB