[ABD] Template Events Locations (for extension developers)

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
gn#36
Translator
Posts: 194
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [RC] Template Events Locations (for developers)

Post by gn#36 »

Well, I think creating the files is not that difficult, as long as php has write access to the corresponding extension folder and there is some sort of list of events to create.

Instead of an event inside twig, it would also be possible to use an existing PHP event to replace the twig class loaded by the container by a child class defined in the extension, or redefine template inside the service.yml, so the container always provides your class instead of the regular template class. In that child class, you could then replace the method that you wanted your event in, detect your events, and then call the parent method.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.
User avatar
3Di
Former Team Member
Posts: 15904
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] Template Events Locations (for developers)

Post by 3Di »

Yes, the flow-chart looks good.

Anyway, yesterday I was a little bit tired and I misred the file, the events.md that's shipped with every release it is the template events list.
It looks like this:

Code: Select all

acp_ban_cell_append
===
* Location: adm/style/acp_ban.html
* Since: 3.1.7-RC1
* Purpose: Add content at the end of the ban cell area
The name of the event it is clearly stated into the first line, the location follows into the 3rd and then there are other infos too.

I was thinking about a less sofisticated way to do that, though.
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
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
david63
Registered User
Posts: 18118
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: [RC] Template Events Locations (for developers)

Post by david63 »

Can I offer a suggestion. If the extension is going to be submitted for validation then it would almost certainly be denied if there was a mechanism built in that was changing the "core" extension files. My suggestion would be to load the "changes" as a separate file into the store folder and then let the extension read those files to create the output.
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
3Di
Former Team Member
Posts: 15904
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] Template Events Locations (for developers)

Post by 3Di »

david63 wrote:Can I offer a suggestion. If the extension is going to be submitted for validation then it would almost certainly be denied if there was a mechanism built in that was changing the "core" extension files. My suggestion would be to load the "changes" as a separate file into the store folder and then let the extension read those files to create the output.
My idea it's similar, the file it is already stored/shipped into the phpBB3/docs/ folder, so no need to store it again elsewhere, just read it and ADD new files/events into the appropriated styleor/and admfolders. It does not modify anything of the extension's core, just adds the new ones.
What do you think about?
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
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
3Di
Former Team Member
Posts: 15904
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] Template Events Locations (for developers)

Post by 3Di »

Hello martti,
3.1.9 is into the pipeline, could you please consider to update the events list?

https://wiki.phpbb.com/Release_Highligh ... ate_Events

Thanks in advance. :)
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
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
martti
Registered User
Posts: 860
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Template Events Locations (for developers)

Post by martti »

3Di wrote:Hello martti,
3.1.9 is into the pipeline, could you please consider to update the events list?

https://wiki.phpbb.com/Release_Highligh ... ate_Events

Thanks in advance. :)
The new events are now added.

kind regards,

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

Re: [RC] Template Events Locations (for developers)

Post by 3Di »

Changes pulled. Thanks. :)
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
Looking for a specific feature or alternative option? We will rock you! 🚀
wrkalot
Registered User
Posts: 108
Joined: Tue Oct 02, 2012 10:07 pm

Re: [RC] Template Events Locations (for developers)

Post by wrkalot »

This ext has been very helpful but I am wondering what the future holds for the extension inserttemplatecode (posting here since there is no specific thread for it) https://github.com/marttiphpbb/phpbb-ex ... mplatecode

With 3.2 just around the corner I am wondering if inserttemplatecode will still function as it does now, and if not, are there any plans to update it so it does. It is by far the most useful extension out there for adding content without screwing with the core (or styles) and I don't think I would be able to upgrade when the time comes with out it!
Tutorial: How to add ads to your forum viewtopic.php?f=64&t=2417316
User avatar
martti
Registered User
Posts: 860
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Template Events Locations (for developers)

Post by martti »

@wrkalot I have not been following phpBB for a while and I didn't realize 3.2 is soon going to be there. But I think I've read somewhere the changes are not big. The inserttemplatecode extension is actually really simple. In fact, it's an empty extension. I'm almost certain it's not going to be a problem. Otherwise I will look into it.
wrkalot
Registered User
Posts: 108
Joined: Tue Oct 02, 2012 10:07 pm

Re: [RC] Template Events Locations (for developers)

Post by wrkalot »

Thanks for the reply!
Tutorial: How to add ads to your forum viewtopic.php?f=64&t=2417316
User avatar
3Di
Former Team Member
Posts: 15904
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] Template Events Locations (for developers)

Post by 3Di »

@ marti, hello.. here are the phpBB 3.1.10 release highlights:

https://wiki.phpbb.com/Release_Highligh ... ate_Events

There is also an ACP template event added, could you please consider to update this useful extension?

Thanks in advance, as always. :)
Regards.
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
Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
martti
Registered User
Posts: 860
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Template Events Locations (for developers)

Post by martti »

@3Di

The extension is updated and the new template events are added now.

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

Re: [RC] Template Events Locations (for developers)

Post by 3Di »

@ martti

Appreciated. Thank you. :)
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
Looking for a specific feature or alternative option? We will rock you! 🚀
Kam3leoN
Registered User
Posts: 24
Joined: Sun Oct 04, 2015 9:02 pm

Re: [RC] Template Events Locations (for developers)

Post by Kam3leoN »

Hello !

Would it be possible to insert an event, for example, between category 1 and category 2 or category 3 and category 4 to slide different ad codes but targeted to particular places.

For the moment, this is only possible before and after all the categories. : /

Thank you for your extensions;)
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [RC] Template Events Locations (for developers)

Post by </Solidjeuh> »

Thank you for the update!
Will this still work on 3.2 ?
And the 'workaround'?
Post Reply

Return to “Abandoned Extensions”