[Template] Add template events for buttons on viewforum and viewtopic

Request hook events and what data needs to be sent for the new hook system.
Post Reply
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 36
Joined: Mon Sep 01, 2014 10:54 pm

[Template] Add template events for buttons on viewforum and viewtopic

Post by Kailey »

I'm not sure how much useful this will be, but it was suggested I start a topic.

Reference topic: https://www.phpbb.com/community/viewtop ... &t=2260206

A new template event will be needed if extension authors wish to add more buttons where the new topic, reply, and tools buttons are. Proposed events are below and placed in quote box for easy separation.
Identifier: viewforum_buttons_top_before
Prosilver Location:
Before <a href="{U_POST_NEW_TOPIC}" class="button icon-button <!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"> (line 42)
Subsilver Location:
Before <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td> (line 154)
Explanation: Allows extension authors to add additional buttons before the new topic/locked button at the top of viewforum
Identifier: viewforum_buttons_top_after
Prosilver Location:
Before </a> (line 44)
Subsilver Location:
Before <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td> (line 154)
Explanation: Allows extension authors to add additional buttons after the new topic/locked button at the top of viewforum
Identifier: viewforum_buttons_bottom_before
Prosilver Location:
Before <a href="{U_POST_NEW_TOPIC}" class="button icon-button <!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"> (line 229)
Subsilver Location:
Before <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td> (line 277)
Explanation: Allows extension authors to add additional buttons before the new topic/locked button at the bottom of viewforum
Identifier: viewforum_buttons_bottom_after
Prosilver Location:
After </a> (line 231)
Subsilver Location:
After <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td> (line 277)
Explanation: Allows extension authors to add additional buttons after the new topic/locked button at the bottom of viewforum
Identifier: viewtopic_buttons_top_before
Prosilver Location:
Before <a href="{U_POST_REPLY_TOPIC}" class="button icon-button <!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"> (line 32)
Subsilver Location:
Before <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a>&nbsp;<!-- ENDIF --> (line 36)
Explanation: Allows extension authors to add additional buttons before the new topic/locked button at the top of viewtopic
Identifier: viewtopic_buttons_top_after
Prosilver Location:
After </a> (line 34)
Subsilver Location:
After <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}" class="imageset">{REPLY_IMG}</a><!-- ENDIF --> (line 37)
Explanation: Allows extension authors to add additional buttons after the new topic/locked button at the top of viewtopic
Identifier: viewtopic_buttons_bottom_before
Prosilver Location:
Before <a href="{U_POST_REPLY_TOPIC}" class="button icon-button <!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"> (line 341)
Subsilver Location:
Before <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a>&nbsp;<!-- ENDIF --> (line 375)
Explanation: Allows extension authors to add additional buttons before the new topic/locked button at the bottom of viewtopic
Identifier: viewtopic_buttons_bottom_after
Prosilver Location:
After </a> (line 343)
Subsilver Location:
After <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}" class="imageset">{REPLY_IMG}</a><!-- ENDIF --> (line 376)
Explanation: Allows extension authors to add additional buttons after the new topic/locked button at the bottom of viewtopic
Thoughts? Ticket: https://tracker.phpbb.com/browse/PHPBB3-13025. I haven't started a pull request yet.

Post Reply