2

I copied an online example exactly, named it appropriately, placed it in the plugin folder, and (I think) changed the location attribute to match the other plugins in my plugin folder. The code is below.

File Name: pi.auto_acronym.php

<?php  
    $plugin_info       = array(  
    'pi_name'        => 'Auto Acronym',  
    'pi_version'     => '1.0',  
    'pi_author'      => 'John G',  
    'pi_author_url'  => 'http://google.com',  
    'pi_description' => 'Automatically wraps certain acronyms in the HTML <acronym> tag',  
    'pi_usage'       => Auto_acronym::usage()  
    );  

class Auto_acronym{  
    function Auto_acronym(){  
    }  
    // ----------------------------------------  
    //  Plugin Usage  
    // ----------------------------------------  
    function usage()  {  
        ob_start();   
        ?>  
        This is where our simplified documentation will go  
        <?php  
        $buffer = ob_get_contents();  
        ob_end_clean();   
        return $buffer;  
    }  
}
/* End of file pi.auto_acronym.php */  
/* Location: ./system/expressionengine/plugins/pi.auto_acronym.php */  

This file is indeed placed in my .\PROJECT_NAME\system\expressionengine\plugins folder. There are other plugins in the folder that came with the install.

Edit: I just noticed that there is a missing '?>' at the end of the plugin. I tried completing the block, but it still didn't work. I checked the other plugins, they too all have that missing closing php block. So that isn't the issue.

Edit 2: Based off Rob Sanchez's suggestion, which solved my issue. I moved my plugin to the third-party folder as follows.

File Name: pi.auto_acronym.php

<?php  
    $plugin_info       = array(  
    'pi_name'        => 'Auto Acronym',  
    'pi_version'     => '1.0',  
    'pi_author'      => 'John G',  
    'pi_author_url'  => 'http://google.com',  
    'pi_description' => 'Automatically wraps certain acronyms in the HTML <acronym> tag',  
    'pi_usage'       => Auto_acronym::usage()  
    );  

class Auto_acronym{  
    function Auto_acronym(){  
    }  
    // ----------------------------------------  
    //  Plugin Usage  
    // ----------------------------------------  
    function usage()  {  
        ob_start();   
        ?>  
        This is where our simplified documentation will go  
        <?php  
        $buffer = ob_get_contents();  
        ob_end_clean();   
        return $buffer;  
    }  
}
/* End of file pi.auto_acronym.php */  
/* Location: ./system/expressionengine/third_party/auto_acronym/pi.auto_acronym.php */ 

The above file is placed in the ./PROJECT_NAME/system/expressionengine/third_party/auto_acronym/ folder.

1
  • FYI. There shouldn't be a closing ?> tag at the end of the file.
    – foamcow
    Aug 27, 2013 at 15:22

1 Answer 1

3

You need to make a folder in your system/expressionengine/third_party folder called auto_acronym and place your plugin file in there.

2
  • I attempted your suggested fix and modified the question to show what I've done. EE still isn't seeing the plugin.
    – John G
    Aug 27, 2013 at 14:58
  • Okay. I figured it out. Your suggestion fixed my issue. I was copying what I saw already existed in the third-party folders. I mistakenly changed the prefix of my files to "ft." because other third party tools were formatted that way. I changed my file prefixes back to "pi." and now EE can see them! Thanks tons for the help.
    – John G
    Aug 27, 2013 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.