codeigniter

What can be the best way to create a multi-site in Codeigniter?

Hi developers! I want to know what could be the best way to make multi-site with single back-end. I mean to say that I have a global shopping cart (say www.abc.com), and some regional shopping carts (say www.abc.fr, www.abc.in etc) and I want to manage them with single back-end. Should I use a single database and site-id in my tables? A...

Code Igniter Load Database seem to stop process thread

I've just set up a simple PHP Code Igniter project on a Windows 7 box, IIS 7, Fast CGI, no modules. when I load up database in one of the function of a Model class by doing such this->load->database() the thread seem to stop on that particular line. None of the subsequent operations are done. class Account_model extends Model { var ...

Problem getting codeigniter library for google reader to work when trying to log in and get feed data

I'm trying to getting this http://www.forgottenexpanse.com/projects/ci_reader CodeIgniter library for interacting with Google Reader to work. When following the examples on the page, this works fine: $this->load->library('reader'); $shared_items = $this->reader->shared_items('12006118737470781753'); foreach ($shared_items['items'] as ...

who to fill detail input base on child window popup

I have a parent window for entry transaction that havs customer ID field input. User have to click find button beside it and new window will be opened and user can findout there. Whenever user choose selected customer, the parent will display some information of the customer like name, address may be, and detail of claim. Anybody can sho...

Form helpers vs html form?

Hello, What is the difference between using form helpers and plain html form? Why did the framework developers create form helpers? Just because they were idle? Why invent a whole new way of generating form and ask developers to learn new syntaxes when all of it you can do it in plain html? Thanks in advance:) ...

Can I pass arguments into a model function?

Is it even possible to do something like this in codeigniter?Is it considered a good practice in general? ...

Help with Codeigniter and MVC model pattern

I am creating a site much like a wordpress blog whereby the front page will display a post loop: with the post_summary, author info, and tags. I have four tables: posts | users | tags | tag relationships to display all the results i would need to do multiple JOINs for in the SELECT statement However, to stay with the MVC pattern, th...

ION Auth Default URL and Controller

I am using the ION Auth library for Codeigniter. For security purposes, should I change the default URL/Controller from "/auth" to something that's unknown and more difficult to guess? ...

How do i do batch updates?

Hello, How can i do batch updates in CodeIgniter instead of firing query each and every time in database? Thanks in advance :) ...

Codeigniter image manipulation

I am uploading an image and creating thumbnail for different size. The category are 32px/32px, 64px/64px, 150px/150px. It doing all great except one. It calculates the hieght automatically base on “maintain_ratio” = true property. But i don’t want that. it should be fixed with my defined dimension. But i can’t found such option for that....

Get Map Object in Javascript after using CodeIgniter Google Maps API

Hi, I'm using the codeigniter library for the google maps api. I load the map using the library located on the CI Wiki: http://www.phpinsider.com/php/code/GoogleMapAPI/ I want to then use javascript on the map object after loading the page. How can I get the map object in javascript? Can I use GMap2 on the same div? Won't that recreate ...

Make form remember earlier submitted values with CodeIgniter

Hey guys, I have this contact form with codeigniter, and what I want to do is, when the form is submitted but does not pass validation, I want the fields to contain earlier submitted values. There's one thing though: when the form is loaded all the fields already have a certain value assigned, so for example the "name field" shows "nam...

How do i log inside database with separate passwords?

Hello, How do i log inside database with separate passwords? We can configure only one user in database.php. I want that the login process should happen with different mysql username and password because that table is protected. Thanks in advance:) ...

Blackberry Creating New Session On Every Page

I have created a mobile version of a site. It uses the CodeIgniter session to store some data. This seemed okay on Blackberry a few weeks ago but now it is making multiple sessions on every page and therefore it can't access the session where the data is saved. This works fine on the desktop and iPhone. The cookies are being saved to the...

does codeigniter have a supported openid library or plugin?

I have a project with CodeIgniter that requires openId - the janrain libraries seem overkill. Anything simpler or specific to CI? ...

Can I have a default controller called if the called controller doesn't exist?

I'm trying to learn more about the codeigniter framework by porting an existing website to it -- something that's not too complex, or so I thought. Currently the site is replicated for its users and presents personalized data based on the url, for example, Joe might have his site at: www.example.com/joe www.example.com/joe/random-page....

Codeigniter : variables scope when calling a view from within a view. Odd...

I am confused about variables scope when calling a view from within a view. I tested a bit and found: If the variables are originally passed from a controller, there is no need to do something to pass the variables from a view to a view. If the variables are declared in a view, I have to explicitly pass the variables from a view to a...

Forcing CodeIgniter to execute hooks functionality?

Hi I am facing a problem with hooks in Codeigniter.I have written hook for 'post_controller' which call a Controller function and load the template (Layout view template).It works fine for all normal cases. But now i need to make a custom error page.So i am overriding show_404() function.In this function i use the get_instance(); functi...

Controllers in two level subdirectory

Is there any hack to provide two level sub directory controllers support ? ...

Codeigniter : Loading a different view in a loop according to URI segment

Hello everybody. I have a list of buildings that I load from my model. Those buildings are showed in a loop within my view as so : Controller public function index() { $data['buildings'] = $this->Base_Model->getUserBuildings(); $this->load->view('game', $data); } View <?php foreach($buildings as $b): ?> <div class="building">...