[RFC] Template system: alternative syntax for DEFINE

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.
Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: Template system: alternative syntax for DEFINE

Post by Nicofuma »

As state the forum title this RFC has been accepted and merged.
Member of the phpBB Development-Team
No Support via PM

master412160
Registered User
Posts: 6
Joined: Thu Feb 28, 2013 7:46 pm
Location: Belgium, Flanders
Contact:

Re: [RFC] Template system: alternative syntax for DEFINE

Post by master412160 »

Please tell me this is possible in phpbb 3.1.3? It seems the ticket is resolved but I don't know how to use this.

I'm trying hard to figure out a way to make a pop up box on index for showing a box like they do on IPB when you hover or click on a username of last poster or elsewhere.

I actually want to make two boxes. One when you click on the last poster username and it shows stuff like last online, user avatar, total posts, online status, link to full profile, etc..

And one when you click on your own username you get options to go to edit signature, edit avatar, etc...

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1903
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Template system: alternative syntax for DEFINE

Post by DavidIQ »

Syntax is defined in the first post and the ticket. Should work exactly as described.
Image

master412160
Registered User
Posts: 6
Joined: Thu Feb 28, 2013 7:46 pm
Location: Belgium, Flanders
Contact:

Re: [RFC] Template system: alternative syntax for DEFINE

Post by master412160 »

DavidIQ wrote:Syntax is defined in the first post and the ticket. Should work exactly as described.
It seems well described for a seasoned coder. However I'm just efficient in styling themes. Not php or template syntax or TWIG blocks.

I understand IF statements, template structure, css quite well but this is a level higher.

Can someone by providing working examples show me how it works? I mean with examples that help me better understand it? Because I can't seem to get it to work out by the info provided in the first post.

How would I display stuff from the viewprofile like user avatar, rank, last online, post count in forumlist_body.html for the last poster username?

I know how to build and configure a jquery UI dialog which is very easy compared to this. Just don't know how to populare it with the necessary variables and get those to work on index_body.html or an other template. :)

I've looked at the wiki, at the global variables but these are useless for what I want to do.

So this alternative syntax seems the way to go here. And I'm really happy to see phpbb template syntax supports it. Just how to use it seems vague.

I think little phpbb stylist use it right now. Or just as good as none because it seems not straightforward to use.

Post Reply