• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Questions about CI

#1
[eluser]artificialkid[/eluser]
Hi there, after a while on finding some framework to learn, i decided myself for code Igniter, ate the same time i´m learning php also.

I just have some questions:

1. If I want do develop a web application (site) with a Administration area, the are 2 CI applications I suppose.

2. in the database library, how can i retrieve a selected number showing for example blog entries, or news, etc. Does CI as methodos for this, or I have to do QUERYS for each action I need

3. Does the pagination (that i tried, without success) can bee used for this?

4. how about localization, is it possible?

for now i think is all, because these are the problems I just come across.

thanks you all

#2
[eluser]sikkle[/eluser]
Hi there,

1. just create maybe a directory or any routing setup to build your admin controller with higher level of Permission. maybe take a look at FreakAuth for understand this point.

2. Take a look on the user manual at http://ellislab.com/codeigniter/user-gui...mples.html

3. Pagination are to make this : « First < 1 2 3 4 5 > Last » (http://ellislab.com/codeigniter/user-gui...ation.html) this is what you need ?

4. localization you mean, CA_fr, Ca_en ? or just english, french etc. ?

good luck !

#3
[eluser]Michael Wales[/eluser]
1. You won't need two separate applications - just do some reading on controllers. Some of your controllers will be for simply pulling data and sending it to your views, while others will be secured and will allow you to insert/update records.

2. I'm not sure what you mean by this... a selected number? Are you only wanting a certain number of results returned (for example, 10 blog entries)? If you use the Active Record class, it would be similar to this:
Code:
$this->db->get('entries', 10, 0);

3. Pagination is used to modify parameter of your SQL queries. In the above example (answer #2) I used a SQL query generated by the Active Record class, with an offset of 0 (start at the first record based on however you decide to order the results). The Pagination class makes it easy to modify this offset, therefore cycling forward or backward through results.

4. The Language class provides functionality for localization, and is now configurable via autload as of CI 1.5.4 (ChangeLog).


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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