codeigniter

Image in CKFinder browser exist, but I can't find the image..

Hi everyone, I'm using CKFinder 1.4.3, integrated with CKEditor. I use it with CI. The upload folder of CKFinder is named 'uploads'. And then, I modified an .htaccess file, like this: RewriteRule ^(ckeditor|ckfinder|uploads)/(.*)$ webroot/$1/$2 [L] So, when i want to see the image , the url would be like this: http://blabla.com/upload...

Setting a language in codeigniter with uris. What is the best way?

I' m using codeigniter with po/mo files (I don't like the built in functions) I have an already made function that uses get variables to set the cookie with the language. Now, codeigniter don't have the get but uses uris. This is the function that I'm using (it fires in the constructor): private function locale(){ $cookie_name = $...

Codeigniter multiple file upload paths

I'm building an app which needs to take uploaded files and put them in separate directories for thumbnails and fullsize images. But $config['upload_path'] = './uploads/'; only allows me to select one upload path. How do I define two or more upload paths? ...

Setting up Sphinx on development servers?

We're trying to get Sphinx to index all three of our servers (development, staging and live) across all three databases, putting them each into seperate indexes for testing etc. My question is: How do we setup the queries in Codeingniter (PHP) so the staging and development server make calls to the right index? Thanks in advance! ...

Going from a framework to no-framework

I've been developing in PHP for about 8 years as a hobby. In 2009, I picked up codeigniter and since then I've not managed to get a single project developed. I find it slows me down trying to work out how to modify it to work the way I want, when if I was working in pure PHP, I'd know, or I'd be able to quickly find a snippet for. I've...

rewrite from htaccess to codeigniter controller

My codeigniter application directory structure is like --application --htdocs   --index.php   --.htaccess   --folder       --file1.xml Now I have a url http://mysite.com/folder. This is showing the files list in the folder directory. What I want here is to rewrite this url to a controller on my site say 'html.php'....

auto generating the doctor unit id using php, codeigniter!

Hi Guys, i'm developing a site using codeigniter, in my app i have this scenario each patient is assigned to a doctor unit and there are 6 doctor units operating in the hospital some times one or two doctor units may be not operating some doctor units are not operating is certain days, i.e one can operate on monday,wednesday and frida...

codeigniter browser windows problem?

Hi All, Im having a problem in codeignter where I will have two browser windows open (a & b) for the same application, and when I click a link or similar in browser a, the application goes to the correct link, but browser b becomes active instead? This is really frustrating, and I need to get to the bottom of why this is happening... ...

Codeigniter How to Dynamically create menu

So I have a menu that I want to generate a main menu based on the authenticated user's access level. No problem creating the menu, however I want to automatically create the generated menu in my "header" view. So in my controller I am calling the "header" view, but I don't want to pass this dynamic part of the header like this: $data[...

Which session library should I use with CodeIgniter?

Hi everyone, I have recently started using CI and with it CI sessions, but I have noticed that one thing in particular is much more time consuming to do with CI sessions than with the base PHP sessions: Arrays. I have an array of data that persists regardless of login/logout called $_SESSION['stats'], I then store data in that array i...

CodeIgniter Form Validation - callback not bound to a field

Is there a way to set a validation callback that is not bound to a particular field, but is necessary to pass validation? ...

Loading models for autocompletion using PHPDoc @property

Hello all I am using Codeigniter framework for PHP. I was wondering if there is a way to load methods in a Model for autocompletion using PHPDoc @property. What I mean is .... class abc_controller extends Controller { /** * @property Model1 */ function func() { $this->load->model("Model1"); // I am loading the model he...

Clonefish validation vs code igniter's validation

Hey, What are your thoughts on clonefish's validation class compared to codeigniters default validation class. Devan ...

Codeigniter like methods call ?

Hello guys, In codeigniter we use a method call like this $this->load->view(); I wanna know what's "load" exactly ? Is it a function or what ? And why it doesn't have two parentheses after it ? I wanna make something like this in my code so how can I do this ? ...

Pass a Paramater to a Class in CodeIgniter

Hi, I'm still learning my way around PHP and CodeIgniter, but I'm trying to set up an email controller. The only problem is that most tutorials show how to set up the email.php controller, but hardcode the email address and message. In the project I'm working on, I will be sending emails for many things (registration, password reset, e...

How to create a flexigrid with passed variable from another controller in code igniter?

Hi everyone. My problem is kinda silly but I don't know how to do it. I'm creating a standard flexigrid using standard structure: //ver lib /* * 0 - display name * 1 - width * 2 - sortable * 3 - align * 4 - searchable (2 -> yes and default, 1 -> yes, 0 -> no.) */ $colModel['users.id'] = array('id',...

Counting the number of results returned by a database query in Codeigniter

I am not having much luck detecting when a database query in Codeigniter returns zero results. I have had a good read of the notes on the PHP count function but am none the wiser! I am using a classic MVC structure and call the query/view as follows from the controller: $data['result'] = $this->search_model->do_search(set_value('name')...

Help with a php if statement...

Hello there! can somebody help me with this if statement? My form appears every-time I load the page but it disappears after I submit the form! Maybe it's the "endif" syntax that confuses me but I can't get this done properly... here is the code: <?php if ($this->input->post('submit') && $this->input->post('categories')): foreach($tag...

CodeIgniter Form Validation. Multiple calls not working.

I am using CodeIgniter. I have been trying to debug a non-working script. I have come to the conclusion that when utilizing $this->form_validation->run(); (the form validation class), after the first named call, e.g $this->form_validation->run(form_1);, all following calls return true. I am developing a multi step form and when $this->...

How to Shut Down CodeIgniter Application?

Assume I have a CI app that does the following: Allow users to log in and perform certain tasks Constantly have cron running scripts in the background Now, say I need to do some upgrades to the site. How do I do this safely? I don’t want to shut down the server while users are logged in or cron script still running. I could set a fl...