What page am I on in the template?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

What page am I on in the template?

Post by Toxyy »

Short question. I want to add some html on the posting.php page when making a new topic but there don't seem to be any events for making a new topic for the location that i want, only overall locations:

https://i.snag.gy/Op6YtS.jpg

There is an event for the location but I'm not sure how to add some twig statements to the template to check if I'm posting a new topic and not on some other random page. Would I use core.modify_posting_auth for checking if a user is indeed posting a new topic and not replying? This seems simple enough but I can't think of how to figure out how to add syntax in the template to say I'm a user posting a new topic.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: What page am I on in the template?

Post by GanstaZ »

You can try something like

Code: Select all

{% if S_NEW_MESSAGE %} do what is needed {% endif %}
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: What page am I on in the template?

Post by Toxyy »

GanstaZ wrote: Sat Jun 02, 2018 7:12 pm You can try something like

Code: Select all

{% if S_NEW_MESSAGE %} do what is needed {% endif %}
Where can I find a list of those? That seems to be working perfectly.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: What page am I on in the template?

Post by GanstaZ »

Well.. i just took a quick look in posting file and saw it. There's no list if you mean something like that, but some vars are here and there.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: What page am I on in the template?

Post by Toxyy »

Ah I see. It's been a while since I've done anything for phpbb.

Thanks for your help!
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: What page am I on in the template?

Post by GanstaZ »

No problem.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
Post Reply

Return to “Extension Writers Discussion”