Hey,
seems that i am to stupid.
I try to use the "integrate_messageindex_topics" hook and insert a Field which i like to retrieve from elkarte_threads as well
My Code for the handler ( which gets called)
class Topic_Prefix_Integrate
{
public static function integrate_messageindex_topics($optionArray){
//&$sort_column=$optionArray[0];
$indexOptions=$optionArray[1];
$indexOptions['custom_selects'] = array('t.prefix');
}
}
But it does not work out - Error Message:
Warning: Illegal string offset 'custom_selects' in /var/www/html/elk/sources/TopicPrefix.integrate.php on line 9
Notice: Array to string conversion in /var/www/html/elk/sources/TopicPrefix.integrate.php on line 9
Skip to main content
What is wrong here ?
Thanks
class Topic_Prefix_Integrate
{
public static function integrate_messageindex_topics(&$sort_column, &$optionArray){
$optionArray['custom_selects'] = array('t.prefix');
}
}
$optionArray is passed as second argument of the function. ;)
Many thanks.
Oh, I didn't notice!
It would be much better to use:
if (empty($optionArray['custom_selects']))
$optionArray['custom_selects'] = array();
$optionArray['custom_selects'][] = 't.prefix';
This way if the custom_selects is already defined by another addon it's not replaced entirely. ;)