[3.2][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!
Ideas Centre
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: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » Wed May 02, 2018 9:13 am

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: 1.7.0
Requirements: phpBB 3.2.1+ PHP 7+
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 Sep 20, 2018 5:13 am, edited 4 times in total.

User avatar
martti
Registered User
Posts: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » 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

User avatar
Dark❶
Registered User
Posts: 51
Joined: Mon Jan 15, 2018 1:22 pm
Location: DarK V0id
Name: Dark❶ [dark1]

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

Post by Dark❶ » Wed May 02, 2018 1:53 pm

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: 74
Joined: Tue Jun 18, 2013 8:46 pm

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

Post by John Rambo » Wed May 02, 2018 8:27 pm

OK perfect :mrgreen:

User avatar
martti
Registered User
Posts: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » Fri May 04, 2018 9:12 am

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: 20133
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

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

Post by Mick » Fri May 04, 2018 10:20 am

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

There are no ‘threads’ in phpBB, they are topics.

User avatar
martti
Registered User
Posts: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » Fri May 04, 2018 10:24 am

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: 1020
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

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

Post by </Solidjeuh> » 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/
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

User avatar
martti
Registered User
Posts: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » Fri May 04, 2018 4:56 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/
Ok, I see what is the problem and I'll look into into it.

User avatar
martti
Registered User
Posts: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » 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!

User avatar
</Solidjeuh>
Registered User
Posts: 1020
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

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

Post by </Solidjeuh> » Fri May 04, 2018 6:31 pm

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! :)
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

User avatar
martti
Registered User
Posts: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » Thu May 31, 2018 6:40 am

Version 1.6.3 fixes an issue of an undefined variable in javascript.

User avatar
</Solidjeuh>
Registered User
Posts: 1020
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

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

Post by </Solidjeuh> » Mon Sep 03, 2018 5:58 pm

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 ?
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

User avatar
martti
Registered User
Posts: 654
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti » 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.

User avatar
</Solidjeuh>
Registered User
Posts: 1020
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

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

Post by </Solidjeuh> » Mon Sep 03, 2018 6:21 pm

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
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: Naguissa, Praggle, skybound, teebling and 32 guests