tenants
Well-known member
(Sorry in advance for typos, I've come to a coffee shop to ask this)
When you navigate to index.php?find-new/id/threads, this uses the Route Prefix to go to XenForo_ControlerPublic_FindNew::actionThreads()
actionThreads then redirects you to the find_new_threads template (with relevant params), this template contains the template thread_list_item.
Within thread_list_item there exist links such as:
<a href ={xen:link threads/unread, $thread}>
I would like to redirect some of these links (given a particular condition)
<a href ={xen:link some_url}>
But to do this, I would need to extend actionThreads() to redirect to a new version of find_new_threads that contains a new version of thread_list_item, which then changes the links given the condition..
This would be a bit messy, and not ideal since I would be creating my own version of the find_new_threads template which is core XenForo (others plug-ins might also want to use this area)
There doesn't seem to be a way for switching the links using template hooks, there are no template hooks in thread_list_item I can use to switch the links, and there is no template hook in find_new_threads
What I would prefer to do is extend XenForo_Link...
(I know this works if I change the core files, but obviously can't do that for a plug-in). Also, if I can extend XenForo_Link, then it would solve my problem in all areas:
if the link contains "threads/" and is from a certain forum .. then change the link to something else
The problem is, it doesn't seem to be one of the listeners I can extend, I've tried all the Load_class_listeners with no luck.
What listener should I be using to extend XenForo_Link?
When you navigate to index.php?find-new/id/threads, this uses the Route Prefix to go to XenForo_ControlerPublic_FindNew::actionThreads()
actionThreads then redirects you to the find_new_threads template (with relevant params), this template contains the template thread_list_item.
Within thread_list_item there exist links such as:
<a href ={xen:link threads/unread, $thread}>
I would like to redirect some of these links (given a particular condition)
<a href ={xen:link some_url}>
But to do this, I would need to extend actionThreads() to redirect to a new version of find_new_threads that contains a new version of thread_list_item, which then changes the links given the condition..
This would be a bit messy, and not ideal since I would be creating my own version of the find_new_threads template which is core XenForo (others plug-ins might also want to use this area)
There doesn't seem to be a way for switching the links using template hooks, there are no template hooks in thread_list_item I can use to switch the links, and there is no template hook in find_new_threads
What I would prefer to do is extend XenForo_Link...
(I know this works if I change the core files, but obviously can't do that for a plug-in). Also, if I can extend XenForo_Link, then it would solve my problem in all areas:
if the link contains "threads/" and is from a certain forum .. then change the link to something else
The problem is, it doesn't seem to be one of the listeners I can extend, I've tried all the Load_class_listeners with no luck.
What listener should I be using to extend XenForo_Link?