1.0.8.20 Questions / Comments / Concerns

Open to all! Ask other shopowners for help.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.8.20 Questions / Comments / Concerns

Post by burt »

Brighton wrote: Wed Apr 19, 2023 10:26 am Would it be possible to show an ‘enabled’ column on all the Modules pages?
admin/modules.php

add

Code: Select all

[
'name' => TABLE_HEADING_ENABLED,
'class' => 'text-right',
'is_heading' => false,
'function' => function ($row) {
return ($row['enabled'] > 0)
? '<i class="fas fa-check-circle text-success"></i>'
: '<i class="fas fa-times-circle text-danger"></i>';
},
],
It should be fairly obvious where to add it.
Pls report back if it works (and that it causes no unintended consequences).
I am not here to build for you.
I am here to build with you. Let's help each other.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
Brighton
Member
Posts: 15
Joined: Sat Jan 08, 2022 12:13 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 1 time

Re: 1.0.8.20 Questions / Comments / Concerns

Post by Brighton »

Thank you, that appears to be exactly what was wanted. It displays the ‘Enabled’ column on all the Modules pages. A couple of things to note -

To place the column in the same relative position as on the Content modules page,
modules.php line 63 array_splice($table_definition['columns'], -1, 0, [
change the –1 to –2

Your suggestion was added after line 44 in modules.php

includes/modules/cfg_modules/cfgm_content.php
to suppress the existing ‘Enabled’ column showing as a duplicate on the Content modules page
comment out lines 72 – 84

includes/modules/cfg_modules/cfgm_layout.php
to suppress the existing ‘Enabled’ column showing as a duplicate on the Layout modules page
comment out lines 144 – 154

Sorry for the late reply, I hadn’t noticed this second page.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.8.20 Questions / Comments / Concerns

Post by burt »

Did anyone else try the changes as detailed in the two posts above [my post and Brighton post]?
Would it be a useful change in the next version of Phoenix ?
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: 1.0.8.20 Questions / Comments / Concerns

Post by heatherbell »

burt wrote: Mon May 01, 2023 10:29 am Did anyone else try the changes as detailed in the two posts above [my post and Brighton post]?
Yes. Confirmed that those changes result in expected behaviour.
burt wrote: Mon May 01, 2023 10:29 am Would it be a useful change in the next version of Phoenix ?
Definitely because the behaviour before changes is unexpected.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: 1.0.8.20 Questions / Comments / Concerns

Post by Kofod95 »

I second heatherbell on the post above. The change makes unexpected behavior into expected behavior in my view. Thank you for the code and for looking into it!

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.8.20 Questions / Comments / Concerns

Post by burt »

If I can get Sourcetree up and running I'll make a branch this week with some minor changes for Matts approval/pull. Thanks Chaps.
I am not here to build for you.
I am here to build with you. Let's help each other.


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