Possible to make extension for 1 style?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Dan Stylez
Registered User
Posts: 203
Joined: Tue Jan 16, 2018 6:17 am
Contact:

Possible to make extension for 1 style?

Post by Dan Stylez » Tue Jul 23, 2019 12:11 pm

I made a customiser extension for my clean-boardz style, it works fine but if you view the prosilver style it has also changed the appearance of that.

Is it possible to stop the extension interfering with prosilver?

I've also made a similar extension for customising prosilver and have the same issue with that changing any other installed style with template inheritance, I've seen a few Hackey methods but would ideally like to do it properly.
Always encouraging people to take back control and not be held to ransom.
Often found lurking over at TapaTalk.
#GlutenFree

User avatar
david63
Registered User
Posts: 16330
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Possible to make extension for 1 style?

Post by david63 » Tue Jul 23, 2019 2:13 pm

Without seeing the code of your extension it is difficult to say but as a start I would be trying to interrogate user_style - but I suspect that it will be considerably more involved as you will also need to find out which style you are dealing with from the database.
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
Dan Stylez
Registered User
Posts: 203
Joined: Tue Jan 16, 2018 6:17 am
Contact:

Re: Possible to make extension for 1 style?

Post by Dan Stylez » Tue Jul 23, 2019 6:05 pm

The extension is done through the ACP and basically loads a html sheet with a style tag in, (it just adjusts things like wrap width/colour, display stat block, header/forabg background colours)

I've just come across this: viewtopic.php?t=2395886 which i'll try later and see what happens.
Always encouraging people to take back control and not be held to ransom.
Often found lurking over at TapaTalk.
#GlutenFree

User avatar
3Di
Former Team Member
Posts: 13920
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Possible to make extension for 1 style?

Post by 3Di » Wed Jul 24, 2019 8:58 pm

You should include your CSS and what not only in "presence" of your style, therefore you should create template switches via PHP first then JS or CSS inclusions based on them. Further help can't be given without looking at the code, luck.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Dan Stylez
Registered User
Posts: 203
Joined: Tue Jan 16, 2018 6:17 am
Contact:

Re: Possible to make extension for 1 style?

Post by Dan Stylez » Sat Aug 10, 2019 6:53 am

Nope this ideally needs to be done in the ACP for now, in the past 5 months I've managed to get 31 admins to transfer from a specific self hosted platform to self hosting their own phBB boards, the reason they were originally on the self hosted platforms before they were brought by another company was because they know little about mysql, setting up, coding and other nitty gritty stuff.

So the aim has been to get them all set up and started and along with the custom style a simple extension that lets them hide/display the site logo/site name on big/small screens, choose if or not to hide the index login, change the basic style colours to blend with their forum subject.

Am sure you agree that if someone is paying you for something you want to make it as easy as possible for them to use. (I just thought it would be cushty to make it stop adjusting the Prosilver style incase the admin wants to also allow members to choose between custom style or Prosilver)

I agree that everyone should have some basic knowledge of phpBB, mysql and coding so they can apply fixes to files after updates etc and keep their boards in shape... and for this - everyone one of those forums has been set up with 2 spare test forums on sub domains so the admins can continue learning what's what while their main forum is up and running.

For now i've added .custom in front of the custom styles classes so that even though Prosilver loads the sheet - the changes don't affect anything in the Prosilver style - so for now it's sorted.
Always encouraging people to take back control and not be held to ransom.
Often found lurking over at TapaTalk.
#GlutenFree

Post Reply

Return to “Extension Writers Discussion”