[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: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

Thanks, but before you put effort in it I want to let you know that I start to think to revert to a solution without defining a new Twig Function, as it's use is undocumented for phpBB extenstions.

Btw,
  • I got the error when enabling another extension, so the ext.php wasn't touched.
  • Enabling/disabling this extension didn't fail for me in the past so language and template.twig.environment must have been present, but I don't see why this is so for me and not for you.
  • The method $user->add_lang_ext(); is depreciated.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

martti wrote: Mon Apr 02, 2018 8:03 am Thanks, but before you put effort in it I want to let you know that I start to think to revert to a solution without defining a new Twig Function, as it's use is undocumented for phpBB extenstions.

Btw,
  • I got the error when enabling another extension, so the ext.php wasn't touched.
  • Enabling/disabling this extension didn't fail for me in the past so language and template.twig.environment must have been present, but I don't see why this is so for me and not for you.
  • The method $user->add_lang_ext(); is depreciated.
Yesterday, instead to work on the 3.2.2 board where I got the first bug I reported, I don't how I felt on the new 3.1.12 one, created by mistake (QI, wrong profile chosen). All of my local boards in my dev environments got to have all of the extensions I am working on as per default uploaded together in the ext folder during the phpBB installation.

To make it short, that's the reason why the bits: language and template.twig.environment weren't available.

Funny enough I found myself trying to backport this extension to phpBB 3.1 at the end of all, interesting experiment I can say, from it I for one I learned some stuffs more about the core, but requested. And yes, I know the method $user->add_lang_ext(); has been deprecated, but will last till phpBB 4.0 though.

All of this being said... yes, the v1.4.0 it does work at the first shot, also I haven't had any issue enabling as many extension I wanted after that. No errors, the first one reported is went away as well. It works with PHP ( >= 7.0.xx/7.1.xx/(7.2.xx not tested) ) but 5.6.xx.
Tested with Wamp and EasyPHP, code checked w/PhpStorm (all are up-to-date).

I am so sorry for the troubles, as a Developer I can imagine the personal stress I have created for nothing.
Have a nice day and thank you again.
🆓 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: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

In the new version 1.5.0 the extension is now for the greatest part rewritten and works without Twig function so it must be more stable (while keeping the same functionality). Also the styling got updated so that the template labels are rendered more uniformly and better in the drop-down menus:

Image

Also thanks for contributions for updating Travis (dark-1) and French translation (Galixte).
User avatar
Dark❶
Registered User
Posts: 395
Joined: Mon Jan 15, 2018 1:22 pm
Location: D@rK V0id
Name: Dark❶ [dark1]
Contact:

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

Post by Dark❶ »

martti wrote: Thu Apr 05, 2018 9:15 pm ...
Also thanks for contributions for updating Travis (dark-1) and French translation (Galixte).
here it's Dark❶ ;)

BTW Nice work. :+1:
Dark❶ [dark1]
User avatar
Galixte de EzCom
Registered User
Posts: 1106
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.
Contact:

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

Post by Galixte de EzCom »

Thanks martti for this update, I will test it. ;)

Regards.
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.2.x & 3.3.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.
rickheck
Registered User
Posts: 19
Joined: Fri May 21, 2010 4:50 am

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

Post by rickheck »

I'm just getting into template events, and see this as a great tool for developers (obviously).

I'm wondering if anyone has made screenshots of all forum/ACP pages with the events displayed? It would be a great reference that would help many people (especially us extension noobs) to have that available while 'playing around' with various events.

Yeah, I know I could do it, but wondering if someone else has already 'invented that wheel' ?

Thanks...Rick...
rickheck
Registered User
Posts: 19
Joined: Fri May 21, 2010 4:50 am

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

Post by rickheck »

Just downloaded it, installed it in the proper location (per instructions in the beginning of this thread), and got the 'white screen of death' on the Board and ACP pages. Error log shows this error:

[06-Apr-2018 20:42:39 America/Denver] PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home2/[redacted]/public_html/[redacted]/forum/ext/marttiphpbb/templateevents/event/php_event_listener.php on line 429
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

rickheck wrote: Sat Apr 07, 2018 2:54 am Just downloaded it, installed it in the proper location (per instructions in the beginning of this thread), and got the 'white screen of death' on the Board and ACP pages. Error log shows this error:

[06-Apr-2018 20:42:39 America/Denver] PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home2/[redacted]/public_html/[redacted]/forum/ext/marttiphpbb/templateevents/event/php_event_listener.php on line 429
Be sure to run on PHP >= 7

https://github.com/marttiphpbb/phpbb-ex ... r.php#L429
🆓 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
rickheck
Registered User
Posts: 19
Joined: Fri May 21, 2010 4:50 am

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

Post by rickheck »

Well....there you go (PHP version 7 - not using it yet). ... <sigh>

Had to manually delete the cache to get back to the ACP screen.

Thanks....still hoping for a collection of screenshots...

I'll try this when I get the site to PHP 7.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

rickheck wrote: Sat Apr 07, 2018 3:01 am I'll try this when I get the site to PHP 7.
That's not to be used live, that's a tool to be used locally.
🆓 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: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

There is the following issue:

the title attributes that I've set for the template event links get set to the same text as the innerHTML inside the

Code: Select all

<li class="breadcrumbs">
So the informations about version and file are gone for these template events.

The following event template labels are affected:

overall_header_breadcrumb_prepend
overall_header_breadcrumb_append
overall_footer_breadcrumb_prepend
overall_footer_breadcrumb_append

Is some phpBB Javascript replacing the title attributes? Why is this? How to prevent?
rickheck
Registered User
Posts: 19
Joined: Fri May 21, 2010 4:50 am

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

Post by rickheck »

In my case, upgrading to PHP7x fixed my error, and the tool works quite well. (It was a development site, btw, so no big issues in doing the upgrade, just inertia...)

I used the tool to create several captured pages showing the locations of the 'insert' areas. Worked just fine.
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

rickheck wrote: Sat Apr 14, 2018 10:30 pm In my case, upgrading to PHP7x fixed my error, and the tool works quite well. (It was a development site, btw, so no big issues in doing the upgrade, just inertia...)

I used the tool to create several captured pages showing the locations of the 'insert' areas. Worked just fine.
Sure, it's just a smaill issue. Nothing's crashing.

The title attributes in the breadcrumbs get destroyed by this piece of Javascript:

https://github.com/phpbb/phpbb/blob/pre ... #L381-L395
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

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

Post by martti »

martti wrote: Sun Apr 15, 2018 5:06 am The title attributes in the breadcrumbs get destroyed by this piece of Javascript:

https://github.com/phpbb/phpbb/blob/pre ... #L381-L395
Version 1.5.1 solves now this small issue by moving the title attribute inside a <span> for the breadcrumbs.
User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

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

Post by John Rambo »

I'm not an extension developer, but it could be useful on other things on the forum. 💯
Post Reply

Return to “Abandoned Extensions”