Page 1 of 3

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

Posted: Wed May 02, 2018 9:13 am
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.1.0
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

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

Posted: Wed May 02, 2018 9:41 am
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

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

Posted: Wed May 02, 2018 1:53 pm
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. :-)

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

Posted: Wed May 02, 2018 8:27 pm
by John Rambo
OK perfect :mrgreen:

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

Posted: Fri May 04, 2018 9:12 am
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.

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

Posted: Fri May 04, 2018 10:20 am
by Mick
Nice, where was this when I needed it? :D

And it’s cauliflower.

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

Posted: Fri May 04, 2018 10:24 am
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:

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

Posted: Fri May 04, 2018 4:49 pm
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/

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

Posted: Fri May 04, 2018 4:56 pm
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.

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

Posted: Fri May 04, 2018 5:48 pm
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!

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

Posted: Fri May 04, 2018 6:31 pm
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! :)

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

Posted: Thu May 31, 2018 6:40 am
by martti
Version 1.6.3 fixes an issue of an undefined variable in javascript.

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

Posted: Mon Sep 03, 2018 5:58 pm
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 ?

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

Posted: Mon Sep 03, 2018 6:20 pm
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.

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

Posted: Mon Sep 03, 2018 6:21 pm
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