Welcome Guest, Not a member yet? Register   Sign In
Bootstrapping Advice
#1

[eluser]richard_ctv[/eluser]
Hello, I am new to these forums and to CodeIgniter.

I have an application I'm working on, and I have got bogged down, so I was looking for a framework to use. I'm very impressed with CodeIgniter (compared with the dozen or so other I have looked at so far) - the system actually makes sense to me - but I have a couple of issues I need to solve quite quickly, hence my post.

I will port the existing code to the framework (this is trivial given I already use a basic MVC layout).

The four problems I have are:

1. I run separate blog and forum software alongside my main app (in /blogs and /forums). I don't want these requests to code to CodeIgniter. Possible ?

2. I need to use the forum authentication within the rest of the site (the CodeIgniter bit).

3. The length of URLs is long. The 'Controller' component might have more than one level

e.g. /category/sub-cat/sub-cat/sub-cat/item-to-view/part-1/fragment-1

There can be a number of sub-categories (the use can create these, but they wont go totally crazy), then the item to view. The item to view may be split into parts, and those may have fragments. So the transistion between the controller and he action changes. If there is no part or fragment then that is the last level.

4. I need to share some components from the main site in the other applications - for example parts of the header and footer (but not all of the header).

I hope that makes sense. :-)

Many thanks for any comments.

Richard
#2

[eluser]marcoss[/eluser]
[quote author="richard_ctv" date="1182652191"]1. I run separate blog and forum software alongside my main app (in /blogs and /forums). I don't want these requests to code to CodeIgniter. Possible ?
[/quote]

Yes, just set the exceptions in the .htaccess file so that they won't get routed over CI.

[quote author="richard_ctv" date="1182652191"]2. I need to use the forum authentication within the rest of the site (the CodeIgniter bit).[/quote]

The easiest way i can think of is to use the forum database to authenticate your users and retrieve information about them, and keep the forum logic to register/login.

Otherwise, you can alway implement an user management interface that is compatible with the current database schema.

[quote author="richard_ctv" date="1182652191"]
3. The length of URLs is long. The 'Controller' component might have more than one level

e.g. /category/sub-cat/sub-cat/sub-cat/item-to-view/part-1/fragment-1
[/quote]

This is insane, if you really need to keep this structure you can use the routes, but i would say that this is a good time to re-think that architecture.

[quote author="richard_ctv" date="1182652191"]4. I need to share some components from the main site in the other applications - for example parts of the header and footer (but not all of the header).
[/quote]

Doable. Just split views in small chunks, then call them as needed.
#3

[eluser]richard_ctv[/eluser]
Thanks for the answers.

I am going to rework the URL schema - I have been trying work out how to parse an arbitrary length URL, and it is not a simple task.

Now on to porting the existing code...

cheers,
Richard




Theme © iAndrew 2016 - Forum software by © MyBB