--- a/documents/template.inc.php +++ b/documents/template.inc.php @@ -21,7 +21,7 @@ - + @@ -46,8 +46,10 @@ - + Create your own custom Modernizr build: www.modernizr.com/download/ + --> + + @@ -87,7 +89,7 @@
- + + $length) { + //limit hit! + $string = substr($string,0,($length -3)); + if ($stopanywhere) { + //stop anywhere + $string .= '...'; + } else{ + //stop on a word. + $string = substr($string,0,strrpos($string,' ')).'...'; + } + } + return $string; +} function displayLogEntry($row, $idtoname) { - echo "

".$row->value->date.": ".$row->value->title." (".$idtoname[$row->value->agencyID].")

".$row->value->description; + $result = ""; + $result .= "

".$row->value->date.": ".truncate($row->value->title, 80)." (".$idtoname[$row->value->agencyID].")

"; + echo "

Title".$row->value->title."
".str_replace("\n","
",$row->value->description); if (isset($row->value->notes)) { -echo "
Note: ".$row->value->notes; +$result .= "
Note: ".$row->value->notes; } -echo "

"; +$result .= "

"; if (isset($row->value->links)){ -echo "

Links/Documents

"; } - echo "View original source... ID: ".$row->value->docID.""; -echo"
"; + $result .= "View original source... ID: ".strip_tags($row->value->docID).""; +$result .= "
"; +return $result; }