codeigniter

Simple UL Question Coming from Codeigniter

I have a very simple query $this->db->select('id, title'); $this->db->order_by('id', 'DESC'); $query = $this->db->get('journal'); foreach($query->result() as $row):?> <ul> <li><? echo anchor("journal/arc_journal/$row->id", $row->title);?></li> </ul> <? endforeach;?> The data link it produces is perfect, but when my list is displayed ...

Installing CodeIgniter on root and WordPress in sub-directory

Hello, I want to create a website where the main pages will be served from CodeIgniter. I will use Wordpress in the /blog/ sub-directory to host the blog. Thats it! I want nothing else. Just to make sure that: example.com/somepage/ calls a CI controller where as example.com/blog/some-post/ is handled by Wordpress. I don't need any kin...

How to load models in the extended MY_Router class in codeigniter

I am not able to load models to the extended My_Router class in codeigniter. Below is my code: class MY_Router extends CI_Router { function MY_Router() { parent::CI_Router(); } function _validate_request($segments) { // Does the requested controller exist in the root folder? if (file_exists(...

Detect broken links in Codeigniter

Do you know any script to detect broken links in a site developed in codeigniter (with url rewriting)? Thank you ...

How to use Code Igniter to show Dynamic images via javascript(jQuery).

You can use the URL helper in Code Igniter to load CSS and Javascript with the base_url() method, but what if you have images dynamically being placed into your HTML via javascript? for example in my javascript file I've got var arrowimages={down:['downarrowclass', 'images/down.png', 23], right:['rightarrowclass', 'images/right.png']} ...

Rewriting URL's in codeigniter with url_title()?

I am rewriting my website with codeigniter and have something I want to do but not sure it is possible. I have a gallery on my site powered by the Flickr API. Here is an example of the code I use to display the Landscape pictures: <?php foreach ($landscapes->photoset->photo as $l->photoset->photo) : ?> <a >photoset->photo->farm ?>/<...

Query string stoped working

Hi, I have a Codeigniter site which was working perfectly fine on centOS server. But from yesterday the site is not able to detect the query string and I'm getting 500 server error. The same code is working fine at localhost but at the CentOS server its giving error. I'm using clean URL but for Jquery's Autocomplete I need query stri...

CodeIgniter & Datamapper as frontend, Django Admin as backend, database tables inconsistent

I created a database for a site i'm doing using Django as the admin backend. However because the server where the site is hosted on, won't be able to support Python, I find myself needing to do the front end in PHP and as such i've decided to use CodeIgniter along with Datamapper to map the models/relationship. However DataMapper requi...

bit ancient but, Is it possible to sent $_POST data from iframe to parent??

Hi all, I have a login form sitting in an iframe to $_POST the username/pwd to the parent window. But it seems the $_POST data is not being sent. I need this as the form logic sits in a Codeigniter controller and CI will also handle the loggedin view. regards ...

codeigniter and form action trailing / issue??

Hi, I am having a bit of an issue with the way CI is dealing with /. In a regular form i notice that the following form action didn't work action="mydomain.com/ci-controller/login/" but this one does work action="mydomain.com/ci-controller/login" Strange but he it worked. But now i need this from a iframe, i the iframe i have a logi...

Creating a personal URL for all users to my site

Hello all, When a user registers with my site I want to offer them a login page and a user area with the URL: http://user1.mysite.com http://user2.mysite.com http://user3.mysite.com ... I did a google search for this but I wasn't sure of the right terms... How can I do this without having to actually create lots of subdomains...

CodeIgniter: is $_POST already clean for db input?

Hello, This is my first app with CI and I want to know whether $_POST is clean and can I directly insert the data into db? I have enabled $config['global_xss_filtering'] = TRUE; Thank You. ...

Security precautions and techniques for a User-submitted Code Demo Area

Hey folks Maybe this isn't really feasible. But basically, I've been developing a snippet-sharing website and I would like it to have a 'live demo area'. For example, you're browsing some snippets and click the Demo button. A new window pops up which executes the web code. I understand there are a gazillion security risks involved in...

Codeigniter and Paypal: How it works

Hello all, Two random question as I try to integerate Paypal IPN into my Codeigniter based web app. 1) Are these two lines the same? $data['pp_info'] = $this->input->post(); $data['pp_info'] = $_POST; 2) A user agrees to pay a monthly recurring fee to use your service using paypal - first payment you are aware they have paid as you...

Multilingual support using gettext with codeigniter, best practice?

I know how to create .po files and how to generate .mo files and then use them for translation on my Codeigniter powered site. However, I'm not quite sure on how to change language from the site GUI. I want to stick to codeigniter's default url calling schema: www.domain.com/controllername/method/param1/param2. Calling the server like ...

CodeIgniter global variable

Hello, I am using $data in all my views $this->load->view('my_view', $data); I have also autoload a Controller following this guide Extending Core Controller But I want to make $data global because in views there is a sidebar which is constant for whole project and displays info fetched through db in autoloaded controller Currently ...

CodeIgniter and Your Own Scripts

Hello all, I have found a class I would like to use to get bookmarks from a users delicious account. Here is how it is used. The problem I am having is, should I be turning this into a Codeigniter library? Can I not use it on its own as this is self contained? I am guessing I am asking for the best practice here. Thanks all for any he...

jQuery and CodeIgniter AJAX with JSON not working

Hello, I trying to make my first AJAX with JSON call using jQuery and CodeIgniter. But for some weird reason it's not working. The jQuery code: var item = "COOL!"; $.post("http://192.168.8.138/index.php/main/test", { "item" : item }, function(data){ alert(data.result); }, "json"); The CodeIgniter code: ...

how to create Codeigniter route that doesn't override the other controller routes?

I've got a lot controller in my Codeigniter apps, ex: Signup, Profile, Main, etc.. Now I want to build "User" controller. what I want: if people goes to url: example.com/signup, I want use default route to "Signup" Controller if people goes to url: example.com/bobby.ariffin, I want to reroute this to "User" Controller because the url...

CodeIgniter's Scaffolding and Helper Functions Not Working

Hi, I'm following CodeIgniter's tutorial "Create a blog in 20 minutes" and I am having trouble getting the helper, anchor and Scaffolding functions to work. I can't seem to create links on my HTML page using the helper and anchor functions. I put $this->load->helper('url'); $this->load->helper('form'); in the constructor under p...