User Tools

Site Tools


plugins:installation

This is an old revision of the document!


How to Install GetSimple Plugins

When you install a plugin there are a few things that you need to do:

  1. Unzip your plugin if it came in a ZIP file.
  2. Copy all the files that came with your plugin to your server inside the /plugins/ folder with an FTP client.
  3. You can view your installed plugins by logging into your GetSimple administration panel, and clicking the Plugins tab.

Note: Plugins are enabled by default. If you want to have a plugin on your server's file system, but disabled, goto Plugins and click the disable button beside that particular plugin in your list.

Inserting Plugin Code into Themes

Some plugins require you to insert a bit of their code into your theme to make it fully operable. However, if the plugin is not activated, it will “break” the Theme and it may report errors or fail to load. It is therefore imperative to prevent the plugin from being detected in case it is turned off.

To detect if a plugin is installed, you can use a simple function_exists() check. The if (function_exists()) checks for the plugin, and if it exists, it will use it. If it returns FALSE or “not found”, it will ignore the plugin tag and continue loading the page.

<?php
if (function_exists('FUNCTION NAME')) {
  FUNCTION_NAME();
}
?>

For example, the plugin Pages excerpts use a function called page_excerpt() to print out its contents.

<?php
if (function_exists('page_excerpt')) {
   echo page_excerpt('index');
}
?>
plugins/installation.1351698868.txt.gz · Last modified: 2013/04/19 14:57 (external edit)