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

[eluser]wiredesignz[/eluser]
Hopefully no code changes Mikey. Please try it and let me know.

PHP5 is actually slower than PHP4 judging by my tests, but PHP5 offers many coding advantages some of which are used by ME 5.2

[eluser]koniciwa[/eluser]
Hi Guys,

I'm trying to load a set of libraries in a module folder by default whenever a controller is accessed.

the structure would be something like:
/module
/default
/libraries
lib1
lib2
lib3
/welcome

so when i access index.php/welcome , the controller would autoload libraries 'default/lib1','default/lib2' and 'default/lib3'. I can't use the regular config/autoload.php because the libraries would act as plugins that can be enabled or disabled.

I have previously used version 4.2 (w. module_helper) and was able to call a central library that was supposed to load other enabled libraries via $CI->load->library('default/lib1'). I found that this would not work with the latest version of modular extensions. Hope that someone out there can point me in the right direction, especially if there's a better way of implementing such a plugin functionality.

Thanks in advance.

edit: also how do I load module models and such from libraries?

[eluser]m4d3 Gun[/eluser]
hi..need help please… “can’t load another model in a model”

i’ using module system “Modular extention” in my blog,
and i have one module call “blog”, inside..
- models : mdl_blog, mdl_categories
- controllers : blog
my problem is…when i call mdl_categories in mdl_blog to proccess in controller..
i got message : “unable to locate model….mdl_categories”

anyone can help me please….how to fix it?

thank’s

M4d3

[eluser]ice_prince7[/eluser]
Hi all,

sorry to bother you with this might-be-something-obvious problem

Im trying out Modular extension by wiredesignz.

I got stumble when i want to pass data via form_open.

it seems that it doesnt go to my immediate controller, but rather to index.php/product/add_to_cart.

This is my hierachy
Quote:application/
modules/
product/
controllers/product.php
views/product_list.php

This is my controller
Code:
<?php

class Product extends Controller {

    function __construct()
    {
        parent::Controller();
    }
    
    function product_list()
    {  
        #get products
        $get_product = $this->db->get('product');
        $data['product'] = 'empty';
        if($get_product->num_rows()>0){
        
            $data['product']=$get_product->result();  
            
        }
        
        $this->load->view('product_list',$data);
    }
    
    function add_to_cart(){
        echo 'asdsadas';
        print_r($this->input->post('product'));
        
        
    }
}

/* End of file product.php */
/* Location: ./application/modules/product/controllers/product.php */

This is my view :
Code:
<div id="cart">
    <h1>Product List</h1>
    <div id="content">
        &lt;?php if($product=='empty'){
            
            ?&gt;<div>There is no product yet</div>&lt;?php
            
            
        }else{
            
            ?&gt;
            <table>
                <tr>
                    <td>Item</td>
                    <td>Quantity</td>
                    <td>Price</td>
                    <td>&nbsp;</td>
                
                </tr>
            
            &lt;?php
            
            foreach($product as $item){
                $len =20;
                ?&gt;
                      
                <tr>
                    <td>&lt;?php if(strlen($item->productName)>=$len){echo substr($item->productName,0,$len).'...';}else{echo $item->productName;}; ?&gt;</td>
                    <td>&lt;?php echo $item->quantity; ?&gt;</td>
                    <td>Price</td>
                    <td>
                        &lt;?php echo form_open('product/add_to_cart');?&gt;// here is where im passing my data
                        &lt;input type="submit" name="product[&lt;?php echo $item-&gt;productId; ?&gt;]" value="Add to Cart" />
                        &lt;?php echo form_close();?&gt;
                    </td>
                
                </tr>
                &lt;?php
            }
        ?&gt;</table>&lt;?php    
        }?&gt;
    </div>
</div>

Any ideas on how do i get the data from view to controllers/product/add_to_cart ?
sorry for posting any noob question.

thankx

[eluser]liri[/eluser]
I'm using the latest revision of MX from the bitbucket repo.
In one system where I have PHP5.3.3 I don't seem t have a problem but
when moving my project to a system with PHP5.2.6 I'm getting the following
error:
Code:
ERROR - 2011-02-12 18:47:31 --&gt; Severity: Notice  --&gt; Undefined index:  Gvis /var/www/tests/ci_project/application/third_party/MX/Loader.php 152

==> /var/log/syslog <==
Feb 12 18:47:31 system apache2: PHP Fatal error:  Cannot access empty property in /var/www/tests/ci_project/application/third_party/MX/Loader.php on line 161
Feb 12 18:47:31 system apache2: PHP Stack trace:
Feb 12 18:47:31 system apache2: PHP   1. {main}() /var/www/tests/project/index.php:0
Feb 12 18:47:31 system apache2: PHP   2. require_once() /var/www/tests/project/index.php:115
Feb 12 18:47:31 system apache2: PHP   3. Base->__construct() /var/www/tests/project/system/codeigniter/CodeIgniter.php:201
Feb 12 18:47:31 system apache2: PHP   4. MX_Loader->library() /var/www/tests/project/application/modules/base/controllers/base.php:12
and this seems to happen when I try to load a library which is in application/libraries/

The project is based on CI1.7


Any ideas why this is happening... ?

[eluser]wiredesignz[/eluser]
CodeIgniter version 1.7 is no longer supported.

[eluser]liri[/eluser]
ahh... odd, I thought it did.
Are you sure that error is related to a non-supported CI version and nothing else?

[eluser]liri[/eluser]
Nope, this isn't v1.7 related at all.
I'm using CIv2 and it's still error'ing about the same thing...

Could you possibly say what is the error with it?
I'm simply attempting to load a library such as
Code:
$this->load->library('FBConnect');
from the constructor on MY_Controller.php in applications/core/ which extends MX_Controller

[eluser]wiredesignz[/eluser]
Read the user guide paragraph on file and class naming conventions.

[eluser]Basketcasesoftware[/eluser]
[quote author="wiredesignz" date="1297572312"]Read the user guide paragraph on file and class naming conventions.[/quote]

Yes, you should be loading library 'fbconnect' not 'FBconnect'

Your class must begin with an uppercase letter as should the filename, and the file should have the exact same name as the class.




Theme © iAndrew 2016 - Forum software by © MyBB