Is there ever a reason to change EVENT vars in templates?

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
kaspir
Registered User
Posts: 203
Joined: Sun Jul 27, 2008 5:05 am
Name: Greg
Contact:

Is there ever a reason to change EVENT vars in templates?

Post by kaspir » Wed Mar 22, 2017 11:36 am

I was working with BBoots theme, helping a user get an extension of mine working. Quickly noticed that <!-- EVENT --> were renamed in that styles required template. Thus, not loading the extension event files.

The user informed me that he provided the original template. It could be a human mistake, but I'm asking this question anyways to ease my brain.

Is there ever a reason to change prosilver's original EVENTs in any template? To my knowledge, that's going to create many extension problems, is it not? :P Something I'm missing, if so I'm after that answer!

Thanks in advance!
World of Phaos RPG online is making it's come back! Play free now!
Check out phpBB contributions & extension downloads. :P

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

Re: Is there ever a reason to change EVENT vars in templates?

Post by david63 » Wed Mar 22, 2017 2:06 pm

The only reason that I can think of to change an event's name in a template would be if you wanted different behaviour at that point in different styles, but having said that if you used the different style names in an extension then you should be able to achieve the result
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

kaspir
Registered User
Posts: 203
Joined: Sun Jul 27, 2008 5:05 am
Name: Greg
Contact:

Re: Is there ever a reason to change EVENT vars in templates?

Post by kaspir » Wed Mar 22, 2017 3:04 pm

david63 wrote:
Wed Mar 22, 2017 2:06 pm
The only reason that I can think of to change an event's name in a template would be if you wanted different behaviour at that point in different styles, but having said that if you used the different style names in an extension then you should be able to achieve the result
What type of behavior can you alter? Forgive me, I only understood that events were to inject code from extensions. These events, BBoot just renamed original prosilver events. Same locations, different names.

To be more descriptive, that BBoot theme changed an EVENT (probably more that I've haven't seen, if not all of them) instead using this_event_prepend and this_event_append, they used this_event_prefix and this_event_postfix. Does this perform another type of behavior?

Achieving my result should be (possible last words!) accomplished, by simply renaming the event files of extension to the BBoot changed event(s) names. Shouldn't be any reason to change their original templates as long as the event exists. I was mearly curious as to why a theme artist would change them.

Thanks a bunch for the insight David.
World of Phaos RPG online is making it's come back! Play free now!
Check out phpBB contributions & extension downloads. :P

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

Re: Is there ever a reason to change EVENT vars in templates?

Post by david63 » Wed Mar 22, 2017 3:19 pm

kaspir wrote:
Wed Mar 22, 2017 3:04 pm
What type of behavior can you alter?
Say for example that you had two styles installed (prosilver and BBoots) and you wanted to add some css and the css was different for the two styles then you could add it to each style independent of the other if the events were named differently
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

kaspir
Registered User
Posts: 203
Joined: Sun Jul 27, 2008 5:05 am
Name: Greg
Contact:

Re: Is there ever a reason to change EVENT vars in templates?

Post by kaspir » Thu Mar 23, 2017 4:57 am

david63 wrote:
Wed Mar 22, 2017 3:19 pm
kaspir wrote:
Wed Mar 22, 2017 3:04 pm
What type of behavior can you alter?
Say for example that you had two styles installed (prosilver and BBoots) and you wanted to add some css and the css was different for the two styles then you could add it to each style independent of the other if the events were named differently
Interesting, I will have to research that more. BBoots dev wrote own core to the theme. What a headache this has been.. :)
World of Phaos RPG online is making it's come back! Play free now!
Check out phpBB contributions & extension downloads. :P

Post Reply

Return to “[3.2.x] Styles Support & Discussion”