User Tools

Site Tools


using_phplugins

Using PHPlugins

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__( $style, $path ) { 
	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.txt · Last modified: 2017/07/01 03:59 by matthew