Welcome Guest, Not a member yet? Register   Sign In
  Want to change Path?
Posted by: El Forum - 08-09-2007, 11:36 PM - No Replies

[eluser]Kaleem Ullah[/eluser]
hi....

I have to give the following path for my site…
hhtp://localhost/ci/testing/test/hello

but i want to change it to
http://localhost/testing/test/hello

how can i do that?

THANKS…


  want to change path
Posted by: El Forum - 08-09-2007, 11:18 PM - No Replies

[eluser]Kaleem Ullah[/eluser]
hi....

I have to give the following path for my site...
hhtp://localhost/ci/testing/test/hello

but i want to change it to
http://localhost/testing/test/hello

how can i do that?

THANKS...


  website help
Posted by: El Forum - 08-09-2007, 10:58 PM - No Replies

[eluser]bikuta[/eluser]
Hi guys,

I was wondering if you could help me with a problem I'm having

This is the site I'm building:
http://testdomain.hopemissioncentre.com/

If you view the site in IE6 and scroll right down to the bottom, in the footer, there are some stray characters "ved." - it comes from the last 4 characters of the "All rights reserved." and it's always the last 4 characters of that line.

Would you guys have any why IE6 shows this?

Victor


  I really think it's time for me to learn a framework... but I've got a few questions
Posted by: El Forum - 08-09-2007, 10:34 PM - No Replies

[eluser]ghebert[/eluser]
I'm working on a few big projects, one in particular that has well over 100 tables, most of them with 10,000's of rows and a few with millions of rows. They're not really high-traffic sites (they're mostly intranets), luckily.

Obviously with such large datasets, most queries are highly optimized for their specific usage. Many queries touching the same tables can look really different depending on what columns are being extracted. We also do a lot of reporting, this is another place where tricks are used to gain speed. Since se use all sort of tricks to make them fast, so obviously using the built-in query generators ($this->load() or whatever) would not really be used that much.

How much of a pain is it to build your own queries in many places, and does it defeat the purpose of having a framework? I've looked at CakePHP and while it seems powerful, too much magic is going on. And very often, the tables are already created when I get a project handed over... so convention over configuration would not be really helpful to me (I don't always have the control on the table/field names). This is why I'm very interested by CI.

Anyway I'm simply looking for advice since I'm tired of having 150,000 of lines to manage on that project. Life would be so much easier if we would have a framework!!!!


  Undefined property in my view. How to output data in the view.
Posted by: El Forum - 08-09-2007, 10:06 PM - No Replies

[eluser]Henry Weismann[/eluser]
I have just started with php MVC design pattern frameworks and after researching for a while I have decided to use CodeIgnitor. I have been using php for a few years now and have dabbled in OO techniques in other languages but it is still new to me. I am excited to learn a framework and work on application of OO ideas. Anyway I have what is probably a simple question. I have created a controller a model and a view but my view is giving an error when trying to output the results from my controller. This is the error:

Code:
Message: Undefined property: customerName

Filename: views/admin_customers_view.php

Line Number: 12

I am using a foreach for iteration. Here are snippets of my code:

The Model function:

Code:
function get_customers($limit,$offset)
    {
        $query = $this->db->get('customerinfo', $limit);
        return $query->result();
    }

The controller function:
Code:
function customers($limit = 25, $offset = 0)
    {
        $this->load->library('pagination');
        $this->load->model('Admin_model');
        
        $data['customer'] = $this->Admin_model->get_producers($limit, $offset);
        
        // Pagination code
        $config['base_url'] = '/admin/producers/'.$limit.'/';
        $config['total_rows'] = $this->db->count_all('movieproducers');
        $config['per_page'] = $limit;
        $config['uri_segment'] = 4;
        
        $this->pagination->initialize($config);
        $data['pagination'] = $this->pagination->create_links();
        
        $this->load->view('admin_customers_view',$data);
    }
}

In the view:
Code:
<ul>
&lt;?php foreach($customer as $item):?&gt;

<li>&lt;?=$item->customerName;?&gt;</li>

&lt;?php endforeach;?&gt;
</ul>
    
    <br/><br/>&lt;?=$pagination ?&gt;</center>

Can anyone tell me what I am doing wrong. Is $data['customer'] an array or object. Maybe I am missing my fundamentals on iterating through an object.


  Automatic Layout Inclusion
Posted by: El Forum - 08-09-2007, 06:42 PM - No Replies

[eluser]Drarok[/eluser]
Good morning!
I'm brand new to CI, but not to PHP. I'm trying out various frameworks, trying to find a quick way to bash out some sites.

