Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - HMVC version 5.2

[eluser]dpgtfc[/eluser]
[quote author="wiredesignz" date="1227149711"]
Quote:...if I load the pagination class in a controller, I get an error (displayed at end of the post)...
... no longer support for controllers being in sub-directories. Is that intended?

Loading the pagination library works without error here. Try again.

[/quote]

Still doesn't work. Works fine when doing auto-load, but if I do $this->load->library('pagination'); (without the auto-load of course) I get the error. This didn't happen before I installed ME.

[eluser]wiredesignz[/eluser]
[quote author="dpgtfc" date="1227298489"]Still doesn't work. Works fine when doing auto-load, but if I do $this->load->library('pagination'); (without the auto-load of course) I get the error. This didn't happen before I installed ME.[/quote]

Well I'm sorry, I have tested this many times and it does work, I have also asked other ME users to test and pagination loads for them without error.

I suggest you go back and check everything again.

Good luck.

[eluser]dpgtfc[/eluser]
[quote author="wiredesignz" date="1227299699"][quote author="dpgtfc" date="1227298489"]Still doesn't work. Works fine when doing auto-load, but if I do $this->load->library('pagination'); (without the auto-load of course) I get the error. This didn't happen before I installed ME.[/quote]

Well I'm sorry, I have tested this many times and it does work, I have also asked other ME users to test and pagination loads for them without error.

I suggest you go back and check everything again.

Good luck.[/quote]

Uh, ok, check what? Nothing changed except me putting the ME library files in the library directory. It worked before, doesn't work now, but works if I include it in the autoload.

Nothing changed except ME...

Have you tested it loading it in the constructor?

[eluser]wiredesignz[/eluser]
To which constructor of which class are you referring?

If you would like more help you will need to post your code so I can try to work out what is happening.

Posting your debug logs may also help.

[eluser]dpgtfc[/eluser]
[quote author="wiredesignz" date="1227301714"]To which constructor of which class are you referring?

If you would like more help you will need to post your code so I can try to work out what is happening.

Posting your debug logs may also help.[/quote]

The constructor of the controller class, like so:

Code:
<?php

class Panel extends Controller
{
  function Panel()
  {
     parent::Controller();
     $this->load->library('pagination');
  }
}

If I comment out $this->load-library('pagination'); and use autoload for pagination, it works. Otherwise I get the message from before.

Now, I didn't install ME from a fresh CI install, I dropped it into an existing application, one that worked fine before. It works fine now too, but only if I remove the pagination load from all my constructors that use it. I didn't make any other changes though so I don't know what I am doing wrong.

Edit: I'm at school right now, finishing a paper, but when I get home I'll post more.

[eluser]wiredesignz[/eluser]
Ok I suggest you set up a clean CI 1.7 install with ME 5.1.39 and try this:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*
**/
class Panel extends Controller
{
  function Panel()
  {
     parent::Controller();
     $this->load->library('pagination');
  }
  
  function index()
  {
      print_r($this->pagination);
  }
}
My output is like so:
Code:
CI_Pagination Object
(
    [base_url] =>
    [total_rows] =>
    [per_page] => 10
    [num_links] => 2
    [cur_page] => 0
    [first_link] => ‹ First
    [next_link] => >
    [prev_link] => <
    [last_link] => Last ›
    [uri_segment] => 3
    [full_tag_open] =>
    [full_tag_close] =>
    ...
Good luck.

[eluser]wiredesignz[/eluser]
Modular Extensions version 5.1.40 is now available on the wiki.

Updated Modules class.
modules::run() output is buffered and returned.

[eluser]Johan André[/eluser]
Is there any way to check if a module is loaded from another module or controller?

[eluser]wiredesignz[/eluser]
Hey Johan,

There is no real way of determining how a module controller was loaded, you may pass some identifier to it yourself, but there is nothing within ME.

[eluser]Johan André[/eluser]
wiredesign:

Oki. Thanx!
Another question:

How do I load a model from another module?

Code:
$this->load->model('module/model');

does not seem to work...

Any ideas?




Theme © iAndrew 2016 - Forum software by © MyBB