Where to put Smarty, Styles, Scripts, etc?

#1
[eluser]CodeIgniterNewbie[/eluser]
I need some advice on where to put the following directories:

- styles (for all my CSS stuff)
- scripts (for all my JS stuff)
- images (for all my image resources)
- Smarty library

I think styles, scripts, and images should be at the same level as my CI /system/ folder. So:

/images/
/scripts/
/styles/
/system/
/system/application/
/system/cache/
...

Is the above a good idea?

I'm not sure about where to put Smarty library, cache folder, etc.

Any assistance is appreciated. Thanks.

#2
[eluser]Johan André[/eluser]
I used smarty once (a long time ago) and I put it in application/libraries.

#3
[eluser]jonyr[/eluser]
I use an assets folders at the same level as my CI/system folder.

/assets
--->js
--->css
--->img

About Smarty, on a linux server I install Smary using "$ sudo aptitude smarty" and later I create my own library for use Smarty in CodeIgniter.

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');


require_once('/usr/share/php/smarty/Smarty.class.php');

class CI_Smarty extends Smarty {

function CI_Smarty()
{
parent::Smarty();
}

//Your code here
}

This is a good approach for use in a server enviroment. Smarty classes will be shared with other web apps.

JonyR

#4
[eluser]Jamie Rumbelow[/eluser]
Hey CodeIgniterNewbie,

I generally have a index.php-level assets/ folder, which holds subfolders for all my static assets. As far as Smarty goes, the two aforementioned techniques work fine. It's up to what you feel comfortable with.

Jamie


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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