disable installed extension trough extension

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Theriddler1
Registered User
Posts: 440
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Contact:

disable installed extension trough extension

Post by Theriddler1 » Wed Dec 06, 2017 9:45 am

I created an extension, but it is needed to disable an other extension due to conflicts with the other

how can i do this in my extension?
Theriddler - Moderator @ phpBB.nl | phpBBservice.nl Team-member
ImageSupport Tools | Image My Extensions | buy me a beer Image

User avatar
david63
Jr. Extension Validator
Posts: 13143
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: disable installed extension trough extension

Post by david63 » Wed Dec 06, 2017 9:48 am

What sort of conflicts? There may be a way around them.

I do not think that the correct way is for one extension to disable another extension because of conflicts - you should be working on avoiding any such conflicts.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Theriddler1
Registered User
Posts: 440
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Contact:

Re: disable installed extension trough extension

Post by Theriddler1 » Wed Dec 06, 2017 3:15 pm

david63 wrote:
Wed Dec 06, 2017 9:48 am
What sort of conflicts? There may be a way around them.

I do not think that the correct way is for one extension to disable another extension because of conflicts - you should be working on avoiding any such conflicts.
There were conflicts with an extension which uses the same css class as the other extension of mine
so i thought i disable the other extension in the listener with code.

also i thought about to disable the whole stylesheet link href with jquery but that don't work since the href path uses assets variable.

For now i solved it by adding !important to the css class, to overrule the other.

But still want to know (if possible) if there is a way to let an extension disable an other extension.
Theriddler - Moderator @ phpBB.nl | phpBBservice.nl Team-member
ImageSupport Tools | Image My Extensions | buy me a beer Image

User avatar
Elias
Registered User
Posts: 4605
Joined: Sat Feb 25, 2006 4:31 pm
Location: In the Water!
Name: Elias
Contact:

Re: disable installed extension trough extension

Post by Elias » Wed Dec 06, 2017 3:22 pm

I don’t think it’s right to have your extension disable another one (what is the point in having both installed?).

If I was to download and install your extension, I should be warned and told which extension I cannot use it with due to a conflict between both.
"Mystery creates wonder, and wonder is the basis of man's desire to understand." - Neil Armstrong
|Installing Extensions|Writing Extensions|Extension Validation Policy|

User avatar
david63
Jr. Extension Validator
Posts: 13143
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: disable installed extension trough extension

Post by david63 » Wed Dec 06, 2017 3:49 pm

Theriddler1 wrote:
Wed Dec 06, 2017 3:15 pm
There were conflicts with an extension which uses the same css class as the other extension of mine
Then I would have thought that seeing as they are both your extensions that you could use different classes.
Theriddler1 wrote:
Wed Dec 06, 2017 3:15 pm
But still want to know (if possible) if there is a way to let an extension disable an other extension.
Yes - see my Disable All Extensions extension for how to do it - but you will also have to ensure that when extension 2 is disabled that extension 1 is enabled. You are making far more work for yourself than is necessary and if you propose submitting these extensions to the CDB then I suspect that one, or both, will be denied.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20431
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: disable installed extension trough extension

Post by RMcGirr83 » Wed Dec 06, 2017 5:16 pm

david63 wrote:
Wed Dec 06, 2017 3:49 pm
Then I would have thought that seeing as they are both your extensions that you could use different classes.
Bingo!
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
Ger
Registered User
Posts: 1152
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: disable installed extension trough extension

Post by Ger » Thu Dec 07, 2017 9:04 am

Theriddler1 wrote:
Wed Dec 06, 2017 3:15 pm
There were conflicts with an extension which uses the same css class as the other extension of mine
so i thought i disable the other extension in the listener with code.

also i thought about to disable the whole stylesheet link href with jquery but that don't work since the href path uses assets variable.

For now i solved it by adding !important to the css class, to overrule the other.

But still want to know (if possible) if there is a way to let an extension disable an other extension.
You should indeed use other classes or make your selectors more specific (like adding the parent before the selector). Leesvoer like we say in The Netherlands ;)
Checkout my extensions: Simple CMS, Feed post bot, Modbreak, Magic OGP links and Live topic update

Like my work? Buy me a coffee to keep it coming. :ugeek:

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: MarkDHamill and 8 guests