Now the third most likely languages are shown.

In "vier" the tag line is now suppressed. It saves a little bit of space - and is redundant.
This commit is contained in:
Michael Vogel 2013-01-09 20:54:18 +01:00
commit 82820d8e95
4 changed files with 58 additions and 6 deletions

View file

@ -213,8 +213,28 @@ class Item extends BaseObject {
localize_item($item);
if ($item["postopts"]) {
$langdata = explode(";", $item["postopts"]);
$langstr = substr($langdata[0], 5)." (".round($langdata[1]*100, 1)."%)";
//$langdata = explode(";", $item["postopts"]);
//$langstr = substr($langdata[0], 5)." (".round($langdata[1]*100, 1)."%)";
$langstr = "";
if (substr($item["postopts"], 0, 5) == "lang=") {
$postopts = substr($item["postopts"], 5);
$languages = explode(":", $postopts);
if (sizeof($languages) == 1) {
$languages = array();
$languages[] = $postopts;
}
foreach ($languages as $language) {
$langdata = explode(";", $language);
if ($langstr != "")
$langstr .= ", ";
//$langstr .= $langdata[0]." (".round($langdata[1]*100, 1)."%)";
$langstr .= round($langdata[1]*100, 1)."% ".$langdata[0];
}
}
}
$body = prepare_body($item,true);