I've had a look around these here forums, found that someone has created a 'View' library that sort of addresses my issue, but not in the way I'd like.

What I want to do is to write a single outline document (or maybe a header and a footer) that is/are automatically included for every view, so that my view files can just contain the content they will output, with no need to write:
$this->load->view('header');
$this->load->view('section/theview');
$this->load->view('footer');
etc.

I just want to have this in my controller:
$this->load->view('section/index');
and no include() calls or the like in the view at all.

Is this currently possible, or should I start writing my own implementation? I think it would be much tidier this way. It's the way I'm used to working with my own 'frameworks' that I normally use, and also another PHP framework I tried implements templates this way.

Thanks in advance, and apologies if this is glaringly obvious.


  installing when you moved the application directory
Posted by: El Forum - 08-09-2007, 05:32 PM - No Replies

[eluser]jgberg[/eluser]
I'm not clear on how to install FreakAuth when I've moved the application directory out of the system directory, making it a peer of 'system'. (I did this with the intent to keep 'my' stuff away from the changes to CI core, though this seems be an illusion as things unfold.) But where do I put the FreakAuth files supplied under system/language and system/helpers for example? Do they belong under system/helpers or under a newly created application/helpers (etc)?


  Help with CI and easyphp calendar
Posted by: El Forum - 08-09-2007, 03:56 PM - No Replies

[eluser]mdriscol[/eluser]
Hey,

I'm trying to integrate easyphpcalendar and code igniter and I'm having some problems with the URL's. The calendar is designed to use attribues to index.php?$blah=blah and such.

You can see what's happening here
http://www.wrolc.org/calendar

So it looks for the file, which is wrong and then gives me an error "The URI you submitted has disallowed characters." or it just cant find the file.

I'm a newbie so any help is much appreciated. Thanks


  Using multiple MySQL databases
Posted by: El Forum - 08-09-2007, 02:40 PM - No Replies

[eluser]stevefink[/eluser]
Hi all,

First and foremost, I'm having a blast with the CI learning process! Unfortunately I've run into a hurdle where I'm going to have to ask the community for some insight. I'm working on a small application that requires speaking to two separate databases. I followed the advice listed here in order to achieve this:

http://ellislab.com/codeigniter/user-gui...cting.html

So in config/database.php I've created two elements in the $db array consistent of $db['db1'] and $db['db2']. My questions are the following:

1) Do we leave $active_group defined if we're using multiple databases?
2) Where would be the best place to define the actual DB object instances? The constructor or the index() method?

I wrote the following code in my controller's index():

function index()
{
$DB1 = $this->load->database('db1', TRUE);
$DB2 = $this->load->database('db2', TRUE);

// retrieve all records.
$data['query'] = $DB1->get('tbl_signups');

.. yadda yadda ..
This query is unfortunately is trying to query the database defined in $DB2 (probably cause of a user error. Tongue )

Thanks again for any insight folks!


  best practice of exposing data to a view
Posted by: El Forum - 08-09-2007, 02:18 PM - No Replies

[eluser]Bacteria Man[/eluser]
I'm using a controller->library->model structure. The controller is extremely thin and is responsible for only displaying the view. The library contains all the business logic and the model interacts with the database.

With the above in mind, I'm trying to determine the best practice of exposing data to a view.

The most obvious way is to pass the data in the second parameter. For example:

Code:
$data['title'] = 'My Blog';
$this->load->view('blogview', $data);

What about data produced by the library? I like to return true/false from my functions. If false, the function failed for whatever reason. If true, the data is defined as an object and available to the view.

I suspect that a combination of both techniques is acceptable.

I'd appreciate any comments and/or a confirmation.

Thanks!


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Tool bar not showing
by paulbalandan
1 hour ago
The Hidden Cost of “Innov...
by gosocial2
3 hours ago
Block IP addresses of bad...
by sevmusic
5 hours ago
Validation does not appea...
by Tokioshy
6 hours ago
CodeIgniter.com - Report ...
by Vikas Mehta
Yesterday, 10:30 AM
best way to store tokens ...
by ahallrod
Yesterday, 10:03 AM
Hey Now it is a time for ...
by J0shflynn
06-29-2025, 06:44 AM
Forum Anti-Spam Measures
by J0shflynn
06-29-2025, 06:43 AM
tool bar not showing
by Luiz Marin
06-29-2025, 06:09 AM
Best Way to Implement Aff...
by InsiteFX
06-28-2025, 09:35 PM

Forum Statistics
» Members: 154,167
» Latest member: galaxycottage
» Forum threads: 78,434
» Forum posts: 379,695

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB