[ticket/12376] Add template events viewtopic_body_polls#2273
[ticket/12376] Add template events viewtopic_body_polls#2273nickvergessen merged 3 commits intophpbb:develop-ascraeusfrom
Conversation
|
please also create append for the title |
|
Ok, I just assumed we weren't doing that because the other |
|
@PayBas if you prepend something, you should be able to append aswell ;) |
|
@nickvergessen how true, sadly not always the case ;) I'll update it. |
There was a problem hiding this comment.
I don't like fieldset in the event name, it's a bit arbitrary.
I'd suggest to move it inside the loop and call it <!-- EVENT viewtopic_body_poll_option_before -->. This also makes it more powerful
You can still use the event as you wanted to, by wrapping your own template with:
<!-- IF poll_option.S_FIRST_ROW -->
There was a problem hiding this comment.
That's pretty smart ;), although it's not exactly the same, as it will not include the poll buttons. But I guess we can work around that.
|
Please rebase onto develop-ascraeus, so the event tests are run |
[ticket/12376] Add template events viewtopic_body_polls * PayBas/ticket/12376: [ticket/12376] Changed to viewtopic_body_poll_option_before and after [ticket/12376] Added viewtopic_body_poll_question_append [ticket/12376] Add template events viewtopic_body_polls
I propose 3 template events:
1:
EVENT viewtopic_body_poll_question_prependIt would be the equivalent of
viewtopic_topic_title_prepend, and will allow us to use prefixes, or better yet, icons. It will allow us to use code like:<h2><span class="<!-- IF S_CAN_VOTE and L_POLL_LENGTH -->poll-icon-timer<!-- ELSEIF S_CAN_VOTE -->poll-icon-open<!-- ELSE -->poll-icon-closed<!-- ENDIF -->">{L_VIEW_TOPIC_POLL}</span>....</h2>2:
EVENT viewtopic_body_poll_fieldset_prependHaving control of the poll fieldset can have advantages in case we want to add extra functionality, buttons or create wrapping containers.
3:
EVENT viewtopic_body_poll_fieldset_prependThe counter-part to the previous one
PHPBB3-12376