Skip to content

Instantly share code, notes, and snippets.

@croxton
Created September 9, 2011 10:50
Show Gist options
  • Save croxton/1205936 to your computer and use it in GitHub Desktop.
Save croxton/1205936 to your computer and use it in GitHub Desktop.
Tagger - Low search tweak
// ********************************************************************************* //
/**
* Preps the data for saving
*
* @param $data Contains the submitted field data.
* @return string Data to be saved
*/
public function save($data)
{
// Single Field UI?
if (isset($data['single_field']) == TRUE)
{
$data['tags'] = explode('||', $data['single_field']);
}
$this->EE->session->cache['Tagger']['FieldData'] = $data;
if (isset($data['tags']) == FALSE OR empty($data['tags']) == TRUE)
{
return '';
}
else
{
// need a space after the comma so Low search will index as separate words
return implode(', ', $data['tags']);
}
}
@croxton
Copy link
Author

croxton commented Sep 9, 2011

Change to tagger/ft.tagger.php Save() function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment