• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modular Extensions - (HMVC) - Version 3.1.9

#21
[eluser]shar_[/eluser]
Hello, it is very cool, but i have some warning "Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file"...
What i have to do, it is mistake or not?

#22
[eluser]Edemilson Lima[/eluser]
Does it occur in your code or in the Modular Extensions code? Didn't the error message give any clue about the line where it occurred?

#23
[eluser]wiredesignz[/eluser]
Check php.ini
allow_call_time_pass_reference = Off

Yes this is an issue, I will fix the code. Thanks... check the wiki soon.

#24
[eluser]wiredesignz[/eluser]
Current version is 3.0.2
Fixed `allow_call_time_pass_reference` error. Thanks

#25
[eluser]gerben[/eluser]
There's a typo in the new 3.0.2 in the wiki:

function &load;($modules, $path = '/controllers/', $base = 'modules/')

(you should remove the ";", but I think that's something the forum & wiki add automatically, somehow...

#26
[eluser]wiredesignz[/eluser]
Thanks gerben, stupid wiki. :lol:

Fixed Wink

#27
[eluser]gerben[/eluser]
I've been playing with the new version, but I can't seem to get it to work correctly. Somehow I can't assign modules::run to a variable, because the module gets executed instantly when I try to do that.

Code:
Class Main extends Controller
{
    function Main()
    {
        parent::Controller();
      
        
    }
    

    function index()
    {    
    
    $content = modules::run('home');
        
        $data = array(
            'title'   => 'My Page',
            'content' => $content,
          
        );
      
        $this->load->view('default' , $data);
    }
}


The content in the home-module is parsed even before the first line of the 'default' view. What am I doing wrong?

#28
[eluser]wiredesignz[/eluser]
In your module you would make it return the View using CI's default method.
Code:
return $this->load->view('a_view', $data, TRUE);  //TRUE returns output, FALSE displays it.

If it is a module View instead:
Code:
return $this->load->module->view('a_view', $data, TRUE);  //TRUE returns output.

I'll put an example on the wiki too.

#29
[eluser]Edemilson Lima[/eluser]
Quote:In your module you would make it return the View using CI’s default method.

Couldn't it, by default, catch all the output of a module with PHP output buffering and return it to the parent controller? Is this possible or may it make the helper less flexible?

#30
[eluser]wiredesignz[/eluser]
CodeIgniters load->view already uses output buffering, and will return it or output it as required.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.