S05e02 - Info pages extensions QUESTIONS/SUPPORT

Open to all! Ask other shopowners for help.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: S05e02 - Info pages extensions QUESTIONS/SUPPORT

Post by heatherbell »

Using the latest download zip and v1.0.9.0 (and tested on v.1.0.9.10)
In both author and folder, expecting the listen_infoBox function in the hook files to output in the infoBox but nothing shows there for either.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: S05e02 - Info pages extensions QUESTIONS/SUPPORT

Post by heatherbell »

heatherbell wrote: Thu Feb 13, 2025 8:43 am listen_infoBox function in the hook files
A vain attempt at changing the order of the functions was unsuccessful so still stuck on this one.
Any pointers appreciated.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: S05e02 - Info pages extensions QUESTIONS/SUPPORT

Post by burt »

I think they'd only show if an author / folder is assigned.
Assumption you have assigned??
I am not here to build for you.
I am here to build with you. Let's help each other.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: S05e02 - Info pages extensions QUESTIONS/SUPPORT

Post by heatherbell »

burt wrote: Thu Feb 13, 2025 1:10 pm Assumption you have assigned??
Yes, created a new info page - 'New Page'
Assigned Author:

Screenshot 2025-02-13 140436.png

but nothing in infobox:

Screenshot 2025-02-13 140514.png
You do not have the required permissions to view the files attached to this post.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: S05e02 - Info pages extensions QUESTIONS/SUPPORT

Post by burt »

Try

Code: Select all

$GLOBALS['table_definition']
As in

Code: Select all

function listen_infoBox($parameters) {
  if (!Text::is_empty($GLOBALS['table_definition']['info']->author ?? '') && ($container = AUTHORS_ARRAY[$GLOBALS['table_definition']['info']->author]['name'] ?? false)) {
    $parameters['contents'][] = ['text' => sprintf(PAGE_AUTHOR_CONTAINER, $container)];
  }
}
Similar for Folders.
I am not here to build for you.
I am here to build with you. Let's help each other.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: S05e02 - Info pages extensions QUESTIONS/SUPPORT

Post by heatherbell »

Yes, that change works TY.

Screenshot 2025-02-14 171015.png
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply