CodeIgniter from Scratch Day 7: Pagination

CodeIgniter from Scratch Day 7: Pagination

Oct 1st in Screencasts by Jeffrey Way

In these last two weeks, I've received bunches of requests for a CodeIgniter pagination screencast; so that's what we'll be reviewing today! As a bonus, we'll also take a look at the super convenient HTML Table class.

PG

Author: Jeffrey Way

Hi, I'm Jeff. I'm the editor of Nettuts+, and the Site Manager of Theme Forest. I spend too much time in front of the computer and find myself telling my fiance', "We'll go in 5 minutes!" far too often. I just can't go out to dinner while I'm still producing FireBug errors...drives me crazy. During my free time, I sporadically write articles for my own personal blog. If it will keep you in the good graces of the church, follow us on Twitter.

Catch Up

Day 7: Pagination

Other Viewing Options

Pagination

Thank you, Screencast.com!

Screencast.com
...for providing the hosting for these video tutorials.


Related Posts

Check out some more great tutorials and articles that you might like

Enjoy this Post?

Your vote will help us grow this site and provide even more awesomeness

Plus Members

Source Files, Bonus Tutorials and
More for $9 a month for all TUTS+
sites in one subscription.

Join Now

User Comments

( ADD YOURS )
  1. PG

    Vitesse October 1st

    Yeah!!

    Thank you Jeff :D

    Been waiting for this!

    ( Reply )
    1. PG

      enatom October 2nd

      ENOUGH CODE-IGNITER TUTS…… plz.

      ( Reply )
      1. PG

        Brian October 4th

        Vitesse! If You don’t appreciate Jeffrey Way screencast for Codeigniter then maybe you should check other marketplaces.

    2. PG

      Khalil October 2nd

      Yes, this is good… Thanks

      ( Reply )
      1. PG

        Fynn October 4th

        Indeed, I’ve been really enjoying all the CI tuts! Thanks Jeff. (Although I’ve figured out CI pagination after I’ve watched the first few tuts of CI here)

        Ps.. I would really like to see a CI ACL tut :)

  2. PG

    myname October 1st

    2nd

    ( Reply )
  3. PG

    Ignas October 1st

    really nice… run it through and liked. I’ll look this deeply later, but thanks!

    ( Reply )
  4. PG

    emcgfx October 1st

    Thank you Jeff, ones again for posting my request. Very good video. I also like that you include the offline download version of the video. Thank you so much.

    ( Reply )
    1. PG

      Jeffrey Way October 1st

      Yep. I’m also upload iTunes and FLV versions right now. I’ll update the article when they’re ready.

      ( Reply )
      1. PG

        zaiful October 1st

        Hey Jeffrey, any chance to upload CI day 5 and day 6 videos to blip.tv, please. I still couldn’t download them from screencast.com :( really missing the sequence

      2. PG

        Jeffrey Way October 1st

        Okay – added download link, iTunes version, and FLV (Blip) version.

      3. PG

        zaiful October 3rd

        Couldn’t find the flv version download links for Day 5 and Day 6 on blip.tv :(

        Anyway, thanks for giving reply at least!!

  5. PG

    Henry October 1st

    Thanks for this Jeff! I keep wondering why you aren’t using Windows any more…

    ( Reply )
    1. PG

      Jeffrey Way October 1st

      I used to use Windows because that’s what Camtasia Studio was made for (recording software). But honestly, I think that a Mac is better suited for me.

      ( Reply )
  6. PG

    Montana Flynn October 1st

    I love these CodeIgnitor tutorials! I would love to see some plus tuts on building simple CMS’s and such…

    ( Reply )
  7. PG

    C.44 October 1st

    Ah :) more CI love from Jeffrey :) should keep me occupied for a little while again.

    Btw, do you think you could do something AJaX related in the next one ? Hopefully we’ll see the other screencasts prior to this one on iTunes aswell ?

    ( Reply )
  8. PG

    Juan C Rois October 1st

    Jeff, thanks for this tutorial, it’s super useful, I’m going to implement this for one of my projects.
    I have a question about the previous tutorial (Code Igniter Day 6), related to the session and cookies. Can I post it here or is there better way to ask you. It’s keeping me up at night and I have not been able to find an answer elsewhere.

    Thank you very much for all the quality material that you provide for the community.

    ( Reply )
    1. PG

      yellow_leopard October 1st

      I’d love to see Mr. Way release a follow up CI tut on some advanced cookie and session stuff to better secure applications – maybe even include a bonus like working with the new cart class and ecommerce.

      ( Reply )
  9. PG

    Philo October 1st

    Nice Tutorial Jeffrey! :)

    ( Reply )
  10. PG

    Jerichvc October 1st

    Hi Jeff, maybe in future session you would consider ajax to ci like jquery lib to it. I think it will show the quickness of CI since day 1 of ci series. i’ll wait for it.
    thanks.

    ( Reply )
  11. PG

    Hooman Asgari October 1st

    Finally out, took so long but definitely worth the wait, Thanks Jeff

    ( Reply )
  12. PG

    Dirk Franssen October 1st

    Way to go Jeff! I’m really enjoying those screencasts! Thx

    ( Reply )
  13. PG

    emcgfx October 1st

    Hey Jeff, can you also please upload mp4’s for the following videos you did previous. I would like to re-watch them offline on my laptop. I hope I’m not asking to much. Thank you buddy.

    Day 1: Getting Started With the Framework
    Day 2: Database Selecting Methods
    Day 3: Sending Emails
    Day 4: Newsletter Signup

    ( Reply )
    1. PG

      Jeffrey Way October 1st

      Okay – I’ll try to get those up this week.

      ( Reply )
      1. PG

        arnold October 2nd

        wow! thanks jeff

      2. PG

        emcgfx October 2nd

        Thank you Jeff ;-) I’ve watched your pagination video yesterday, and followed it up. You did everything almost exactly what I did just couple days before this video :-) Of course it took me a while to figure it out. But what I did is to write special function for pages() and just re-used it in all of my pages :-) It works great.

    2. PG

      Juan C Rois October 1st

      I got the first 5 from Itunes

      ( Reply )
  14. PG

    emcgfx October 1st

    I’ve just thought of another idea for your screen casts ;-) You can add some kind of low-level music in the background. Will make your videos more fun LOL

    ( Reply )
  15. PG

    emcgfx October 1st

    Here is data tables for this video, if any one interested ;-)
    http://gravityfx.org/pub/ci/ci_day7.sql

    ( Reply )
  16. PG

    Bretticus October 1st

    I do primarily server-side coding. I don’t get my hands on too much design. I always laugh when Jeff says something along the lines, “Gotta do some CSS. Skip ahead if this bores you…” I think those are by far the most fascinating parts!

    ( Reply )
    1. PG

      Jeffrey Way October 1st

      Haha. I just say that when the focus leaves CI for a few minutes. I agree with you. :)

      ( Reply )
      1. PG

        emcgfx October 2nd

        I love the css part of the tutorials and never skip them ;-) I think you should really do some CSS videos in the future, like maybe CodeIgniter web 2.0 style template with XHTML Strict, CSS, maybe even some Ajax.

  17. PG

    Miles Johnson October 1st

    Since you are doing CI tutorials, I could submit many CakePHP tutorials, maybe. Haha.

    ( Reply )
    1. PG

      Bretticus October 1st

      Go for it! I’d love to see some CakePHP tuts (seems like the ones on the site are a bit old. Maybe I should go look again. ;-)

      ( Reply )
    2. PG

      Paulio October 3rd

      I’d love to see someone put up some decent CakePHP tutorials even just for the comparison. I’m using CI now but I have no idea which framework would be best.

      ( Reply )
  18. PG

    Ricardo Machado October 1st

    To say the truth … Although I’ve made a few work using CI the truth is that, the framework, is deprecated ….

    … for a full OOP support… try Kohana… Same thing, but more advanced :)

    ( Reply )
    1. PG

      Jeffrey Way October 1st

      I wouldn’t say that by any means. There’s a reason why it’s one of the most popular PHP frameworks available – if not THE most.

      ( Reply )
      1. PG

        Alexander Suraphel October 4th

        Jeff Please make download link for the other Tutorials too. I use 56k modem.

  19. PG

    w1sh October 1st

    You’re my favorite person online, Jeffrey. Keep up the excellent work.

    ( Reply )
    1. PG

      Jeffrey Way October 1st

      Thank you!! :) But really, I’m rather boring.

      ( Reply )
      1. PG

        Mike Schneider October 1st

        Now he’s just fishing for comments =D

        Solid tutorial and I think the depth of the tutorial was a perfect. Not too short and not an overwhelming amount of info.

        Also, maybe I missed it in the video, but how would you go about changing the links from 1,2,3 to 1-4,5-9 and so forth?

  20. PG

    Mini0n October 1st

    Nice! =)

    When will there be an CodeIgniter + jQuery tutorial? That would be awesome!

    ( Reply )
    1. PG

      Jeffrey Way October 1st

      I guess that will be the next one. Lots of votes for CI Ajaxy stuff. :)

      ( Reply )
      1. PG

        Mini0n October 1st

        You’re the man! xD
        Thanks. These tutorials really help.

        Keep up the awesome work! =)

      2. PG

        Shane October 2nd

        Yeah, I’m up for the jQuery/AJAX stuff. Definitely.

        Fantastic stuff Jeffrey, even if you are boring ;)

      3. PG

        Damon Sharp October 2nd

        I would like to place my vote for a return to the previous ci sessions tut, but with database verification for more security. Thanks!

  21. PG

    Andy October 1st

    Jeff,

    Kudos on another great tutorial.

    Would love to start seeing some jQuery thrown in to show Ajax requests and using jQuery to “2.0″ things like pagination.

    Keep up the great work

    ( Reply )
    1. PG

      Andy October 1st

      And I meant to add… everybody go vote for nettuts in “thenetawards – http://thenetawards.com” as vodcast of the year and blog of the year (otherwise Jeffrey is gonna stop making these great videos!)

      This endorsement has not been sponsored or endorsed by Net.tutsplus.com ;)

      ( Reply )
      1. PG

        Jeffrey Way October 1st

        haha. No – I won’t stop anytime soon. But it sure would be fun to win. :) I think it’s going to come down to us and CSS-Tricks – and they deserve it just as much as we do.

  22. PG

    Riley October 1st

    Just wondering why pagination uses the record number for the paging.

    I made my own paging to be like this http://matrixdigital.com/portfolio/page/2/5 where 2 is actually page 2 and 5 is how many records to show. Second one is actually optional.

    I dunno I guess personal taste but I find it weird to see 80 in query when moving to page 2.

    also I’d like to put my vote in for a cart class tutorial. thnx

    ( Reply )
    1. PG

      Bretticus October 1st

      Codeigniter wanted to make it as easy as just passing the next offset. I’m sure you could extend the Pagination library to render links this way and then just algorithmically compute the offset before sending it as a parameter.

      ( Reply )
  23. PG

    Jaspal Singh October 1st

    Nice tutorial on implementing the pagination with CodeIgniter.
    Thanks for sharing.

    ( Reply )
  24. PG

    Kevin October 1st

    As usual a good tutorial – keep them coming. Plus I agree with Andy and would love to see some JQuery

    ( Reply )
  25. PG

    Javed Gardezi October 1st

    Finally its here.. good JW
    i have also seen CI pagination tutorials in this site http://www.weblee.co.uk/ its also detailed.

    I think this is series wise tutorials so i would not skip it!!!

    ( Reply )
  26. PG

    rizq October 1st

    Finally…… CI Day 7 series…..

    Thanks Jeff ;)

    ( Reply )
  27. PG

    Vindo October 2nd

    Very Useful!!

    ( Reply )
  28. PG

    arnold October 2nd

    Finally a pagination tut… yes Im excited!..thanks jeff…
    you always bring quality tuts in here

    ( Reply )
  29. PG

    aimad October 2nd

    You Are the Good Sir :)

    tks for all this tutorial i’m view all codeigniter series with you it’s gooe .

    ( Reply )
  30. PG

    Tutorial City October 2nd

    the tutorial is very good. I would like to see a tutorial on how to create custom helpers/plugins for codeigniter, and maybe use AJAX to take it to the next level.

    Thanks JW ;)

    ( Reply )
  31. PG

    shin October 2nd

    I just posted “How to use Codeigniter captcha plug-in Part 1″ here.
    http://www.okadadesign.no/blog/?p=276
    Someone may be interested in reading this.

    ( Reply )
  32. PG

    Mike October 2nd

    Thanks, Jeff! Honestly i was waiting for such tutorial.

    ( Reply )
  33. PG

    hary October 2nd

    where you got that player skin.
    I developed similar skin 2 moths ago.

    ( Reply )
    1. PG

      Jeffrey Way October 2nd

      It’s the standard skin from screencast.com.

      ( Reply )
  34. PG

    Web 2.0 Tools October 2nd

    Very nice tutorial, great work…

    ( Reply )
  35. PG

    Damon Sharp October 2nd

    Jeff-

    Thanks for this. Explained very well. One question though. When I use .htaccess to remove the index.php do I need to set the uri_segment to 2? I tried it out yesterday and briefly couldn’t get it to work. I am about to get back into it right now, but if could maybe explain this a little I would appreciate it. Thanks!

    ( Reply )
    1. PG

      David Ferguson October 2nd

      No you wouldn’t. The first URI segment is the controller that is being loaded, the second is the method that is being calling within that Controller, and the 3rd segment on are parameters being passed to that method. Using .htaccess to remove index.php doesn’t change this at all.

      ( Reply )
      1. PG

        Jeffrey Way October 2nd

        Correct.

    2. PG

      Damon Sharp October 2nd

      Yep, figured that out right after I sent this. It was almost quitting time yesterday when I started to implement this. Didn’t add ‘index’ as the second segment for my base_url config param. All fixed. Thanks for the replies guys.

      ( Reply )
  36. PG

    Lowkase October 2nd

    I recently dried up my pagination code and shoved it in a override class. Here is the code:

    CI =& get_instance();

    // Base configuration
    $config['base_url'] = base_url() . $base_url;
    $config['total_rows'] = $total_rows;
    $config['per_page'] = $per_page;
    $config['uri_segment'] = $uri_segment;

    // Styling
    $config['full_tag_open'] = ”;
    $config['full_tag_close'] = ”;

    // Init
    $this->CI->pagination->initialize($config);

    return $per_page;
    }
    }
    ?>

    Save the file as MY_Pagination.php and shove it in your application/library directory.

    Here is an example of the call:

    $total_rows = $this->pagination->set_pagination(’index.php/exampleURL/index/’, $this->example_model->select_all_count(20), 3, 10);

    I return the total_rows so that I can shove it into the main select call:

    $data['result'] = $this->example_model->select_all( $total_rows, $this->uri->segment(3));

    If your going to have a lot of pagination strewn about your website then drying up your code into an override class is the way to go.

    I haven’t styled up my pagination yet, but after watching the tutorial I am inspired and it should only take a few minutes.

    Thanks for your hard work on the CI front Jeff.

    Cheers,

    Lowkase

    ( Reply )
  37. PG

    Lowkase October 2nd

    Oops,

    Guess I can’t copy paste an entire class.

    If you want the source for the MY_Pagination.php class just shoot me a quick email.

    Cheers,

    Lowkase

    ( Reply )
  38. PG

    joe October 2nd

    we’ll basically repeat ourselves here jeff,
    you deserve some kinda award for all this man,brilliant

    ( Reply )
  39. PG

    David Ferguson October 2nd

    JW: Wow. You flew through that haha. Not to the point that it made it hard to follow, just seemed a bit more rushed that some of your others. Great tutorial as usual though, there was one thing I wanted to mention/ask though:

    Since you were using the HTML Table library anyway, do you not think it would have been better to use the HTML Table Template option (mentioned in the CI User Guide as Changing the Look of Your Table at http://codeigniter.com/user_guide/libraries/table.html) to define the some of the table characteristics rather than using the css and jQuery to do it all? The main advantage being that, you can style multiple tables within the same page (probably wouldn’t happen, but just in case) using the template rather than having to get really specific with css, and it would eliminate the need for using jQuery to stripe the rows, as CodeIgniter (with the templating) allows you to set the code for row_start and row_alt_start.

    Not a big deal, was just something I thought would have been cool to mention..

    ( Reply )
    1. PG

      Jeffrey Way October 2nd

      Hey David. Perhaps. To be honest – I think I mentioned this in the video – but I haven’t used the HTML table class that much.

      You’re right that this one was a bit more rushed. It’s because it was the second run-through. The first version came in at 30 minutes….and I lost the entire thing to my computer freezing up. So painful. :)

      ( Reply )
  40. PG

    ali baba October 2nd

    Jeffrey

    I notice you didn’t use model in this tutorial.

    Is it to save time?

    otherwise great tuts. looking forward to next one

    thanks

    ( Reply )
    1. PG

      Jeffrey Way October 2nd

      I did it to demonstrate that CI can be as flexible or strict as you’d like. I would personally have used a model.

      ( Reply )
      1. PG

        Ali Baba October 16th

        Hey Jeffrey

        When next one comming?

  41. PG

    David October 2nd

    As always great tutorial. Looking forward to more.

    ( Reply )
  42. PG

    Sunil October 2nd

    Great Turorial ! PHP community appreciates your contribution…

    ( Reply )
  43. PG

    aryan October 2nd

    Jeff,

    Next tuts on Ajax with Jquery, plz.

    Thanks for great work.

    ( Reply )
  44. PG

    sunil October 2nd

    Hi Jeff,

    Question :::

    Is there a easy way to sort the the table by clicking the table header ?

    ( Reply )
    1. PG

      Jeffrey Way October 2nd

      Not built in – but it wouldn’t be too hard to add.

      ( Reply )
  45. PG

    Erwin Heiser October 3rd

    Have a look at jQuery tablesort: http://tablesorter.com/docs/ for sortable tables.
    Great tut as usual Jeffrey, keep’em coming :)

    ( Reply )
  46. PG

    Clinton October 3rd

    Excellent stuff. More Codeigniter tutorials please. Can’t get enough of them at the moment. Be good to see a more thorough build on the login tutorial so you don’t have to rely on CI’s cookies. Maybe integrate it with standard php functions to manage sessions?

    Keep up the sterling work.

    ( Reply )
  47. PG

    flux October 3rd

    I propose a screencast on ajax and methods to integration it in codeigniter… thanks for these useful screencast

    ( Reply )
  48. PG

    Javed Gardezi October 3rd

    can some tell me is there any difference in using
    $config['base_url'] = “http://localhost/ci_nettuts/”;
    or
    $config['base_url'] = “http://localhost/ci_nettuts/index.php/”;

    Well up till now i have seen no difference is it right??

    ( Reply )
    1. PG

      Bryant October 8th

      Yea if you go to

      localhost/ci_nettuts/

      it will automatically load the index.php file in that directory

      however, you can change that behavior in the htaccess file so it depends on how you have that configured.

      in a url, after you have index.php..

      the next param is the controller, and then after that is the function in that controller to call. After that all data is treated similar to a query string and lets you pass data.

      so http://localhost/ci_nettuts/index.php/CONTROLLER/FUNCTION/PARAM1/PARAM2/PARAM3/PARAM4/ETC../

      ( Reply )
  49. PG

    Dogma October 3rd

    Jeffrey! Thanks alot for the new screencast! Excellent work!
    My suggestions for the future screencasts is:
    1) template system. as i remember, then i tried CI – it doesn’t have proper template system. i mean, what many another frameworks (yii, cakephp, ruby on rails, etc) have nice layout system. maybe you have any ideas, how to recreate this in CI?
    2) ajax stuff. jquery prefered ^)

    ( Reply )
  50. PG

    emcgfx October 3rd

    Hey Jeff, can you please do a video on more database functions like Search, Delete and Form inputs ? Thank you.

    ( Reply )
  51. PG

    emcgfx October 3rd

    Just thought of another idea, why not do a video based on this pagination but with more database involvement like search, delete, add and update functions.

    ( Reply )
  52. PG

    Guillermo Carrion October 4th

    As always… thanks Jeff for a great tutorial on CodeIgniter…. keep them coming!

    ( Reply )
  53. PG

    DemoGeek October 5th

    Sometimes I feel that I made the right decision to stick with CodeIgniter than with the Ruby on Rails stack. Great stuff Jeff!

    ( Reply )
  54. PG

    Sergio Masellis October 5th

    So Lets say I wanted to add a delete button to the end of each row in the table how would I go about collecting the data in the td’s and so the I can construct a query to delete that row? is that possible using the $this->table->generate($records). or would i have to go a different route. if so any suggestions?

    ( Reply )
  55. PG

    Kris Allen U. October 5th

    Love the CodeIgnier tuts. I’m in the process of re-designing our company web site in CI, total CMS with login and admin area. Thanks for the kick start Jeff!

    I vote for CI and Ajax’s

    ( Reply )
  56. PG

    emcgfx October 5th

    Hey Jeff, have you had time to upload this following videos in MP4 format yet?

    Day 1: Getting Started With the Framework
    Day 2: Database Selecting Methods
    Day 3: Sending Emails
    Day 4: Newsletter Signup

    ( Reply )
  57. This information has been really useful, thanks for posting. Thanks to all the readers who have also posted comments, situations, etc.. it has really contributed to better understanding and awareness of the many possibilities for its application. Good post.

    ( Reply )
  58. PG

    Gregg October 6th

    Jeff,
    Keep up the CI tuts. Learning a lot from them. Also, you have my vote for a AJAX/CI tutorial.

    Good work on pagination.

    Gregg

    ( Reply )
  59. PG

    Natrium October 7th

    good clear tutorial!

    How can you this with CodeIgniter:

    On every page I have a header, footer and a menu. I used to fix this by making index.php, that contained the header, footer and menu, and include a file, based on the querystring.

    so, http://www.mysite.com/index.php?p=about
    would include(”about.php”) in the index.php

    Is there a way to achieve this in CodeIgniter? Or is there perhaps a better way to do this?

    ( Reply )
    1. PG

      Sid October 8th

      You can load multiple views from your controller function, e.g.

      function about() {

      $this->load->view(’header’);
      $this->load->view(’menu’);
      $this->load->view(’about’);
      $this->load->view(’footer’);

      }

      ( Reply )
  60. PG

    Eshban Bahadur October 7th

    There must be some tutorial that how to create helper function and libaraies

    ( Reply )
  61. PG

    zaiful October 7th

    Ok Jeffrey, I understood. You won’t upload CI day 5 and Day 6 to blip.tv :( I am really sad!

    ( Reply )
  62. PG

    Khalil October 7th

    Dear Jeffrey Way,

    How are you? Hope you will be fine today, Sir I will be thankful if you post the next Topic with CI + jQuery of “AutoComplete” I mean “Auto Suggestion”.

    I love your tutorials and websites.

    you are doing amazing work for us.

    Thank you.

    ( Reply )
  63. PG

    Brian October 7th

    Would it be too much to ask for simple write up of these? I can skim through and pick up the information alot quicker this way, instead of watching a 30 minute video…

    ( Reply )
    1. PG

      Natrium October 7th

      I think it is easier to follow on a video than follow some text.

      ( Reply )
      1. PG

        David October 8th

        I do find the video more useful.

  64. PG

    Padfoot October 7th

    Is there any way you can search through the database and display the results in the same way (I’m new to PHP).

    Thanks, I love all your tuts :) !

    Please Reply ;) !!!

    ( Reply )
  65. PG

    Bryant October 8th

    I do have to comment that I don’t think that the pagination class in CI is written very well. Overall I think URIs are somewhat hard to deal with and I find it easier to work with name/value pairs. Luckily CI has a built in uri_to_assoc method disassembles your URI and turns it into an associative array.

    In a project I am currently working on I have a method called off of my page’s constructor that checks the URI for and parameters, it then turns the URI into an array which I use all over the page to hold my parameters.

    When I’m setting up the config array for my pagination class, I set the base_url to my normal base url but I add on “/offset/. When my page loads the constructor disassembles the URI finds offset in the parameter array and then gets the offset value that the pagination class assigns inside the class itself. I then set the offset value as “cur_page” in my pagination config array that I pass in when initializing the pagination class.

    With a little more configuration this would allow you to pass in extra parameters into the pagination class so you could create URIs that have multiple parameters.

    Sorry if I rambled just thought I would share my thoughts and work.

    ( Reply )
  66. PG

    Seth October 11th

    Jeff,

    I have a few requests for tutorials and please don’t worry about how long they are…take your time. I’m typing as your speaking and you are flying through them :)

    - Advanced Security (more of the MD5/HTTPS stuff)
    - Logout
    - Go more in-depth over the Update from CRUD
    - Securing a URL (making a URL only viewable from one address)
    - Setting user privileges and access level

    Honestly I’d be happy if you simply did videos for every aspect of the user guide, but that may be overkill. I’m just a visual learner so seeing how you write code and explain code helps when I view the docs because I know more of what I’m looking at.

    Thanks,
    Seth

    ( Reply )
  67. PG

    Marshall October 12th

    Hey Jeff!

    First off, you have no idea how epic it is that you decided to do these screencasts. I’m putting together a website/ecommerce system at work and honestly would not be able to do it without these videos. Thank you.

    Second, I’m having this weird issue. When I load my main view in my index.php controller (which I use instead of ’site’ or ‘main’), I call the views in the constructor. When I load the page in-browser, it displays each view twice (as in header, content, footer, header, content, footer). When I make a separate function outside the constructor to load the views, the issue disappears. I’d prefer to use the constructor, but I can’t figure out why this is happening! Argh!

    ( Reply )
  68. PG

    Mini0n October 12th

    Hi Jeff!

    Do you know when you’ll be able to share the next video?

    Thanks!

    ( Reply )
  69. PG

    aslam doctor October 13th

    Hey Jeff,

    Please post something related to creating Chat application in php. Just general idea will be fine ;)

    ( Reply )
  70. PG

    Jesse October 13th

    Great stuff… thanks. Sounds like you had your coffee before doing this one :-)

    ( Reply )
  71. PG

    Joseph Wilson October 14th

    Jeff,

    PLEASE DON’T LET THIS SERIES DIE!!!! It was too good to stop now. Seriously. These videos were awesome! Keep it up! Please!!!

    ( Reply )
    1. PG

      Jeffrey Way October 14th

      :) Okay.

      ( Reply )
      1. PG

        adrian November 19th

        and yet it died :(

    2. PG

      Watson Blair October 14th

      I second the vote to keep this series going, i’m building a simple e-commerce site as a side project for work and this has made the project possible for me.

      I’m curious about including a search function to Pagination… i’m thinking something along the lines of changing the query from a simple ‘get’ to a ‘get_where’ then using user input to define your ‘where’…. I’m just not too sure about the technicals of passing the search variable back and forth…

      any ideas?

      ( Reply )
    3. PG

      David October 15th

      I second this also. Don’t let the series die.

      ( Reply )
    4. PG

      Vincent November 4th

      Fourth second ^^
      These tutorials are great, and CodeIgniter is a great framework!

      ( Reply )
  72. PG

    MEM October 14th

    Hello Jef,

    Once again, I’d like to thank your for your vcasts. They are very well structured. Congratulations.

    I’ve requested this pagination tutorial as well, since I realise that this was a commom request that almost all will need on almost every project.

    In order to continue on the same “must know features”, I’d love if you could teach us, how can we create a dynamic menu category navigation.

    The big thing here, is the all picture to relate a model, a controller (or several), several views, and we then need to show, hide, menu items based on the URI.

    It would be great if we could have a 100 foot view of a process involving a category menu creation.

    Regards,

    ( Reply )
  73. PG

    Tius October 14th

    Great Tutorial. Is there day 8 tutorial?

    ( Reply )
  74. PG

    Alex October 15th

    Hi Jeff,

    First, you’re a great teacher, thanks for all your hard work.

    OK, now to my request… Is it possible to create a client drop box with individual user names and passwords, along with max size caps per user, using CI?

    I think this would be a really cool tutorial to do, especially since most developers watching the tuts could really use something like that for their freelance work – yeah, me too.

    Thanks!

    ( Reply )
  75. PG

    martin October 16th

    Couldn’t get mine to work. The table of records is generated fine and the URL parameter works, but the pagination links are not created.

    I can’t find anything wrong in any of these lines:
    $this->load->library(’pagination’);
    $this->pagination->initialize($config);
    $this->pagination->create_links();

    What’s more I’m not getting any PHP errors or warnings. But in the page source there is just blank space where the links should be.

    Any suggestions?

    ( Reply )
    1. PG

      cubes October 19th

      echo $this->pagination->create_links();

      ( Reply )
  76. PG

    Richard Edwards October 17th

    Hey Jeff,

    Great Video Tutorials, voted for you on .NET Awards.

    Would you be able to show us how you can enforce Search Engine Friendly URLs? It always appears to be “/index.php/site/something” which is not always the ideal way of doing. Is the “index.php” part needed or can it just be “/site/something”?

    Would you also be able to expand on the scaffolding technique that CodeIgniter has to offer?

    Cheers again.

    ( Reply )
  77. PG

    Joe October 18th

    Hi Jeff,

    I see that you seem to be a big fan of CI. I am coming from Ruby on Rails and was looing for an easy jump off into the world of php frameworks. CI caught my attention and I have watched all your CI tuts. Recently though, I have seen whats seems to be a cousin of CI called Kohana. Can you please tell me your thoughts and why you have stuck wtih CI.

    Thanks

    ( Reply )
  78. PG

    Zoli October 18th

    these tutorials are great!keep up the good work Jeff!!

    ( Reply )
  79. PG

    Will October 19th

    The tutorials are wonderful and so helpful to all of us new to Codeigniter. I was wondering if you could go over creating calendars with Codeigniter. I am trying to figure out how to create advance event calendars (where I could switch between month, week, and day view and also view all upcoming events in the next few monthes) for a website of mine. It would be so great if you did. Two other topics that might be nice to have you go over would be creating thumbnails on the fly with Codeigniter or best practice with creating thumbnails and adding a WYSIWYG editor (with ability to add and remove files and images) to a Codigniter admin site. Keep up the good work!

    ( Reply )
  80. PG

    Adam October 19th

    This is probably my favorite tut series ever. Thanks Jeffrey for getting me started with CodeIgniter.

    Can you do a tutorial on storing images/files in MySQL with CodeIgniter or even with general PHP?

    ( Reply )
    1. PG

      Jeffrey Way October 20th

      Glad to hear it, Adam! I’ll definitely consider the idea. :)

      ( Reply )
  81. PG

    Manny October 21st

    Hey Jefrey, nice tutorial, i watch all your screencast, and i think i’m not the first to ask you, what’s your textmate theme, i’m a windows user, but i work with e text editor, a port of textmate, but for windows/*nix, and i can use almost everything of textmate, so, hope you can tell me :)

    Sorry for my poor english :P

    ( Reply )
    1. PG

      Jeffrey Way October 21st

      It’s called “twilight.” :)

      ( Reply )
      1. PG

        Manny October 22nd

        Hi again :P , but twilight it’s a dark theme, and in this screencast, you have a shiny one :P

      2. PG

        Manny October 22nd

        And again me :$ (sorry, i promise you this is my last question in this post :P ), what’s the name of the thing you use to write css and see it directly in the web browser? is really cool :P

      3. PG

        Mini0n October 24th

        I think you’re talking about a Firefox addon called Web Developer.

  82. PG

    Manny October 21st

    How i know if my comment was received? are the comments moderated?

    ( Reply )
    1. PG

      Manny October 21st

      :$ Sorry, i didn’t notice my comment awaiting moderation

      ( Reply )
  83. PG

    Sunil October 22nd

    how can I paginate if I have a data source is csv file ?

    appreciate your help

    ( Reply )
  84. PG

    BrunO October 22nd

    Thanks for the nice series! It’s total awesome!
    I got 1 question. How do you do so that it won’t show the id ? I tryed with:
    $this->db->select(’title’, ‘content’);
    but that doesen’t work?

    ( Reply )
  85. PG

    Ricardo October 23rd

    Sorry to use this as a way for posting none related questions. Unfortunately the CI support on the web is poor.
    I’m having some problems with the callback function so if you guys could check this post out:
    http://codeigniter.com/forums/viewthread/106717/P15/#656592
    Thks a lot!

    ( Reply )
  86. PG

    Mini0n October 24th

    Is this…. dead? :(

    ( Reply )
  87. PG

    Bart October 27th

    Jeff,

    I really enjoy the tuts. I’ve come late to these tuts and was trying to catch up.

    Unfortunately, Days 5 thru 7 videos don’t work. And Screencast says, “We’re sorry! We were unable to locate the requested page.”, when trying to download.

    Is this a permanent condition? This has been an issue for several days, now.

    ( Reply )
    1. PG

      dimpbizkit October 29th

      Hi Bart… i have downloaded the 5 ahd 6 videos… and i gonna put it in my web server so u can downloaded them..

      the links are

      http://www.dimpbizkit.net/files/CI_from_scratch_day_5.mp4
      http://www.dimpbizkit.net/files/CI_from_scratch_day_6.mp4

      I hope this help you… I need the video 7 now…

      ( Reply )
  88. PG

    Ben October 28th

    When’s the next one coming? these have been really useful…

    pleaase don’t stop now!!

    ( Reply )
  89. PG

    matt October 29th

    Count me in with Bart and Ben. I am loving the tutorials so far, but no luck getting 5-7 to work.

    Any alternate links?

    Thanks!

    ( Reply )
  90. PG

    dimpbizkit October 29th

    Thank you very much for this tutorials..

    I have downloaded the first 6 ones… now i want todownload this one and i cant… there are some laternative url to download because it is not working right now…

    Thanks

    ( Reply )
  91. PG

    Yas October 30th

    What about debugging when developing with CodeIgniter? I find a lot of troubles trying to debug, because of the routed urls.

    ( Reply )
  92. PG

    Danijel November 6th

    is this dead, Jeffrey?

    Please, don’t stop this series. It’s great :)

    ( Reply )
    1. PG

      Kezza November 10th

      no update since the beginning of October – its dead….
      Its unfortunate actually as I was looking forward to making a site similar to the one he demo’s in the first of this series…

      ( Reply )
  93. PG

    Mini0n November 10th

    I miss CodeIgniter’s tutorials… =(

    ( Reply )
  94. PG

    Taylor November 10th

    Thanks Jeff for this awesome series… I have a question what if i don’t want to include the “site/index/20″ and just want “site/20″ in the URL is this possible ?
    If yes please tell me how can i do it ?
    Also i am having problem removing the default index.php from WAMP i tried copying the .htaccess file with the following content to the folder outside system i.e. the root folder of the project:
    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ /index.php/$1 [L]

    And also changed the $config['index_page'] = “”;

    But still its not working !?!

    Please can you help me with both these issues ?

    ( Reply )
  95. PG

    Javed Gardezi November 11th

    Hello JW,
    I seems that this series is discontinued or have any season break… :) . Please continue this series to next level as you have said in the 1st epi.
    I was finally get used to CI and then sudden break!!.

    ( Reply )
  96. PG

    Chris November 12th

    I guess these guys are more interested in being like Smashing Magazine and while I like that site I was hoping this would actually stay a tutorial site rather than advertising and opinions. These good tutorials keep getting passed up for ads disguised as opinions. I understand they have to make money and have paid for nettuts+ membership to support them in the hopes to find the continuation of this tutorial. I guess I feel like they are not focused. I’ve been waiting for more to this series. Sigh….I guess it’s not profitable for them to continue to do this tutorial.

    ( Reply )
  97. PG

    Darshana November 13th

    Just joined for Plus program and wondering why there isn’t much CI tutorials for Plus users :(

    ( Reply )
  98. PG

    Javed Gardezi November 14th

    I think JW is out of ideas what to do next for this screen cast series.
    It was totally unplanned series, i think that why they have taken the break or stopped it.
    My idea is now they had covered enough basic of CI. Now its time to start building actual site which was said in the 1st epi.

    JW, please surprise us next week!!

    ( Reply )
  99. PG

    Mini0n November 15th

    That makes no sense.
    Lots of people had talked about a screencast on jQuery integration with CodeIgniter.
    So, lack of ideas is not the problem.
    Is it a time problem?

    Either way, I think Jeff should say something to all of us waiting.
    He doesn’t have to. He just should…

    =)

    ( Reply )
  100. PG

    Taylor November 17th

    Hi Jeff,

    I found a weird problem with CI. I have created a sub-folder in the controller say “abc” and a “class xyz” inside the file “xyz.php”. Now the structure is:

    http://localhost/site/index.php/abc/xyz/index

    Inside that class i am not able to see the echo $this->pagination->create_links(); function working, as it is being echoed out but the link system is not working !?! (i.e. when i click on the links of the pagination the URL changes but the anchors link don’t change; likewise Next link also doesn’t works).

    Do you have any solution for this ????
    Please help!

    ( Reply )
  1. Arrow
    Gravatar

    Your Name
    November 17th