[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 »

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: 129
Joined: Thu May 20, 2010 4:01 am
Location: Brazil
Contact:

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

Post by Vinny »

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
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

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

Post by MattF »

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 »

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 »

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