[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
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

Froddelaar wrote: Mon Oct 17, 2016 6:53 pm Thank you for the update!
Will this still work on 3.2 ?
And the 'workaround'?
The template events of 3.2.0 and 3.1.11-RC1 are included now.
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

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

Post by </Solidjeuh> »

martti wrote: Wed Jan 18, 2017 9:20 am
Froddelaar wrote: Mon Oct 17, 2016 6:53 pm Thank you for the update!
Will this still work on 3.2 ?
And the 'workaround'?
The template events of 3.2.0 and 3.1.11-RC1 are included now.
Thank you! :D
User avatar
paulvill76
Registered User
Posts: 83
Joined: Tue Dec 06, 2011 2:51 am
Location: Brno , Czech Republic
Name: Pablo Villaronga

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

Post by paulvill76 »

So cool , i will test the template for events on my 3.2.0 forum !
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

This extension is now updated to version 1.3.0. This is new:
  • Apart from template events, all core PHP events that get triggered before rendering the page are shown in a table at the bottom of the page. These are in order of occurance. Also the number of times the event occurs is shown. Note you see only the events of the current request. That means you can only see the PHP events of HTTP GET requests, not when you are posting something.
  • Extra information, the phpBB version when the event was introduced and the file, is show when hoovering with your mouse pointer over the template event labels.
Image

Somebody reported an issue though: https://github.com/marttiphpbb/phpbb-ex ... /issues/12
Last edited by martti on Mon Mar 26, 2018 1:06 pm, edited 1 time in total.
User avatar
Naguissa
Registered User
Posts: 502
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa

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

Post by Naguissa »

Thanks! Very useful!
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

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

Post by </Solidjeuh> »

martti wrote: Mon Mar 26, 2018 8:09 am
  • Apart from template events, all core PHP events that get triggered before rendering the page are shown in a table at the bottom of the page. These are in order of occurance. Also the number of times the event occurs is shown. Note you see only the events of the current request. That means can only see the PHP events of HTTP GET requests, not when you are posting something.
  • Extra information, the phpBB version when the event was introduced and the file, is show when hoovering with your mouse pointer over the template event labels.
Somebody reported an issue though: https://github.com/marttiphpbb/phpbb-ex ... /issues/12
I don't see those PHP events at the bottom, also don't see that "hover" info..
So maybe that's the problem in my issue on github?
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

Froddelaar wrote: Mon Mar 26, 2018 12:11 pm I don't see those PHP events at the bottom, also don't see that "hover" info..
So maybe that's the problem in my issue on github?
I thought you didn't see anything? That you had a blank page?

To repeat the download location:

Extension Download: https://github.com/marttiphpbb/phpbb-ex ... master.zip
The files are to be put in ext/marttiphpbb/templateevents
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

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

Post by </Solidjeuh> »

martti wrote: Mon Mar 26, 2018 12:54 pm
Froddelaar wrote: Mon Mar 26, 2018 12:11 pm I don't see those PHP events at the bottom, also don't see that "hover" info..
So maybe that's the problem in my issue on github?
I thought you didn't see anything? That you had a blank page?

To repeat the download location:

Extension Download: https://github.com/marttiphpbb/phpbb-ex ... master.zip
The files are to be put in ext/marttiphpbb/templateevents
I have a blank page when I enable the extension.
But when I go back to my site I see the extension enabled.
I can also show the template events. But NOT the PHP events.

I made a video:

https://youtu.be/k8jLppQ2OTo
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

Froddelaar wrote: Mon Mar 26, 2018 2:01 pm I have a blank page when I enable the extension.
But when I go back to my site I see the extension enabled.
I can also show the template events. But NOT the PHP events.

I made a video:

https://youtu.be/k8jLppQ2OTo
You have version 1.2.0, so it's normal that you don't see the PHP events and the version and file information on the template events.
So your problem is limited to the ACP as it seems.
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

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

Post by </Solidjeuh> »

martti wrote: Mon Mar 26, 2018 3:00 pm
Froddelaar wrote: Mon Mar 26, 2018 2:01 pm I have a blank page when I enable the extension.
But when I go back to my site I see the extension enabled.
I can also show the template events. But NOT the PHP events.

I made a video:

https://youtu.be/k8jLppQ2OTo
You have version 1.2.0, so it's normal that you don't see the PHP events and the version and file information on the template events.
So your problem is limited to the ACP as it seems.
Ow there is a 1.3.0 version since today .. yeah now I see PHP events :)
But still blank page when enabling

Code: Select all

[Mon Mar 26 17:08:38.149013 2018] [:error] [pid 22509] [client 91.180.236.163:50373] #5 in /home/solidjeuh/domains/muziekpromo.net/public_html/ext/marttiphpbb/templateevents/adm/style/event/acp_overall_header_head_append.html on line 1, referer: https://www.muziekpromo.net/adm/index.php?i=acp_extensions&sid=082753a0c7e1b5d196257da30192fc5e&mode=main&action=enable_pre&ext_name=marttiphpbb%2Ftemplateevents
acp_overall_header_head_append.html
{{- marttiphpbb_templateevents_render(_self) -}}

{%- INCLUDECSS '@marttiphpbb_templateevents/templateevents.css' -%}
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

@solidjeuh And afterward you are locked out of the ACP? You can not go back?
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

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

Post by </Solidjeuh> »

martti wrote: Mon Mar 26, 2018 3:29 pm @solidjeuh And afterward you are locked out of the ACP? You can not go back?
I can go back, everything works.
Just blank after enable
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

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

Post by 3Di »

Hi martti, nice job.. but the debugger throws an error on installation:
Fatal error: Uncaught Twig_Error_Syntax: Unknown "marttiphpbb_templateevents_render" function. in C:\wamp64\www\QI\boards\blah\ext\marttiphpbb\templateevents\adm\style\event\acp_overall_header_head_append.html on line 1
To fix:
{{- marttiphpbb_templateevents_render(_self) -}}

becomes..
{{- marttiphpbb_templateevents_render(_self, true) -}}

Regards. :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

@3Di That's certainly not the fix. Setting the second parameter of the function to true is simply to tell the function it's the first template event in the HTML BODY in order to actually output to the screen. You cannot do that while you are still in the HEAD, so the actual rendering of the template events in the HEAD is delayed until the first element in the HTML BODY.

The error on installation might simply be that this extension is defining now a Twig Function and phpBB is not liking it. That's your error message. The function is unknown it says. On first request at least it seems. I don't experience a problem though.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

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

Post by david63 »

@3Di - are you by any chance using phpBB 3.2.3-RC1?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here

Return to “Abandoned Extensions”