Error: cms.php on line 833
Code: Select all
$r[] = $p;
Code: Select all
function languagemenu() {
... // same as it was
while (($p = @readdir($fd)) == true ) {
if (@is_dir($pth['folder']['base'].$p)) {
if (preg_match('/^[A-z]{2}$/', $p)
&& !in_array($p, array('my', 'pseudo', 'languages'))) // replace the strings with the names of your "special" language folders
$r[] = $p;
}
}
... // same as it was
When replacing the name of the "special" language of the checkboxes are not displayed.cmb wrote:('my', 'pseudo', 'languages')))
Code: Select all
&& !in_array($p, array('ps', 'pseudo', 'languages')))
Do you mean the country flags?Termin wrote:the checkboxes are not displayed.
Code: Select all
&& !in_array($p, array('xa', 'xb', 'xc')))
This is understandable.cmb wrote: If you have 3 folder's you're using for special content with the names xa/, xb/, xc/, you should write:
Flags of the countries do not appear, this is the same as remove the function languagemenu() from the template.cmb wrote:Do you mean the country flags?
That's strange! I have a test installation with languages en, de, fr, sk and cz. If I write:Termin wrote:Flags of the countries do not appear, this is the same as remove the function languagemenu() from the template.
Code: Select all
function languagemenu() {
global $pth, $cf, $sl;
$t = '';
$r = array();
$fd = @opendir($pth['folder']['base']);
while (($p = @readdir($fd)) == true ) {
if (@is_dir($pth['folder']['base'].$p)) {
if (preg_match('/^[A-z]{2}$/', $p)
&& !in_array($p, array('cz', 'de')))
$r[] = $p;
}
}
var_dump($r); // this line is for debugging; remove later
if ($fd == true)closedir($fd); if(count($r) == 0)return ''; if($cf['language']['default'] != $sl)$t .= '<a href="'.$pth['folder']['base'].'">'.tag('img src="'.$pth['folder']['flags'].$cf['language']['default'].'.gif" alt="'.$cf['language']['default'].'" title=" '.$cf['language']['default'].' " class="flag"').'</a> '; $v = count($r); for($i = 0;
$i < $v;
$i++) {
if ($sl != $r[$i]) {
if (is_file($pth['folder']['flags'].'/'.$r[$i].'.gif')) {
$t .= '<a href="'.$pth['folder']['base'].$r[$i].'/">'.tag('img src="'.$pth['folder']['flags'].$r[$i].'.gif" alt="'.$r[$i].'" title=" '.$r[$i].' " class="flag"').'</a> ';
} else {
$t .= '<a href="'.$pth['folder']['base'].$r[$i].'/">['.$r[$i].']</a> ';
}
}
}
return ''.$t.'';
}
That's fine, you're welcome.Termin wrote:Everything turned out, thanks!