[Template] search_results_posts_to_advanced_search_after

Request hook events and what data needs to be sent for the new hook system.
Post Reply
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 13
Joined: Thu May 24, 2012 1:54 pm

[Template] search_results_posts_to_advanced_search_after

Post by kasimi » Tue Jan 20, 2015 9:16 pm

I've ported parts of asinshesq's MOD View or mark unread posts. It needs to add a "Mark forums read" link to the search_results.html, right below the "Go to advanced search" link.

I tried to make things a bit cleaner by moving the event outside of the <p> element but the result didn't look quite right, so inside <p> it is. :?

"search_results_posts_to_advanced_search_after" because the event is not triggered for topic searches.

Prosilver v3.1.2, search_results.html, line 11:

Code: Select all

<p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_GO_TO_SEARCH_ADV}</a><!-- EVENT search_results_posts_to_advanced_search_after --></p> 
Subsilver2: I'm not familiar with it, and at a quick glance there doesn't seem to be a "Go to advanced search" link in that template file.

User avatar
Wolfsblvt
Registered User
Posts: 5
Joined: Tue Oct 28, 2014 8:35 am

Re: [Template] search_results_posts_to_advanced_search_after

Post by Wolfsblvt » Wed Jan 21, 2015 12:16 pm

Hey. I have looked into it, and had a small chat with a dev.
This event is very very specific.

Can you maybe explain why you need it there? And can you maybe find a more common place for your content?
I've seen that there is no event in the search_results above the results themselves, so why not put it behind this:

Code: Select all

<!-- IF SEARCH_TOPIC -->
    <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO_TOPIC}</a></p>
<!-- ELSE -->
    <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_GO_TO_SEARCH_ADV}</a><!-- EVENT search_results_posts_to_advanced_search_after --></p> 
<!-- ENDIF -->
I would change your request then and request the following two places:
https://github.com/phpbb/phpbb/blob/dev ... s.html#L13
https://github.com/phpbb/phpbb/blob/dev ... s.html#L28

When you say this looks not that cool.. there can be done very much just with css
Lesser, greater, middling, it's all the same. Proportions are negotiated, boundaries blurred.
I'm not a pious hermit, I haven't done only good in my life. But if I'm to choose between one evil and another,
then I prefer not to choose at all.

― Andrzej Sapkowski, The Last Wish

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 13
Joined: Thu May 24, 2012 1:54 pm

Re: [Template] search_results_posts_to_advanced_search_after

Post by kasimi » Wed Jan 21, 2015 11:13 pm

Okay, Iooks good. I'll have to come up with a solution for L13. Thanks so much for your help!

User avatar
Wolfsblvt
Registered User
Posts: 5
Joined: Tue Oct 28, 2014 8:35 am

Re: [Template] search_results_posts_to_advanced_search_after

Post by Wolfsblvt » Wed Jan 21, 2015 11:53 pm

kasimi wrote:Okay, Iooks good. I'll have to come up with a solution for L13. Thanks so much for your help!
Great to hear.

Ticket and pull request are done.
So it will be included in 3.1.4 as well.
Lesser, greater, middling, it's all the same. Proportions are negotiated, boundaries blurred.
I'm not a pious hermit, I haven't done only good in my life. But if I'm to choose between one evil and another,
then I prefer not to choose at all.

― Andrzej Sapkowski, The Last Wish

Post Reply