[3.3][RC] Show phpBB Events (for extension developers)

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

[3.3][RC] Show phpBB Events (for extension developers)

Post by martti »

This extension is a helper tool for developing (other extenstions and styles). It should not be used on a live forum.

This extension was formerly called "Template Events", but since it shows now also the PHP events it has been renamed. Development will continue here under the new name "Show phpBB Events".

Extension Name: Show phpBB Events
Author: martti
Extension Description:

This phpBB extension for developers shows all core phpBB template and PHP events in the board. The template events are rendered at their location as black labels. The PHP events triggered on the page are shown at the bottom in order of occurance. All template and PHP events are linked to their location in the phpBB github repository so their context can be easily reviewed.

Extension Version: 2.2.0 (includes all events up to phpBB 3.3.7)
Requirements:
  • phpBB 3.3+
  • PHP 7.1+
(For phpBB 3.2 use version 1.10.0)
Extension Download: https://github.com/marttiphpbb/phpbb-ex ... master.zip The files are to be put into ext/marttiphpbb/showphpbbevents
Github repository: https://github.com/marttiphpbb/phpbb-ex ... hpbbevents
Languages: en
Templates: only tested Prosilver, but works probably in others
Screenshots:

Template Events:
With the button in the upper left corner you can toggle between showing and hiding the events.

Image

Template Events in the ACP

Image

PHP Events at the Bottom of the Page

Image

Links to the Code in the phpBB Repository on Github

Image
Last edited by martti on Thu Apr 14, 2022 6:55 am, edited 11 times in total.
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by martti »

So, besides the new name, what's new in version 1.6.0 ?

There is one template event in the MCP which cannot be rendered properly as a link. That's mcp_forum_actions_append. Because it's inside a <select> it needs to be an <option>. It cannot be an anchor <a>. Therefore I've chosen to render the event as <option>[ mcp_forum_actions_append ]</option> (I don't manage to get a screenshot of that) plus an extra styled link right after the select (it's in grey because like the template events in the <head> it's not rendered in-place):

Image
User avatar
Dark❶
Registered User
Posts: 395
Joined: Mon Jan 15, 2018 1:22 pm
Location: D@rK V0id
Name: Dark❶ [dark1]

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by Dark❶ »

martti wrote: Wed May 02, 2018 9:41 am So, besides the new name, what's new in version 1.6.0 ?

There is one template event in the MCP which cannot be rendered properly as a link. That's mcp_forum_actions_append. Because it's inside a <select> it needs to be an <option>. It cannot be an anchor <a>. Therefore I've chosen to render the event as <option>[ mcp_forum_actions_append ]</option> (I don't manage to get a screenshot of that) plus an extra styled link right after the select (it's in grey because like the template events in the <head> it's not rendered in-place):

Image
Nice , My friend. :+1:

Here what u require :
Image

Best regards. :-)
Dark❶ [dark1]
User avatar
John Rambo
Registered User
Posts: 84
Joined: Tue Jun 18, 2013 8:46 pm

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by John Rambo »

OK perfect :mrgreen:
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by martti »

New version 1.6.1 fixes a small issue. The link of the hide/show button is now prefixed with a slash / so that it works correctly in pages under app.php, like the FAQ page.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26861
Joined: Fri Aug 29, 2008 9:49 am

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by Mick »

Nice, where was this when I needed it? :D

And it’s cauliflower.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by martti »

Mick wrote: Fri May 04, 2018 10:20 am And it’s cauliflower.
Yes, so told my girlfriend when she saw the misspelling on my screen. :blush:
Last edited by martti on Fri May 04, 2018 5:49 pm, edited 1 time in total.
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by </Solidjeuh> »

Installed 1.6.1 version, when I click on "Show" it takes me to my normal (live) forum

Test forum with extension:
https://www.muziekpromo.net/scripts/phpbbtest/

When clicking on 'Show":
https://www.muziekpromo.net/app.php?showphpbbevents=1

https://www.muziekpromo.net/scripts/phpbbtest/
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by martti »

Froddelaar wrote: Fri May 04, 2018 4:49 pm Installed 1.6.1 version, when I click on "Show" it takes me to my normal (live) forum

Test forum with extension:
https://www.muziekpromo.net/scripts/phpbbtest/

When clicking on 'Show":
https://www.muziekpromo.net/app.php?showphpbbevents=1

https://www.muziekpromo.net/scripts/phpbbtest/
Ok, I see what is the problem and I'll look into into it.
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by martti »

Froddelaar wrote: Fri May 04, 2018 4:49 pm Installed 1.6.1 version, when I click on "Show" it takes me to my normal (live) forum

Test forum with extension:
https://www.muziekpromo.net/scripts/phpbbtest/

When clicking on 'Show":
https://www.muziekpromo.net/app.php?showphpbbevents=1

https://www.muziekpromo.net/scripts/phpbbtest/
Version 1.6.2 fixes the "script path". Thanks for reporting!
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by </Solidjeuh> »

martti wrote: Fri May 04, 2018 5:48 pm
Froddelaar wrote: Fri May 04, 2018 4:49 pm Installed 1.6.1 version, when I click on "Show" it takes me to my normal (live) forum

Test forum with extension:
https://www.muziekpromo.net/scripts/phpbbtest/

When clicking on 'Show":
https://www.muziekpromo.net/app.php?showphpbbevents=1

https://www.muziekpromo.net/scripts/phpbbtest/
Version 1.6.2 fixes the "script path". Thanks for reporting!
Thank you! Works! :)
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by martti »

Version 1.6.3 fixes an issue of an undefined variable in javascript.
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by </Solidjeuh> »

I have an error in "cron" with this extension.

Code: Select all

PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in /home/solidjeuh/domains/muziekpromo.net/public_html/ext/marttiphpbb/showphpbbevents/event/php_event_listener.php on line 429
I use this cronejob in Directadmin:

/usr/local/bin/php /home/solidjeuh/domains/muziekpromo.net/public_html/bin/phpbbcli.php cron:run

I had the same with JV arcade, I had to add this to: /bin/phpbbcli.php

Code: Select all

if (!defined('ARCADE_VERSION'))
{
	$phpbb_container->get('jv.arcade.constants');
}
So maybe this ext also need something like that when you use cron command in Directadmin ?
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by martti »

</Solidjeuh> wrote: Mon Sep 03, 2018 5:58 pm So maybe this ext also need something like that when you use cron command in Directadmin ?
What is your PHP version?

You need PHP 7+, because line 429 says:

Code: Select all

	public function get_count_ary():array
Pre PHP 7 gives a syntax error on this line.
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm

Re: [3.2][RC] Show phpBB Events (for extension developers)

Post by </Solidjeuh> »

martti wrote: Mon Sep 03, 2018 6:20 pm
</Solidjeuh> wrote: Mon Sep 03, 2018 5:58 pm So maybe this ext also need something like that when you use cron command in Directadmin ?
What is your PHP version?

You need PHP 7+, because line 429 says:

Code: Select all

	public function get_count_ary():array
Pre PHP 7 gives a syntax error on this line.
PHP 7.2.3

Return to “Extensions in Development”