arms
Well-known member
Excuse if this seems really basic
I've extend the thread model (with reference to this: http://xenforo.com/community/threads/need-to-join-table-with-xf_thread-can-i.21557/#post-272533)
I've used:
Which works, and is picking up extra fields.
BUT, how do i get this to only run only within specified nodes? Or doesn't it really have an impact due to the left join?
I've extend the thread model (with reference to this: http://xenforo.com/community/threads/need-to-join-table-with-xf_thread-can-i.21557/#post-272533)
I've used:
PHP:
class PGArms_Model_Thread extends XFCP_PGArms_Model_Thread
{
public function prepareThreadFetchOptions(array $fetchOptions)
{
// CALL ORIGINAL
$threadFetchOptions = parent::prepareThreadFetchOptions($fetchOptions);
// ADD YOUR OWN JOINS Left join table
if(!empty($fetchOptions['join']) )
{
$threadFetchOptions['selectFields'] .= ',
dates.start_date, dates.closing_date';
$threadFetchOptions['joinTables'] .= '
LEFT JOIN pg_dates AS dates ON
(thread.thread_id = dates.thread_id)';
}
return $threadFetchOptions;
}
}
Which works, and is picking up extra fields.
BUT, how do i get this to only run only within specified nodes? Or doesn't it really have an impact due to the left join?