Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2019-03-20 02:48:45

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Error in user load function in phplugins - how to fix??

Here is the error:
Something went wrong

Unexpected error: Undefined offset: 1 in kp-plugins.php on line 13

Please report error at http://community.theturninggate.net

Here is the function in plugins file
By the way this is the first time I am using this function which I have not changed from the default sample file.  I have the latest Sample file also.

function user_load($style, $path)
{
  $g_tsvrl = explode(' ', $style); // Extract gallery type
  define ('G_STYLE', strtoupper($g_tsvrl[1])); // and set global for later
  $g_path = str_ireplace('\\','/',$path); // change \ to /
  $chunks = explode('/',$g_path); // and put into array
  define ('G_PATH', strtoupper($chunks[count($chunks)-2])); // gallery folder name is second to last
  //define ( 'TTG_SITE', ''); // set new site root for navigation, resources, etc.
}

Here is my calling function from copy_top()
user_load($this->style, $this->path);
Here is the values of style and path that is being passed
Path=/galleries/landscapes
Style=BACKLIGHT-PANGOLIN

Any Suggestions???

Offline

#2 2019-03-20 03:37:52

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Error in user load function in phplugins - how to fix??

I don't believe you should be using the user_load function.


There's a sample function starting on line 472 that shows how to target pangolin templates


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2019-03-20 04:15:22

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Re: Error in user load function in phplugins - how to fix??

Well that is not what I want to do. user_load is a public function so it should work.

Offline

#4 2019-03-20 04:46:35

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Error in user load function in phplugins - how to fix??

AFAIK, user_function() is called by Backlight to initialize phplugins.

Why do you want to call this function?


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#5 2019-03-20 04:59:05

mad
Member
From: Arkansas
Registered: 2014-01-03
Posts: 154
Website

Re: Error in user load function in phplugins - how to fix??

Never mind I got it to work with what I wanted to do.

Offline

#6 2019-05-20 16:34:01

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Error in user load function in phplugins - how to fix??

^ spam

Offline

#7 2019-05-20 20:57:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Error in user load function in phplugins - how to fix??

Spammer terminated wink

Last edited by rod barbee (2019-05-20 22:37:16)


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2019-05-20 21:42:26

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Error in user load function in phplugins - how to fix??

I just thought I’d leave that for a few minutes. The spammers are starting to write seemingly-relevant comments. There was another one about SSL certificates that provided a useful article.

Offline

Board footer

Powered by FluxBB