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.