Page 3 of 8

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

Posted: Tue Feb 16, 2016 9:19 pm
by 3Di
martti wrote:I've just added the template events for 3.1.7
Yes, I just updated my fork right now, thanks. :)

Here is the list for 3.1.8 https://wiki.phpbb.com/Release_Highligh ... nt_changes if you want to finish that job. (are just 6 template events)

Thank you very much.
Regards.

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

Posted: Tue Feb 16, 2016 9:48 pm
by martti
3Di wrote:
martti wrote:I've just added the template events for 3.1.7
Yes, I just updated my fork right now, thanks. :)

Here is the list for 3.1.8 https://wiki.phpbb.com/Release_Highligh ... nt_changes if you want to finish that job. (are just 6 template events)

Thank you very much.
Regards.
These are now added too.

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

Posted: Tue Feb 16, 2016 9:57 pm
by 3Di
Very kind of you. :)

There will be a possibility to code an auto updating routine in the future?

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

Posted: Tue Feb 16, 2016 10:04 pm
by martti
3Di wrote:Very kind of you. :)

There will be a possibility to code an auto updating routine in the future?
Maybe clone with git? And when there's a new version do a pull?

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

Posted: Tue Feb 16, 2016 10:10 pm
by 3Di
martti wrote:
3Di wrote:Very kind of you. :)

There will be a possibility to code an auto updating routine in the future?
Maybe clone with git? And when there's a new version do a pull?
ATM I don't know, I will think about. If I get a basic idea I will let you know. ;)

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

Posted: Tue Feb 16, 2016 11:42 pm
by gn#36
Or use composer. That is pretty much why I asked for the addition to packagist. Essentially, that does the same as git, though, at least in this case.

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

Posted: Tue Feb 16, 2016 11:53 pm
by 3Di
I meant the extension itself auto updates the events list when a new phpBB version comes out.
It could be easy if a sort of CSV or XML file of those events it is somewhere released, I think.

Is that possible with composer?
I did read your topic and it seems that doesn't actually cover this, at a first glance.

edit: I see now that there is an events.md file into the DOCS folder. ;)

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

Posted: Wed Feb 17, 2016 12:16 am
by gn#36
So you would basically suggest a cronjob, that reads a file from some remote server and creates template event files based upon the list it reads itself?

Interesting idea, but given that the event files already exist for basically all major events and the additional events get fewer with every release, I don't know if that would be really worth the time investment to create that feature?

No, composer would only be another way of updating the extension.

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

Posted: Wed Feb 17, 2016 12:21 am
by 3Di
3Di wrote:edit: I see now that there is an events.md file into the DOCS folder.
Yes, not really a cron job.
The phpBb version it is anyway checked by the ACP, once the Board it is updated (DOCS folder too, a check here if that file it is up-to-date) then the logic reads it and does the trick.

edit: unfortunately that file contains just the PHP events ATM, not the template ones.

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

Posted: Wed Feb 17, 2016 8:08 am
by martti
@3Di I'm sorry I don't think it's worth to invest my time in this and if it would be possible. Maybe someone else would like to investigate?

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

Posted: Wed Feb 17, 2016 8:14 am
by 3Di
martti wrote:@3Di I'm sorry I don't think it's worth to invest my time in this and if it would be possible. Maybe someone else would like to investigate?
I created a request here: https://area51.phpbb.com/phpBB/viewtopi ... 36#p287736
Let's see.

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

Posted: Wed Feb 17, 2016 8:30 am
by martti
3Di wrote:
martti wrote:@3Di I'm sorry I don't think it's worth to invest my time in this and if it would be possible. Maybe someone else would like to investigate?
I created a request here: https://area51.phpbb.com/phpBB/viewtopi ... 36#p287736
Let's see.
It's not an issue of knowing which template events exist. This could be done by scanning the template files. But it the issue is to self-write template event listeners into the extension. As far I can see it's not possible to do this in a dynamic way and there needs to be a file for every template event into the /styles/all/template/event folder of the extension. A dynamic way needs a php event somewhere in the Twig bridge, that fires every time it encounters the EVENT tag. That would be very useful to have.

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

Posted: Wed Feb 17, 2016 8:44 am
by 3Di
There should be an IDENTIFIER and a PLACEMENT (location) like here: https://wiki.phpbb.com/Event_List#Template_Events or even the docs/events.md.. or am I missing something?
I think i is possible to scan the <-- EVENT once the logic it is properly sat.
I do have some examples into my wallet.

Anyway, time to go to the job now.

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

Posted: Wed Feb 17, 2016 5:04 pm
by Miri4ever
Thanks, long time waited for this update :)

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

Posted: Wed Feb 17, 2016 5:46 pm
by Solidjeuh
Thank you for the update! Useful extension! 8-)