[RFC|Merged] Template Events

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Template Events

Post by MichaelC »

I'd say get it merged? Further test cases can always be created at a later date?
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Merged] Template Events

Post by imkingdavid »

Merged.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Blitze
Registered User
Posts: 17
Joined: Thu Feb 22, 2007 5:08 pm

Re: [RFC|Merged] Template Events

Post by Blitze »

I may once again be looking at this the wrong way but I found something quite curious about template events. Say we have an extension with a template file ext/blitze/foo/styles/all/overall_footer_before.html which of course responds to the overall_footer_before event in the overall_footer.html file.

If my overall_footer_before.html file looks like this:

Code: Select all

<a href="#">{L_ADD}</a>
<a href="#">{L_EDIT}</a>
The resulting page will look like this

Code: Select all

<a href="#">Add
</a>
<a href="#">Edit
</a>
Notice how the template token is replaced with the language strings but adds a new line (this is true for any token, not just language tokens). I looked at the cached file and it does have the additional newlines as well.

However, if my overall_footer_before.html looks like this:

Code: Select all

<!-- INCLUDE foo.html -->
and I add in the extension, ext/blitze/foo/styles/prosilver/template/test.html like so:

Code: Select all

<a href="#">{L_ADD}</a>
<a href="#">{L_EDIT}</a>
This will result in this, which is what you'd expect

Code: Select all

<a href="#">Add</a>
<a href="#">Edit</a>

Post Reply