Skip to main content

Using PHPlugins

PHPlugins enable designers to effect changes to their Backlight website globally, locally or specific to a single page, and to maintain those changes from a single, persistent location. Using PHPlugins, user customizations may be applied to pages with precise control and in a dynamic, automated fashion.

The possibilities are limited only by your ingenuity — use PHPlugins to keep up with your constantly changing social networks; site-wide navigation menus may be managed and updated from a single source; custom header, menu and footer designs may be applied dynamically to all pages in your site, and widgets may be added to specific pages.

With Great Power Comes Great Responsibility

Be forewarned, however, that PHPlugins should be filed under Advanced Features. The feature is intended for use by web-designers, and assumes prerequisite knowledge of HTML and CSS, perhaps some JavaScript, familiarity using an FTP client and text-editor to access and manipulate files on a web-server, and some degree of comfort working with PHP script.

If the last paragraph makes you queasy feeling, then PHPlugins are not for you. There are limits to the amount of support we can provide on these features if you do not have the necessary background to make sense of them.

That said, our documentation and the provided examples should allow most users to make sense of things without too much trouble.

Enabling PHPlugins

To use PHPlugins, copy the existing PHP file, /backlight/modules/custom-resources/phplugins/phplugins-pangolin-sample.php, to /backlight/custom/phplugins. Rename the file as you like, keeping the .php extension; for example "my-phplugins.php".

In Backlight's Designer, edit the desired Page Template. Scroll down and set:

  • Advanced Customization => PHPlugins => Enabled : On
  • Advanced Customization => PHPlugins => Include File : file-name.php

Any page, album or album set utilizing that template will run functions from the specified script file.

the Hook Function

The basic hook function looks like this:

function __HOOK__() {
echo '

<!-- something echoed -->

return false;
} // END

the Hooks

View the phplugins-pangolin-sample.php file in a text-editor for a complete list of the available hooks. These may be used to replace __HOOK__ in the function above, and correspond to predefined locations in the printed page.

The sample file also contains example functions that you may use as a starting point, or that can be used as-is to implement new features.