I am looking at few PHP frameworks and noticed that they all offer re-usable, community-contributed code in various forms:
-Symfony 2 (bundles): http://knpbundles.com/
-Zend Framework 2 (modules): http://modules.zendframework.com/
-CakePHP (plugins): http://plugins.cakephp.org/
-Yii Framework (extensions): http://www.yiiframework.com/extensions/
but I can't find anything for Code Igniter (I saw in this SO post that Code Igniter used to have plugins that were replaced by helpers, but when I google for "Code Igniter helpers" or "Code Igniter plugins" I can't find any repositories).
What is the name for Code Igniter community-contributed and reusable libraries? Can you share a link to their main repository?
You can have a look at sparks and HMVC.
You didn't find this? https://github.com/EllisLab/CodeIgniter/wiki/_pages
Also checkout their forums too.
The previous name plugin within codeigniter didn't really mean the same thing as plugins for Cake or Bundles for Symfony
check this one awesome codeigniter there is a list of different resources for CodeIgniter
Related
I am looking for online tutorials or books that cover in-depth Codeigniter HMVC. Most of the online tutorials I have found only cover the very installation of HMVC. And I can not find any books at all on Codeigniter HMVC. All help greatly appreciated.
The best tutorial is this one
https://www.youtube.com/watch?v=8fy8E_C5_qQlist=PLBEpR3pmwCawDZ6FgNYoyvicEz4HrJPec
The tutorial it is made on codeigniter 2 and hmvc 2 vesions
But still the same setup to give you a idea.
The HMVC from here https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc only made now for codeigniter 3
They have not reloaded codeigniter 2 versions on.
The only difference really is that you need to make sure you have the first letter of your class and file names as Uppercase.
I don't want to be negative but, Codeigniter does not come with HMVC "out of the box" so there aren't any official documentation or books that covers the subject, however, there are some extensions that allow CI to use HMVC architecture, each extension has its own documentation, some are better documented than others.
some codeigniter HMVC extensions:
https://github.com/Crypt/Codeigniter-HMVC
https://github.com/jenssegers/codeigniter-hmvc-modules
this one needs some hacks for CI2.x (I didn't try it with CI3 yet)
https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc
this one is all in one (CI + HMVC extension)
http://lab.clearpixel.com.au/2011/10/modularise-your-codeigniter-2-applications-with-modular-extensions-%E2%80%93-hmvc/
I've been learning how to work with CodeIgniter for a few weeks now, but I'm a little stuck on how to build a real application with it.
Are there any open source demo's that I could use to see how the flow works in there.
Couldn't find anything on Google.
Getting Started with CodeIgniter and How to Create All Those Great Apps:
Contains 12 easy to follow tutorials to build small apps!
4.1 Build an RSS 2.0 Feed with CodeIgniter
4.2 Generating PDF files using CodeIgniter
4.3 Building a Shopping Cart using CodeIgniter’s Shopping Cart Class
4.4 CodeIgniter Clan Site- Part1 & Part2
4.5 Validating Web Forms with the Code Igniter
4.6 A sample Facebook application with CodeIgniter
4.7 CodeIgniter and Ajax Using JQuery Tutorial
4.8 Real Live Search with Pagination
4.9 How to Update your Twitter Status with CodeIgniter
4.10 Codeigniter Event Calendar
4.11 Live search with CodeIgniter and Mootools
4.12 Creating a File Hosting Site with CodeIgniter
Get a look at the following scripts and apps created by CodeIgniter on hotscripts.com.
http://www.hotscripts.com/search/all-scripts/codeigniter
Please use this github project for demo Codeigniter CMS Aplication
https://github.com/daylightstudio/FUEL-CMS/tree/master/fuel
I looked around a bit and I found this site http://qoodles.phpfogapp.com/ it was built with codeigniter and the source code is on github: https://github.com/hush2/qoodles
I am just a beginner in code igniter. I have just downloaded the code igniter framework. But i don't know that where should i keep my html, php files and stylesheets, images etc. Is there any procedure to do the things? Please guide me.
CodeIgniter has an awesome user guide that will come with the install you can read through (or read it online at - http://codeigniter.com/user_guide/ ), or you can watch some of the videos on their site - http://codeigniter.com/tutorials/
In comparison to most other frameworks you're going to find they have maybe the smallest learning curve and great documentation. I would also recommend learning basic PHP and getting familiar with your web environment maybe before beginning.
I used these tutorials to help get me started with the framework haven't look back since! http://net.tutsplus.com/sessions/codeigniter-from-scratch/
hi I am a weekend coder and picked up CI about a year ago.
It helped me a lot.
The best tutorial I found was on the IBM's developer site. It runs through putting together a simple application. Admittedly, there's nothing in it about directory and file placement but it helps cement ideas about how models, views and controllers (MVC), and why MVC is so helpful. Because the basic idea is quite simple, it's worth running through a simple CI tutorial again and again till you 'feel' or intuit the basic helpfulness of the setup.
Things like JS, CSS files can be kept in their own folders at the first level of your website folder e.g /js or /css or /images. You ask about PHP files as well. PHP files which you, the coder, write, are either 'views', 'models' or 'controllers'. These go in the folders with those names in the /application folder e.g /application/views/yourview.php or /application/controllers/yourcontroller.php. The CI install comes with a default view file and a default controller, which you are probably already aware of.
The files inside /application/config are important as well. Read the user-guide about tweaking these files. The most obvious tweaks are to database.php to connect to your db, autoload to give automatic use of CI helpers/libraries which you can choose, and to config.php to give CI the name of your website e.g the name you give to '/'.
The file 'index.php' comes with the CI installation (/index.php). You don't need to fiddle with it at all really except to determine the level of error reporting you want ('environment') and that's not a priority at all. But it's important to remember this about index.php - that CI uses it as the essential reference for defining paths to useful folders like CSS or images. So even if your view file is in /application/views, if it refers to an image like a logo.gif in /images for example, the path to it is just /images/logo.gif. It is not anything more complicated like ../../images/logo.gif.
I hope that helps.
Tom
Offline version of CodeIgniter user guide is available with CodeIgniter which already downloaded by you.
just extract your CodeIgniter zip file in your localhost server root directory,
Then http://localhost/www/CodeIgniter_2.1.2/user_guide/ open this url with browser ,here you can access offline version of CodeIgniter user guide.
Here I am using wamp server so I used this url, If you are using xampp server then please use http://localhost/CodeIgniter_2.1.2/user_guide/
Okay this is what I would usually do for code igniter
here is my directory structure.
CI App Path (e.g "c:\xampp\htdocs\ci_app_name" )
-application
-system
-assets
--css (new folder , where css files will be included)
--js (javascript and jquery libraries location)
Basic HTML and PHP files should be location
CI_app_pah
-application
--views (this is where to put HTML and PHP files)
For other things such as Controller , Models and Views , you can't put any where but put in their related area.
That will be
CI app
-application
--controllers
--models
--views
I just started working with codeigniter and i found it easy to work with. I recently came across expressionEngine and seems like a great add-on for codeigniter. My questions is, after i install expressionEngine, will that change the way i work with codeigniter where code goes in controller and view in the view folder.
Apples and Oranges,
Codeigniter is a framework that allows you to create a Web Application like an admin system. The customer does not add any content or touch anything. You can add CMS functionality to your codeigniter Web Application however in this sense you are actually building your own CMS on top of your Web Application.
ExpressionEngine, built with codeigniter, is a CMS that allows clients to add content without actually giving them access to your HTML - That is not to say that you can't give them access but this would defeat the purpose of a CMS.
Because expressionEngine is built on top of codeigniter it is possible to access it's functionality (I've seen posts on this but haven't tried it yet myself).
I think you would use the two together if you had a Web Application with a Website around it. In this way the client would be able to add content to the website and even some of the Application information areas but you would use Codeigniter to build the Web Application's functionality.
I don't think it would be a waste of a week to get into expressionEngine. LevelUpTuts has some great video tutes on expressionEngine 2 and try Nettuts+ CodeIgniter from Scratch for, suprisingly, codeigniter.
(For those who are new to CMS) The general process of development is:
- Translate your website design to HTML/CMS/jQuery
- Translate your HTML to expresionEngine Templates
- Define your Channels which your clients will add content to
- Embed those Channels into your templates to display that content dynamically
- In administration, assign permissions to who can add content to which channels for your clients
It will start to make sense once you try it.
You can't layer ExpressionEngine on top of CodeIgniter since CodeIgniter is extracted from ExpressionEngine. It's EE all the way, or use CodeIgniter to build your own thing.
ExpressionEngine supports PHP code inside it's templates if that's what your asking.
EE(2.0) is a CMS built on the CI2.0 framework.
If you are familiar with CI you will be able to hack, modify and extend EE with ease, as well as develop your own plugins etc.
You can of course, have an EE installation and a CI installation on the same server, but the two do not interact directly - CI is a framework, EE is a CMS.
Not sure I would call EE an "add-on"...
EE is it's own standalone Content Management System. Generally EE and CI are not meant to be mixed. While EE is built on CI, it is not meant to be extended/changed etc... They (Ellislab) will tell you, If EE doesn't fulfill your requirements, then you need to use CI exclusively.
Plus, a 300$ license is pretty expensive for something that you view as an "add-on".
I would reccomend looking into PyroCMS, which is also a free (beer and speech) CMS built on CI that directly allows for "Module" development which is straight codeigniter development with a few added meta/installation files that would allow you to build the extra functionality you need within the Codeigniter structure.
There are four files for expression engine.
For Example i have module named "Products"
1)mcp.products for admin end or admin control panel just admin controller in pyrocms
2)mod.products front end code is placed here 3)tab.products tabs are here 4)upd.products installation code. There are views in "views" folder and model is in "model" folder in our case "products_model". Just copy your controllers methods and paste them in mcp.products.php on admin side. and copy your controllers methods and paste them in mod.products.php on front end side. in udp file place the table structure.and it will treat as you are in Pyrocms.
Just a quickie. I have tested DOMPDF in a Doctrine enabled Codeigniter 1.7.2 installation and everything works fine. However, when the Cart library and URL Helper are autoloaded as well, DOMPDF doesn't work. BUT, if you 'un-autoload' (ie. dont use) any one of Doctrine, the URL Helper or the Cart Library, DOMPDF works.
Is just a bit annoying as I need DOMPDF, Doctrine, the URL helper and the Cart Library all working together.
Could anyone suggest anything please. Any help very gratefully recieved.
Regards,
Matt
mPDF is bloody brilliant and much much better than domPDF, it works in the same way too in that it reads in a html file with your php code placeholders or whatever to add the dynamic content. I have written a small tutorial on how to use it with Codeigniter if you need it.
If you're using DOMPDF 0.5.1 you could be running into conflicts between the __autoload() methods used by the various libraries. The 0.6.0 code base (currently in beta) has been updated to use spl_autoload_register() which helps to prevent auto-loading conflicts between different libraries.