User Tools

Site Tools


This is an old revision of the document!

Using PHPlugins in Backlight 2

Enabling PHPlugins

To use PHPlugins, duplicate the existing PHP file, /backlight/custom/phplugins/phplugins-pangolin-sample.php. 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 CustomizationPHPluginsEnabled : On
  • Advanced CustomizationPHPluginsInclude 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 several example functions that you may use as a starting point.

using_phplugins_in_backlight_2.1537221030.txt.gz · Last modified: 2018/09/17 21:50 by matthew