/**
  * Install the plugins
  *
  * Uses pluginhandler to perform this task
  * 
  */
 function installplugins()
 {
     include_once LOQ_APP_ROOT . 'includes/pluginhandler.class.php';
     define('T_PLUGINS', $_SESSION['config']['table_prefix'] . 'plugins');
     define('TBL_PREFIX', $_SESSION['config']['table_prefix']);
     define('BLOGURL', $_SESSION['config']['blog_url']);
     $ph = new pluginhandler($this->db);
     $ph->scan_for_plugins(LOQ_APP_ROOT . 'plugins');
 }
 * Loquacity is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Loquacity; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
/**
 * this is supposed to be a GUI for plugins,
 * need some help with some sort of api,
 * in the mean time we'll put them in an array.
 */
include_once LOQ_APP_ROOT . 'includes/pluginhandler.class.php';
$ph = new pluginhandler($loq->_adb);
$show_plugin_menu = TRUE;
$plugin_ar = array();
function identify_admin_plugins()
{
    return array('name' => 'plugins', 'type' => 'builtin', 'nicename' => 'Plugins', 'description' => 'Display information about, and run plugins', 'authors' => 'Eaden McKee', 'licence' => 'GPL', 'help' => '');
}
// PLUGINS :
if (isset($_POST['scan'])) {
    $np = $ph->scan_for_plugins(dirname(__FILE__));
}
if (isset($_POST['scan_refresh'])) {
    $np = $ph->scan_for_plugins(dirname(__FILE__));
    $loq->assign('np', "<b style='color: red;'>{$np} new plugins found and installed.</b><br />");
}
$rs = $loq->_adb->Execute("select * from " . T_PLUGINS . " order by type");