QUICK NEWS

{NEW} - A new css video is up.

{OLD} - New video courtesy of Skhilled, Thanks for posting it up.

Video of the moment:


Internal Links

SMF Sites

Quick Info

2.1 Theme / mods clashes?

Started by LandyVlad, Aug 16, 2021, 01:23 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

LandyVlad

With the more extensive use of hooks in 2.1 does this (finally) mean that mods wont actually need to change theme files?

In 2.0.x if a theme was added then often all the mods had to be uninstalled first then reinstalled after adding the theme, so each installed theme would have the relevant mods applied to it.

I'm hoping things have gotten easier in this regard.



Please do not PM me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

lesmond

Good Question mate, I never really understood what 'Hooks' do TBH :emb

The only person who got all his work done by Friday was Robinson Crusoe

Bigguy

This is all left up to mod authors. If they use the hook system than no file changes will be applied. If they don't then there will be manual edits to do.

@lesmond Hooks allow mod authors to make mods that only hook into certain areas of the SMF core code. This means no file changes to core code so themes and other mods won't conflict with each other. So instead of a mod injecting code into the core of SMF and changing the code around, all the mod's code is contained within files that the mod drops off on the server. I think that makes sense, lol. :ys
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

lesmond

Quote from: Bigguy on Aug 16, 2021, 06:33 AM@lesmond Hooks allow mod authors to make mods that only hook into certain areas of the SMF core code. This means no file changes to core code so themes and other mods won't conflict with each other. So instead of a mod injecting code into the core of SMF and changing the code around, all the mod's code is contained within files that the mod drops off on the server. I think that makes sense, lol. :ys
:dontknow  :emb  :bnghd

The only person who got all his work done by Friday was Robinson Crusoe

Bigguy

I'm sure there is a little more to it than that but that's the basics of it I guess. :pbeer
"It's the American dream....cause ya have to be asleep to believe it." - George Carlin

SychO

While there have been hundreds of added hooks to 2.1, most of them are on the backend. Some of them do improve hooking into templates, but not enough to make it so that mods don't need to change template files.

tldr; many mods that change the UI in a way will most likely still change files. Some of those mods could switch to using certain hooks to avoid that, but I reckon not many will.