Part of the EllisLab Network
   
1 of 2
1
How to start a project with CodeIgniter?
Posted: 30 January 2012 06:41 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  250
Joined  01-30-2012

Hi,

I’m new to CI and trying to build an intranet for an english school.
Currently, i’m using 2.1 CI version.
I dont know how to start my project even working with PHP for 2 years.
I know what is MVC because i work with Java/ASP.net, but the question is: how to integrate correctly CI with any project? Is there any “best configuration” for CI?
How to use routes without errors?
How to use friendly urls without errors?
Use or not use Smarty?
What about security using CI?
When do i use slug and how to use them?
Please, redirect me for the right post in this forum.

Thanks and regards.

 Signature 

Time for the true display of skills.

Profile
 
 
Posted: 30 January 2012 07:01 AM   [ Ignore ]   [ # 1 ]  
Grad Student
Avatar
Rank
Total Posts:  63
Joined  08-28-2011

Hi, you can start by read the documentation.
For me, I usually use HMVC plugin which is written by wiredezigns.

Or if you want a quick start, you can use some already exist CMS, like my No-CMS, pyrocms, bancha, or fuel-CMS. They are built for developer, so that you can focus on making modules.

I think there is no error when use routing, since you don’t use nginx.

Use smarty is optional, you can pass your data when load a view in controller, something like:

$data = array("user_name"=>"Admin""login"=>1);
$this->load->view("my_view"$data); 

In your my_view.php, you can access $user_name and $login.
I think I don’t really need smarty for this.

 Signature 

Homepage : http://www.getnocms.com
Github page : https://github.com/goFrendiAsgard/No-CMS

A free CodeIgniter based CMS-Framework, It is not just another CMS !!!

Profile
 
 
Posted: 30 January 2012 07:21 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  250
Joined  01-30-2012

Well, i have read CI user guide, but the user guide is so simple and almost useless when you are close to start a professional project.
I can not build a project just reading the user guide. I need more informations about CI 2.1, not 1.7. A lot of google links direct me for simple guides.

Thanks dude!

 Signature 

Time for the true display of skills.

Profile
 
 
Posted: 30 January 2012 07:47 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  164
Joined  12-28-2011

Why don’t you start here?

http://net.tutsplus.com/articles/news/codeigniter-from-scratch-day-1/

Codeigniter docs are great. They show you how to use each library and each function.. what more do you want?

Profile
 
 
Posted: 30 January 2012 08:12 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  250
Joined  01-30-2012

A lot of topics are from 1.7 version here.
And when i get a 2.0/2.1 CI topic some ideas are useless for now and the users dont give new ideas.
Btw, thanks for the link video. I watched this video last week.

Thanks and regards.

 Signature 

Time for the true display of skills.

Profile
 
 
Posted: 30 January 2012 03:13 PM   [ Ignore ]   [ # 5 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  5399
Joined  06-19-2009

Plan it out step by step!

 Signature 

Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

Profile
 
 
Posted: 30 January 2012 06:06 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  250
Joined  01-30-2012

Ok, tell me steb by step how to remove index.php in CI?
I followed a lot of tutorials with differentes .htaccess files and they did not work for me.
I have local web server Apache 2.2.
The most of tutorials just tell me for create .htaccess and they dont mention folders, Apache rules…
Lemme know, please. User Guide tips are useless, just read and try it out on your server.

Thanks and regards!

 Signature 

Time for the true display of skills.

Profile
 
 
Posted: 30 January 2012 06:44 PM   [ Ignore ]   [ # 7 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2537
Joined  02-19-2009

Well, that really has nothing to do with CI.  That has to do with Apache.  .htaccess is something you should learn and know how to use as a web developer.  There is no one size fits all .htaccess setup.  They are entirely dependent on how YOU set your webserver up.

CI assumes you already know how to program in PHP, use webservers, css, etc.

But, .htaccess should be (in most setups) in the same directory that the main index.php resides in.
This is the one that works on my current development server, it may not work for you as I’m sure your server setup is slightly different than mine.

RewriteEngine On
RewriteCond 
%{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*)$ index.php/$1 [L] 

And of course, you have to remove index.php from your CI config files.

 Signature 
Profile
 
 
Posted: 30 January 2012 06:49 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  250
Joined  01-30-2012

My localhost is:
http://localhost/percutz/

I want http://localhost/percutz/index.php for http://localhost/percutz/ showing index.php or
http://localhost/percutz/index.php/clientes showing http://localhost/percutz/clientes.

A lot of tutorials not working for me.

My htaccess is attached here.

File Attachments
.htaccess  (File Size: 1KB - Downloads: 0)
 Signature 

Time for the true display of skills.

Profile
 
 
Posted: 30 January 2012 06:52 PM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  250
Joined  01-30-2012

Cronix, i tried it. Did not work. Sorry!
Please, any Apache configuration or config.php is needed?

Thanks and Regards!

 Signature 

Time for the true display of skills.

Profile
 
 
Posted: 31 January 2012 05:28 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  250
Joined  01-30-2012

“CI assumes you already know how to program in PHP, use webservers, css, etc.”

My situtation is:

http://localhost/percutz

In percutz folder i have my .htaccess file with those configs. (not working)
I removed index.php from config.php.
I tried to access http://localhost/percutz/teste (i have a controller called teste) or http://localhost/index and the files were not found.

I know what is Apache, .htaccess, rewrite rules, but how you can see, my configs are not working for a reason what i’m not seeing…

Bye!

 Signature 

Time for the true display of skills.

Profile
 
 
   
1 of 2
1