Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - Version 4.3
#21

[eluser]gerben[/eluser]
Quote:If you could explain your reason for needing this feature, I will add it to the next update.

I think the most obvious reason for getting the parent name would be to create a sub-controller that acts differently depending on which main controller uses it. That would be a great addition!

Quote:My plan is to create a non-invasive MY_Loader extension which will allow modules to run directly from the URL.

Woohoo! Wink

I can't believe what you've been creating in just two weeks. To see where this project started, and to see where it is now! This is such a wonderful addition! Everybody is going to use it, I'm sure!
#22

[eluser]Référencement Google[/eluser]
I am motivated to do it with you, we just have to:
- Buy a domain name or something like that wich is free
- Install a forum for start to discuss about it
- Maybe make an IRC channel to ease the discussions
- Decide how the website will be
- Built it and promote it

If this seems interresting for you, let's PM together our email adresses, ok?
#23

[eluser]wiredesignz[/eluser]
That sounds like good enough reason gerben, I will add it to tomorrow's update. :lol:

Thanks for your comments also.
#24

[eluser]wiredesignz[/eluser]
@elitemedia:
I am building a website project as well as developing the modular extensions at present, Perhaps we could start a little slowly and create a thread on CI forums for Modules first.

I have already submitted one module helper to the wiki and created a Modules category for this purpose.

I do like your enthusiasm though. :lol:
#25

[eluser]Référencement Google[/eluser]
ok, I will follow it then, and I'll stay in touch with you on CI forum for the moment.
#26

[eluser]Edemilson Lima[/eluser]
Modular Extensions is growing fast and I am very happy to be part of it. :coolsmile:

We need people to write a good documentation for it too. I have a small text about it done, if somebody here want something to start.
#27

[eluser]badgeek[/eluser]
modular extensions rocks!

i have some trouble when loading ci library inside a module

Code:
$this->load->library('pagination');

it gave me

Unable to find the requested file: search_module//libraries/pagination.php

is this a bug?
#28

[eluser]sophistry[/eluser]
@wiredesignz - nice work keeping this all coming. i haven't had the opportunity yet to try out the library but it looks cool.

could you do everyone one favor? each time you release a new version you have started a new thread - so, i have missed a few and have had to stumble upon them. when you break off an old thread and start a new thread for a new version, could you do a favor and make a final post to that dead thread?

thx.
#29

[eluser]Avatar[/eluser]
Yes, the parent is a good idea. When placing modules inside of other modules there is a need for a parent variable so that we can distinguish what is parent and how far down it goes down the tree. I want module to do different stuff if it's a child and/or has a parent module or it the parent by itself. Just don't see how without a parent variable.

At the moment I would have to load a module inside another module like so:
Code:
'content'=>modules::run('home/modules/home_page/home_page',$data),
home being the parent module and homepage being the sibling. Also notice how I have to write home_page/homepage in order for it to work. What if this sibling had another sibling? we need a variable to track this and stuff.

Maybe also if we make the modules array to be accessible by other modules and/or controllers, would be nice.
I've added $modules below,

Code:
class Modules
{    
    var $modules=array();
    function & load($modules, $base = 'controllers/')

Thank yous
#30

[eluser]Avatar[/eluser]
this is my sibling module:
//The Home_page_a module loads, just can't get the view of Home_page to load properly now since it thinks is within the parent modules views, but its not
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Home_page extends Module
{
    function Home_page()
    {
        parent::Module();
    }
    
    function index($data)
    {      
                
        $data = array(
            'home_page_content'=>modules::run($this->_parent.'/modules/'.get_class($this).'/modules/'.'home_page_a/home_page_a',$data)
        );
//the reason why I have to do home_page_a/home_page_a is because my module is within controllers directory like so /modules/home/modules/home_page/controllers/home_page.php and not in the /modules/home/modules/home_page/home_page
        //home content only has this string: <?=$home_page_content;?>
        return $this->load->module->view('home_page',$data,true);
    }
}
error with this:
Code:
Unable to find the requested file: home/modules/controllers/home_page/home_page.php
BELOW MODULES WORKS:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Home_page extends Module
{
    function Home_page()
    {
        parent::Module();
     }
    
    function index($data)
    {      
        $data = array(
            'home_page_content'=>modules::run($this->_parent.'/modules/'.get_class($this).'/modules/'.'home_page_a/home_page_a',$data)
        );
        
        return $this->load->module->view($this->_parent.'/modules/'.get_class($this).'/home_page',$data,true);//$this->load->module->view('home_content', $data, TRUE);
    }
}
?>
can we add redundancy to module existence check for siblings? (if not in /module, then check /module/ controllers, etc)




Theme © iAndrew 2016 - Forum software by © MyBB