- use htmlarea for editing app description and notes
- special stylesheet for application description and notes - function to display summary of description with html stripping
This commit is contained in:
@@ -116,4 +116,20 @@ function lookupAppName($appId)
|
||||
return $ob->appName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove html formatting from description and extract the first part of the description only.
|
||||
* This is to be used for search results, application summary tables, etc.
|
||||
*/
|
||||
function trim_description($sDescription)
|
||||
{
|
||||
// 1) let's take the first line of the description:
|
||||
$aDesc = explode("\n",trim($sDescription),2);
|
||||
// 2) maybe it's an html description and lines are separated with <br> or </p><p>
|
||||
$aDesc = explode("<br>",$aDesc[0],2);
|
||||
$aDesc = explode("<br />",$aDesc[0],2);
|
||||
$aDesc = explode("</p><p>",$aDesc[0],2);
|
||||
$aDesc = explode("</p><p /><p>",$aDesc[0],2);
|
||||
return trim(strip_tags($aDesc[0]));
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user