Welcome Guest, Not a member yet? Register   Sign In
Bootstrap integration with Codeigniter.
#7

(This post was last modified: 08-14-2015, 08:50 AM by mwhitney.)

The "for" attribute in a label is a reference to an "id" attribute on an input (or other form control), so none of the values used in the "for" attributes of your form's labels are valid.

Also, you have:
PHP Code:
$this->load->view('samplebootstrap'); 

Then you state
Quote:Create the view file as samplebootstrap.css

Passing 'samplebootstrap' to $this->load->view() isn't going to load 'samplebootstrap.css', and since servers often only run PHP on files ending in '.php', it's likely that some people would never be able to load a .css file as a view anyway.

Honestly, when writing a tutorial, I would recommend a few key points:
  • If you're not going to walk someone through installation, state up front that you're assuming they've already gotten CodeIgniter installed and working (maybe link to the docs), then do nothing in your tutorial which would potentially break their installation (like step 3 in your tutorial) unless you warn them that the step in question might cause issues.
  • When giving URLs, use http://localhost as the root (or something like http://yourproject, http://example, etc.). Using a subdirectory in your URL may be confusing for some users, and, in some environments, configuring that URL can be painful.
  • When giving file/directory paths, use relative paths starting with /application and /system (and maybe /public, or in your case /assets, but you may want to give a short explanation of what that means),  and let them figure out the rest. Every path you post in your tutorial requires me to parse out \wamp\www\CodeIgniter\ as your web root (I'm assuming), and even an all-Windows audience isn't going to be an all-WAMP audience. I certainly don't want people to have to parse through /var/www/mysite/ at the beginning of all of my paths.
  • Start by building the code you're trying to demonstrate in the tutorial, then use that code in the tutorial, and, if possible, find someone who might be willing to follow the tutorial to see whether they have any problems/questions.
Finally, and this may not be as important as some of the other points for most users (and it goes for everyone writing code for web servers), take some time to learn how to write HTML properly, rather than just well enough that it works. The HTML standard moves very slowly (CSS and JavaScript a little more quickly, but still at a pace most developers can manage if they don't need to get down to the nitty-gritty details). HTML5 has been a W3C Recommendation for almost a year now, which is as close to an official standard as HTML gets, and was in various draft forms for 6 years before that. HTML 4.01 became a Recommendation on Christmas Eve in 1999, and the </br> tag mentioned by Wouter60 was forbidden in HTML 4.01. The HTML5 spec goes further to point out that the br element should not be used in the fashion used in your example.
Reply


Messages In This Thread
RE: Bootstrap integration with Codeigniter. - by mwhitney - 08-14-2015, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB