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

Error loading models for third party plugin

Development and Programming

hendyg's avatar
hendyg
1 posts
15 years ago
hendyg's avatar hendyg

I’m getting the error message “Error Unable to locate the model you have specified: public_forms_model” when i use the code below to load a model in a third party plugin.

$this->EE->load->model(PATH_THIRD . 'public_forms/models/public_forms_model');

Here is the model.

<?php

class Public_forms_model extends CI_Model {


    function Public_forms_model() 
    {
        parent::CI_Model();
        
        // LOAD LIBS, HELPERS
        $this->EE->load->database();
    }
    
    function insert_basic() 
    {
        $insert_data = array(
            'home_form_basic' => $_POST['basic']
        );
        
        $this->EE->db->insert('home_form', $insert_data);
    }
    

}

// END OF FILE ./SYSTEM/EXPRESSIONENGINE/THIRD_PARTY/PUBLIC_FORMS/MODELS/PUBLIC_FORMS_MODEL.PHP

Cheers for looking.

       

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.