Calling a library from inside a helpers function in Codeigniter
Can I load a library from inside a helper? $this->load->library('name'); Thanks, Max ...
Can I load a library from inside a helper? $this->load->library('name'); Thanks, Max ...
Hi I've written a simple callback function which isn't working. My other callbacks (which are in the same library file) work fine so I guess the problem has to do with my code. The parameter passed in the callback function takes the form of a chunk of PHP which is eval()'ed to form part of an 'if()' statement in the function itself. H...
Hello all! I just started to play around with the new editor CKEditor, and i’m liking it alot. The one issue i’m trying to solve is configure the editor for file uploads. Like with FCKeditor the uploader and file browser are included in the plugin. When I try to launch the browser or uploader, CI tells me the file is not there. What...
I'm using CodeIgniter and I got a model that fetches let's say all recipes where you can set the offset and the limit. Should I extend that function for retrieving a single recipe? Is it good practice? ...
Hi, I downloaded Markdownify from http://milianw.de/projects/markdownify/ and extracted it to my application/libraries/ directory. I did a: $this->load->library('markdownify'); echo $this->markdownify->parseString('<b>Test</b>'); But the output is the same html markup. It didn’t work. How do I get it working? ...
Hi, I'm planning on making a self-moderated site where people ca share specific information on tons of items. It will be as following: If the item a site visitor is looking for isn't available, he can create it. Registration is not needed. Other visitors would help correct his item name if it's invalid. Visitors can add information to...
I am making an ajax request from a jquery script to one of my ajax controllers in codeigniter. This process works fine when using data type json. However, when I want to send xml back from the server, the jquery documentation says that the server must specify a MIME type of text/xml. How do I do this with codeigniter. My ajax call loo...
I want to paginate query results in CodeIgniter to look like this: Problem 1 : The Pagination class always outputs numeric links. I just want to show next and back links. Problem 2 : $data['links'] = $this->pagination->create_links(); returns all of the links as a string. How can I separate the next and back links and put next t...
I am using the below jquery code to call a ajax function in my contorller CS. Search is the function name. How ever the function is called in the controller. But i am supposed to get a value in the text box of the page inside this function. Basically this is for the auto complete feature. on key up the function is called. But i am not ab...
Good morning readers, I have a little problem with caching feature of CI. When i generate a view with data from database, the data are always the same until il manually delete all cache files. Is there any way to delete / invalidate the cache ? I tried to set the cache limit to 1 minute, but i didn't work. Thanks for incoming answer...
ASP.Net MVC Controllers have several methods of forwarding control to another controller or action. However, all of them cause a client redirect, with a 302 and a new browser request. Why is there no internal "call another controller's action" functionality, without getting the client involved? I'm pretty sure that the php CodeIgniter...
I'm running a LAMP environment with CodeIgniter. I want to be able to use its URL pattern, like, http://localhost/controller/function/ID, but by default it has to be http://localhost/index.php/controller/function/ID. The user guide says that I need a .htaccess file to make the former style possible, and uses this as an example: RewriteE...
I'm tinkering with CodeIgniter and have come across Active Records for the first time. At first I dismissed it as something for people who don't really know how to write SQL. I realise now that my analysis was flawed and Active Records are pretty prominent, especially in Rails. But what purpose do Active Records hold? Is it to abstra...
Hey! I am using the following code to upload and extract a ZIP-archive in PHP using CodeIgniter. $config['upload_path'] = 'backups/'; $config['allowed_types'] = 'zip'; $config['file_name'] = $project_id; $this->load->library('upload', $config); if ( file_exists('backups/' . $project_id . '.zip') ) { try { delete_file('ba...
How to create Thumbnails from an unzipped image folder using for loop in Codeigniter? ...
hello guys I'm having 3 months with codeigniter so today I discover an error on my pagination script : $this->db->where("by_id",$user_id); $this->db->order_by("date","desc"); $this->db->limit(10,$from); $query = $this->db->get("status"); well the url is look like this : server/demo/page/10 so if user type server/nedjma/baniss/10...
Anybody came into this before? Hosting a site on godaddy, the site is developed in codeigniter framework(php), to get pretty url, put this into .htacess RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] problem is only domain.com/index.php seems to work, other urls e.g domain.com/u...
How do I remove the "index.php" sticking out in every path in codeigniter somewhere in the center? I want clean non index.php-fied URLs? ...
Hey guys, I've been working on this for a while now and I can't seem to get it to work. It seems to be a frequently asked, but a rarely well-answered question. I want my website's users to link their facebook account with my website. So they can see their stream e.t.c on my site. At the moment, each time they log into my site they ha...
I'm looking to put a small site together and would like a CMS for the static content, but also want to be able to code outside of the CMS (to many bad experiences building modules for Drupal). I've used CodeIgniter and played with Expression Engine a little - and know that ExpressionEngine 2.0 will be build on CodeIgniter...I just wonde...