[Template] topiclist_topic_title_before/after/prepend/append

Request hook events and what data needs to be sent for the new hook system.
Post Reply
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

[Template] topiclist_topic_title_before/after/prepend/append

Post by imkingdavid » Thu Nov 28, 2013 12:41 am

Currently there are the following events in the topic list: https://area51.phpbb.com/phpBB/viewtopi ... 11&t=44409

This allows you to add content per topic before the unread icon and after the last post information. I think it is important to add the following as well:
  • topiclist_topic_title_before - Add something directly before the topic title (but not within the <a></a> tags) - Can be used to add a prefix, icon, etc. to a topic title
  • topiclist_topic_title_after - Add something directly after the topic title (but not within the <a></a> tags) - Can be used to add a suffix to a topic title - can be used together with *_before to wrap the title in tags for formatting, etc.
  • topiclist_topic_title_prepend - Add something directly before the topic title (within the <a></a> tags) - Same application as *_before, somewhat different result
  • topiclist_topic_title_append - Add something directly after the topic title (within the <a></a> tags) - Same application as *_after, somewhat different result
All of these go in viewforum_body.html.

I specifically need the first one for my topic prefixes extension (since I wish to add the prefix before the title link but not within the link itself). The rest are just to cover all the bases.

I plan to submit a PR unless someone else beats me to it.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
Vinny
Style Customisations
Style Customisations
Posts: 126
Joined: Thu May 20, 2010 4:01 am
Location: Brazil
Contact:

Re: [Template] topiclist_topic_title_before/after/prepend/append/alter

Post by Vinny » Thu Nov 28, 2013 4:06 am

imkingdavid wrote:All of these go in viewforum_body.html.
Why only in viewforum_body.html?

MCP and search results also have a topic list.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [Template] topiclist_topic_title_before/after/prepend/append/alter

Post by VSE » Thu Nov 28, 2013 7:27 am

So does UCP.... Bookmarks and Subscriptions.
Has an irascible disposition.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [Template] topiclist_topic_title_before/after/prepend/append/alter

Post by imkingdavid » Fri Nov 29, 2013 6:29 pm

Good point, I hadn't considered that. Thanks for pointing that out.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [Template] topiclist_topic_title_before/after/prepend/append/alter

Post by imkingdavid » Sun Dec 08, 2013 7:26 pm

Pull Request

Ticket

Note that the other events suggested in this topic have not been added in this PR. They should be added in a separate ticket/PR.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Post Reply