What page am I on in the template?

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

What page am I on in the template?

Post by Toxyy » Sat Jun 02, 2018 6:58 pm

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!

User avatar
GanstaZ
Registered User
Posts: 412
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: What page am I on in the template?

Post by GanstaZ » Sat Jun 02, 2018 7:12 pm

You can try something like

Code: Select all

{% if S_NEW_MESSAGE %} do what is needed {% endif %}
"When answer lies in the question,.. question becomes redundant!"

Toxyy
Registered User
Posts: 465
Joined: Mon Oct 24, 2016 3:22 pm

Re: What page am I on in the template?

Post by Toxyy » Sat Jun 02, 2018 7:14 pm

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!

User avatar
GanstaZ
Registered User
Posts: 412
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: What page am I on in the template?

Post by GanstaZ » Sat Jun 02, 2018 8:47 pm

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.
"When answer lies in the question,.. question becomes redundant!"

Toxyy
Registered User
Posts: 465
Joined: Mon Oct 24, 2016 3:22 pm

Re: What page am I on in the template?

Post by Toxyy » Sat Jun 02, 2018 8:52 pm

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!

User avatar
GanstaZ
Registered User
Posts: 412
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: What page am I on in the template?

Post by GanstaZ » Mon Jun 04, 2018 2:53 pm

No problem.
"When answer lies in the question,.. question becomes redundant!"

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest