Welcome Guest, Not a member yet? Register   Sign In
Dynamic image generation script - where to put?
#1

[eluser]IanMcQ[/eluser]
Hi,

I'm new to CodeIgniter and so far I'm very impressed with the simiplicity and overall architecture of the program. It's great! I'm lovin' it so far.

Like I said, I'm new to CI and right now I have a dynamic image generation script. What this script does is it generates a "header" image for each and every one of my pages based on a query string. This make page headings look a bit cooler than a generic font that everybody has on their computer. I'd like to put this script into the "CodeIgniter" system (e.g., not have it be outside of my /system/ folder). Where should I put a script like this in CI and how will I initialize it from my controllers? Should I just put it in the /plugin/ directory?

One last thing, where do you guys put your images for your sites? Just /views/images/ or what?

Thanks!
Ian
#2

[eluser]Phil Sturgeon[/eluser]
Its not such a great idea to have your images in the system folder, teaches people a little too much about your site.

Put them in a folder next to system instead and call them using site_url() or from root like:

Quote:<img src="/assets/images/something.gif"/>

In responce to the main question, you are spot on. To me this sounds like a plugin that you could auto-load.
#3

[eluser]IanMcQ[/eluser]
Thanks so much! I've figured everything out. CI rocks!




Theme © iAndrew 2016 - Forum software by © MyBB