Welcome Guest, Not a member yet? Register   Sign In
A little help needed with creating a library
#2

[eluser]TheFuzzy0ne[/eluser]
You're missing the dollar sign prefix on the call to $this->initialize(). Those typos are a bummer. Wink

My SI CAPTCHA library loads settings from a file. You might be able to learn something from the constructor.

Code:
function Si_captcha($config=array())
{
    $this->CI =& get_instance();
    $this->CI->load->library('session'); // Load the session library in case it's not already loaded.
    
    // Load the default configuration.
    require_once(APPPATH . 'config/securimage'.EXT);
    if (isset($SI_config))
    {
        $this->initialize($SI_config);
        unset($SI_config);
    }
    
    // Now override with the users config if it's been supplied.
    $this->initialize($config);
    // Suh-weeeet...
}


Messages In This Thread
A little help needed with creating a library - by El Forum - 03-04-2009, 11:53 AM
A little help needed with creating a library - by El Forum - 03-04-2009, 12:02 PM
A little help needed with creating a library - by El Forum - 03-04-2009, 05:58 PM
A little help needed with creating a library - by El Forum - 03-04-2009, 08:21 PM
A little help needed with creating a library - by El Forum - 03-05-2009, 01:32 AM
A little help needed with creating a library - by El Forum - 03-05-2009, 02:04 AM
A little help needed with creating a library - by El Forum - 03-05-2009, 02:40 AM
A little help needed with creating a library - by El Forum - 03-05-2009, 02:44 AM
A little help needed with creating a library - by El Forum - 03-05-2009, 03:59 AM
A little help needed with creating a library - by El Forum - 03-05-2009, 04:04 AM
A little help needed with creating a library - by El Forum - 03-05-2009, 04:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB