- If something on this blog saves you an hour of frustration, and you want to say thanks, throw me a dollar or two. It'll help me buy more diet coke which, let's face it, is the primary fuel for this blog.
-
Recent Posts
- Stop Google from hijacking arrow key presses on Search Result pages
- iTunes Match stuck on “Step 1: Gathering information about your iTunes Library”
- Primal Screen’s Mic AS3 Output class
- UPDATE: Fix: CSS Animation slow or choppy in mobile browsers
- Prevent Mobile Safari from zooming in when device rotates
- Primal Screen website launch
- Fix: CSS Animation slow or choppy in mobile browsers
- Socket.io 0.7 – Sending messages to individual clients
- CSS z-index doesn’t do anything, inspector computed style says it’s z-index:auto
- TypeKit (@font-face) font’s look like crap in IE7 & IE8 when animated with jQuery
- AS3 Component Parameters always NULL or empty? Here’s an even better fix.
- After Effects Expression: Snapping objects to whole pixels
- Use Google Fonts (they’re free, and not half bad) in your site
- Basics: What PHP version does my server run?
- Make elements hang outside your main page container, without triggering scrollbars if the window is too narrow
Archives
Categories
Meta
Category Archives: CodeIgniter
Did I mention that our new website launched? Primal Screen website (100% of code and 75% of design by yours truly). Oh, and I’ll never write another website in that bloated carcass of a useable PHP framework: Zend Framework. My … Continue reading
Posted in Actionscript/Flash, CodeIgniter, HTML/CSS, HTML5, Javascript, jQuery, PHP, Zend
Tagged CSS, html, html5, javascript, jquery, js, primal, primalscreen, screen, zend
Leave a comment
I moved DreamHost earlier this week, and so far, it’s been great. SVN built into the hosting is fantastic, and the UI in their control panel is much easier to use than the various CPanel implementations most hosts use, and … Continue reading
Posted in CodeIgniter, PHP
Tagged codeigniter, dreamhost, htaccess, problem, query_string, redirect, request_uri, rewriterule, root, subfolder, uri_protocol
Leave a comment
EDIT: I guess you don’t need to store the last entry time in a cookie, storing it in a simple js var works fine. I’ve updated the code to reflect this. EDIT2: If your server isn’t doing a good job … Continue reading
So maybe you want to just declare a variable once in PHP at the top of your stylesheet: $theColor = “#363636″; And then when you need to refer to it a dozen times, spread throughout your stylesheet, you can, and … Continue reading
Posted in CodeIgniter, HTML/CSS, Javascript, PHP, Zend
Tagged codeigniter, CSS, css variables, generate, header, php, php generate css, stylesheet, variables, zend
Leave a comment
I have a javascript/jQuery ajax function that tries to post some data to a URL in my CodeIgniter installation, and it fails. Looking at the console it gives me this message XMLHttpRequest cannot load http://www.DOMAIN.com/chris/calendar/async/update/assignment/325. Origin http://DOMAIN.com is not allowed … Continue reading
Posted in CodeIgniter, HTML/CSS, Javascript, jQuery, PHP
Tagged Access-Control-Allow-Origin, ajax, codeigniter, headers, javascript, jquery, load, php, XMLHttpRequest
Leave a comment
CodeIgniter Active Record aliasing column names to prevent overwriting (especially columns named id)
On a recent project I set up all my tables so that they had a primary key, auto-incrementing column named id. I figured this was a good practice, since it meant that all update queries could just reference the id … Continue reading
Posted in CodeIgniter, PHP
Tagged active record, alias, aliasing, codeigniter, collision, column, id, join, overwriting, php
3 Comments
Gets the current controller: $this->router->class; Gets the current method/action: $this->router->method; I like to use these to automatically import a CSS stylesheet to every page. Something like this: <?=link_tag(site_url(‘css/’.$this->router->class.’.css’));?> <?=link_tag( site_url(‘css/’.$this->router->class.’/’.$this->router->method.’.css’) );?> Which ends up looking like this: <link href=”http://www.chrissilich.com/css/controllername.css” rel=”stylesheet” … Continue reading