We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

basic module install but showing not installed

Development and Programming

bhw1's avatar
bhw1
43 posts
16 years ago
bhw1's avatar bhw1

This is prob a very basic issue but I seem to be missing something. When I click install it says its installed, I can see it in the database but it shows “Not Installed” in my modules list. This is really just intend to let me tinker with what the API exposes so its a bare bones module (did I miss something required). Also a further test using {exp:mlanguage:test} in a template spit a “tag cannot be processed” error. Ideas?

system/languages/english/lang.mlanguage.php

$L = array(

//----------------------------------------
// Required for MODULES page
//----------------------------------------

"mlanguage_module_name" =>
"Multi Language",

"mlanguage_module_description" =>
"For displaying the correct language",

//----------------------------------------

// END
''=>''
);

system/modules/mlanguage/mod.mlanguage.php

class MLanguage {

    var $return_data    = 'this is the return data';

    function MLanguage()
    {        
        global $DB, $TMPL, $IN, $FNS;
               
        
    }

    function test(){
       return 'this is the test';
    }
}

system/modules/mlanguage/mcp.mlanguage.php

class MLanguage_CP {

    var $version = '1.0';
    
    function MLanguage_CP()
    {
        global $IN, $DB;
        // check for version here

    }
    
    function mlanguage_module_install()
    {
        global $DB;        
        
        $sql = "INSERT INTO exp_modules (module_id, 
                                           module_name, 
                                           module_version, 
                                           has_cp_backend) 
                                           VALUES 
                                           ('', 
                                           'MLanguage', 
                                           '".$this->version."', 
                                           'n')";
                                           
    
        $DB->query($sql);
        
        
        return true;
    }
      
    function mlanguage_module_deinstall()
    {
        global $DB;    

        $sql = "SELECT module_id FROM exp_modules WHERE module_name = 'MLanguage'";              
        $DB->query($sql);
    }

}
       
Greg Aker's avatar
Greg Aker
6,022 posts
16 years ago
Greg Aker's avatar Greg Aker

It looks like on your class and method names, you just need to capitalize the first letter. Try that, and let’s see if that does it for you.

-greg

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
16 years ago
John Henry Donovan's avatar John Henry Donovan

bhw1,

I am going to move this to the more appropriate Modules forum for you

       
bhw1's avatar
bhw1
43 posts
16 years ago
bhw1's avatar bhw1

That seems to have fixed it.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.