I recently wanted to set up a system to allow a client to edit sitewide configuration settings on a custom CodeIgniter site. I didn’t want to hardcode it in a configuration file and I wasn’t sure exactly how it would need to be added to in the future. I decided to use a system much… Continue reading Sitewide settings in CodeIgniter
Category: CodeIgniter
Simple AppleScript to do lookup in CodeIgniter documentation
Recently, in Coda, I wanted to create a simple way to look up a word directly in the CodeIgniter documentation. While the reference books are nice, there are multiple PHP documentation sources one might want to look up while working. For example, one might want to look up a native PHP function or, if working… Continue reading Simple AppleScript to do lookup in CodeIgniter documentation
Easy way to pass multiple variables to a CodeIgniter validation callback
I was recently working on a custom form validation callback for my CodeIgniter script. By default, one gets the field that you’re validating available in the callback function. For example, if I have the following form validation rule: $this->form_validation->set_rules(‘discountGlobal’, ‘Global Discount’, ‘trim|integer|max_length[1]|xss_clean|prep_for_form|only_one_global_discount[]’); My custom callback is only_one_global_discount. I am not explicitly passing anything through to… Continue reading Easy way to pass multiple variables to a CodeIgniter validation callback