Community @ The Turning Gate

Support community for TTG plugins and products.

You are not logged in.

#1 2018-09-13 02:35:31

Daniel Leu
Registered: 2012-10-11
Posts: 1,356

Updating phplugins

This is just a short summary on how to update phplugins from Backlight 1 to Backlight 2.

It's a good idea to look at the new sample file (backlight/custom/phplugins/phplugins-pangolin-sample.php) to see all the available functions and how the file structure is.

1) Phplugins are now class based. So all functions need to be defined within a class context. This is well seen in the example file.

class PHPlugins extends APHPlugins {
  // put your functions here 

2) Function names changed and lost their arguments. You only need to remove the ttg_ prefix and whatever is between parentheses.

function ttg_pallet_top_title( $style, $path ) { 
	echo '
		// ......
	return false;
} // END /**/


// Basic structure for a PHPlugins function
function pallet_top_title() { 
	echo '
		// ......
	return false;
} // END /**/

3) If you call another function within the PHPlugins class, you need to use


instead of just


4) Backlight 1 $style and $path arguments are accessible as





Please first make a copy of either /backlight/custom/phplugins/phplugins-pangolin-sample.php or /backlight/custom/phplugins/phplugins-okapi-sample.php and give it a good name: let's call it /backlight/custom/phplugins/site-phplugins.php. Then select this file in your template editor as your site's phplugins file. Add your custom functions from your Backlight 1 phplugins file and adjust them accordingly.

Last edited by Daniel Leu (2018-12-19 07:46:19)

Daniel Leu | Photography


#2 2018-09-13 02:56:31

From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,573

Re: Updating phplugins

Thanks, Daniel! This was on my To-do list, but you've just saved me having to find that time. big_smile

Campagna Pictures,
The Turning Gate,


#3 2018-12-13 01:56:17

rod barbee
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 16,433

Re: Updating phplugins

And make sure to start with the file named phplugins-pangolin-sample.php or phplugins-okapi-sample.php. The are the ones that are set up for Backlight 2,

Just a user with way too much time on his hands., Backlight 2 test site, Pangolin test site


Board footer

Powered by FluxBB