Welcome Guest, Not a member yet? Register   Sign In
How To simply theme you CodeIgniter project?

[eluser]Blaze Boy[/eluser]
this is a new article of mine of how to theme codeigniter in a good extensible way, you'll love it, and i really want your feedback... be positive.
Quote:Did you ever wanted to make your project theme-able, have you stuck in the maze of theming CodeIgniter?

We’ll explain the best way to theme your project in an extensible way, you’ll step-by-step build a theme helper with a configuration file and a theme files load function like the view files load function (we’ll extend the Loader class for that), your partials will have the way to add CSS and JS requirements to the theme head and the JavaScript link lines will have the 2 options (at head JS, at foot JS (Yahoo specs)).


We need some view files to be replaces with some others in the run time (switching themes)
We need to load theme files just like the view files
Themes folder in separated from the application view files
Configuration file to determine the path to themes folder, the default theme name, DOCTYPE, page character set, index page title, a text before page title and site name, text after page title, Some arrays that will be used when adding the requirements like meta lines, CSS files, JavaScript file, and finally a variable that tell us where to put JavaScript lines.
Some help function that
switch theme
get-set site name
get-set page title
get page head content
get page foot content (only in case of JS at foot)
functions that add required files to the head arrays (CSS, Meta, JS)
Function to craft a URL to theme files (Images, sounds…etc.)
functions to add-return CSS,JS,META, DOCTYPE
Finally a function to load theme files just like the one we’ll add to Loader class, but it’ll be easier to use it in theme files to load other partials instead of making instance of CI then use the loader.
Note: we need that function to return output by default.
the rest of the article on my blog : LINK REMOVED

Watch out! This site will try to install malware. Don't click the link!

Confirmed, Blaze Boy, WTH?

[eluser]Blaze Boy[/eluser]
sorry guys, server wasn't totally secured.... it's now safe try it. it's really useful.

[quote author="Blaze Boy" date="1273797383"]sorry guys, server wasn't totally secured.... it's now safe try it. it's really useful.[/quote]
No, there are still viruses.

For readers of this thread.
1, Don't click - there are viruses!
2, Use COMPER Template Parser - quick soultion for you!
Link: http://parser.comper.sk/en/docs/ci/#T


[eluser]Jamie Rumbelow[/eluser]
The link definitely has a virus, and thus has been removed. When it is safe to view again, the author of this thread can contact a moderator for approval and re-linking.



Theme © iAndrew 2016 - Forum software by © MyBB