Hi there. I’m new to Expression Engine, not to PHP/MySQL.
I want to develop a plugin that grabs data from a database and formats it. I would like it to be used in a template like this:
{exp:pluginName:specificMethod}
<li><a href="http://{url}">{text}</a></li>
{/exp:pluginName:specificMethod}where “specificMethod” is some set routine querying a database, and where the row is looped for the number of records found.
I have a few questions.
Is it a plugin that I want? I don’t need to configure it or anything like that, but I read somewhere that a plugin is for template-type actions, and querying the database is hardly front-end. Would a module or extension be more appropriate?
Which plugin folder do I use? I see “system/plugins”, “system/expressionengine/plugins”, and “system/expressionengine/third_party”. I’ve read that it should be “system/plugins”, but the “Magpie RSS Parser” and “XML Parser” plugins that ship with Expression Engine are under system/expressionengine/plugins… The Hello_world plugin from http://expressionengine.com/docs/development/plugins.html that I tested with doesn’t seem to get registered no matter where I put it.
Somewhat related to #2. Is there some cache-clearing or setting-changes required to get the plugin to display in the plugins manager in the control panel? It’s not showing up on a browser refresh, and the editing templates gives a “plugin not found” warning.
Here is the source for Hello_world (direct from http://expressionengine.com/docs/development/plugins.html):
<?php
class Hello_world
{
var $return_data = "";
function Hello_world()
{
$this->return_data = "Hello World";
}
}
?>The file name is “pi.hello_world.php”, and I tried placing it in “system/plugins”, “system/experssionengine/plugins”, and “system/expressionengine/thrid_party” with no effect.
Many thanks,
Anthony
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.