Ran into a problem today working with the K2 Category display and the JPlayer video plugin.
Videos for the items in the category should be viewable when displayed on the category list but they still showed the <flv>...</flv> tags. I use the JPlayer plugin to display videos (sometimes, other times I use the boVideos viewer... don't ask!)
Netbeans debugger showed that the JPlayer's 'onPrepareContent' plugin was being called correctly but it was expecting the item text to be in the text attribute! K2 places the text in the fulltext attribute when calling the plugin from the category view but passes it in the text attribute when passing from the item view ???
Wrote a quick hack to the JPlayer content plugin to create a temp variable to check the fulltext attribute to see if it is populated (from the category view) otherwise use the text attribute (from the item view):
$text = (($article->text != null) AND ($article->text != '')) ? $article->text : $article->fulltext;
if (preg_match($regex, $text) == FALSE) {
return;
}
Also had to change the bottom of the function to check whether to replace either the $article->text or $article->fulltext attributes!
