Page 4 of 8

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

Posted: Wed Feb 17, 2016 7:22 pm
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.

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

Posted: Wed Feb 17, 2016 8:25 pm
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.

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

Posted: Wed Feb 17, 2016 10:16 pm
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.

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

Posted: Wed Feb 17, 2016 10:37 pm
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?

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

Posted: Sun Apr 10, 2016 9:01 pm
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. :)

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

Posted: Mon Apr 11, 2016 8:56 am
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

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

Posted: Mon Apr 11, 2016 1:00 pm
by 3Di
Changes pulled. Thanks. :)

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

Posted: Tue Jun 28, 2016 11:39 am
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!

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

Posted: Tue Jun 28, 2016 5:37 pm
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.

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

Posted: Fri Jul 01, 2016 12:09 pm
by wrkalot
Thanks for the reply!

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

Posted: Thu Oct 13, 2016 11:23 pm
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.

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

Posted: Fri Oct 14, 2016 6:08 am
by martti
@3Di

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

Kind regards.

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

Posted: Sun Oct 16, 2016 7:39 pm
by 3Di
@ martti

Appreciated. Thank you. :)

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

Posted: Mon Oct 17, 2016 6:00 am
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;)

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

Posted: Mon Oct 17, 2016 6:53 pm
by </Solidjeuh>
Thank you for the update!
Will this still work on 3.2 ?
And the 'workaround'?