reworked map, especially GM3 and fullscreen map

This commit is contained in:
following
2013-02-21 23:22:59 +01:00
parent 683bc37fa6
commit c5057c884a
155 changed files with 13059 additions and 14081 deletions
+15
View File
@@ -305,4 +305,19 @@ function fix_magic_quotes_gpc()
}
}
}
// prelminary wiki help embedding; needs translation table
//
// pay attention to use only ' quotes in $text (escape other ')
function helppagelink($pagename)
{
global $opt;
if (isset($opt['locale'][$opt['template']['locale']]['helpwiki']))
return "<a class='nooutline' href='" . $opt['locale'][$opt['template']['locale']]['helpwiki'] .
str_replace(' ','_',$pagename) . "' target='_blank'>";
else
return $text;
}
?>
+11 -4
View File
@@ -43,6 +43,7 @@ class attribute
{
$attr = array();
$bFirst = true;
$bSearchGroupDefault = false;
if ($cacheId == 0)
{
@@ -51,20 +52,22 @@ class attribute
$sAddWhereSql = ' AND `cache_attrib`.`selectable`=1';
$rsAttr = sql("SELECT `cache_attrib`.`id`, IFNULL(`tt1`.`text`, `cache_attrib`.`name`) AS `name`,
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`, `cache_attrib`.`icon`
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`,
`cache_attrib`.`icon`, `cache_attrib`.`search_default`
FROM `cache_attrib`
LEFT JOIN `sys_trans` AS `t1` ON `cache_attrib`.`trans_id`=`t1`.`id` AND `cache_attrib`.`name`=`t1`.`text`
LEFT JOIN `sys_trans_text` AS `tt1` ON `t1`.`id`=`tt1`.`trans_id` AND `tt1`.`lang`='&1'
LEFT JOIN `sys_trans` AS `t2` ON `cache_attrib`.`html_desc_trans_id`=`t2`.`id`
LEFT JOIN `sys_trans_text` AS `tt2` ON `t2`.`id`=`tt2`.`trans_id` AND `tt2`.`lang`='&1'
WHERE `cache_attrib`.`group_id`='&2'
WHERE `cache_attrib`.`group_id`='&2'" . $sAddWhereSql . "
AND NOT IFNULL(`cache_attrib`.`hidden`, 0)=1
ORDER BY `cache_attrib`.`group_id` ASC", $opt['template']['locale'], $rAttrGroup['id']);
}
else
{
$rsAttr = sql("SELECT `cache_attrib`.`id`, IFNULL(`tt1`.`text`, `cache_attrib`.`name`) AS `name`,
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`, `cache_attrib`.`icon`
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`,
`cache_attrib`.`icon`, `cache_attrib`.`search_default`
FROM `caches_attributes`
INNER JOIN `cache_attrib` ON `caches_attributes`.`attrib_id`=`cache_attrib`.`id`
LEFT JOIN `sys_trans` AS `t1` ON `cache_attrib`.`trans_id`=`t1`.`id` AND `cache_attrib`.`name`=`t1`.`text`
@@ -80,13 +83,17 @@ class attribute
if ($firstLetterUppercase)
$rAttr['name'] = mb_strtoupper(mb_substr($rAttr['name'],0,1)) . mb_substr($rAttr['name'],1);
$attr[] = $rAttr;
if ($rAttr['search_default'])
$bSearchGroupDefault = true;
}
sql_free_result($rsAttr);
if (count($attr) > 0)
$attributes[] = array('name' => $rAttrGroup['name'],
$attributes[] = array('id' => $rAttrGroup['id'],
'name' => $rAttrGroup['name'],
'color' => $rAttrGroup['color'],
'category' => $rAttrGroup['category'],
'search_default' => $bSearchGroupDefault,
'attr' => $attr);
}
sql_free_result($rsAttrGroup);
+9 -4
View File
@@ -17,13 +17,13 @@ class useroptions
var $nUserId = 0;
var $nOptions;
function __construct($nUserId=ID_NEW)
function __construct($nUserId=ID_NEW, $optionset=1)
{
$this->nUserId = $nUserId+0;
if ($nUserId == ID_NEW)
{
$rs = sqll('SELECT `id`, `name`, `default_value`, `check_regex`, `option_order`, 0 AS `option_visible`, `internal_use`, `default_value` AS `option_value`
$rs = sqll('SELECT `id`, `name`, `default_value`, `check_regex`, `option_order`, 0 AS `option_visible`, `internal_use`, `default_value` AS `option_value`, `optionset`
FROM `profile_options`');
}
else
@@ -31,12 +31,13 @@ class useroptions
$rs = sqll("SELECT `p`.`id`, `p`.`name`, `p`.`default_value`, `p`.`check_regex`, `p`.`option_order`, IFNULL(`u`.`option_visible`, 0) AS `option_visible`, `p`.`internal_use`, IFNULL(`u`.`option_value`, `p`.`default_value`) AS `option_value`
FROM `profile_options` AS `p`
LEFT JOIN `user_options` AS `u` ON `p`.`id`=`u`.`option_id` AND (`u`.`user_id` IS NULL OR `u`.`user_id`='&1')
WHERE `optionset`='&2'
UNION
SELECT `u`.`option_id` AS `id`, `p`.`name`, `p`.`default_value`, `p`.`check_regex`, `p`.`option_order`, `u`.`option_visible`, `p`.`internal_use`, IFNULL(`u`.`option_value`, `p`.`default_value`) AS `option_value`
FROM `user_options` AS `u`
LEFT JOIN `profile_options` AS `p` ON `p`.`id`=`u`.`option_id`
WHERE `u`.`user_id`='&1'",
$this->nUserId);
$this->nUserId, $optionset);
}
while($record = sql_fetch_array($rs))
@@ -51,6 +52,10 @@ class useroptions
{
return $this->nUserId;
}
function getOptSet()
{
return $this->nOptions[$pId]['optionset'];
}
function getOptName($pId)
{
return $this->nOptions[$pId]['name'];
@@ -128,7 +133,7 @@ class useroptions
function tidy_html_description($text)
{
$options = array("input-encoding" => "utf8", "output-encoding" => "utf8", "output-xhtml" => true, "doctype" => "omit", "show-body-only" => true, "char-encoding" => "utf8", "quote-ampersand" => true, "quote-nbsp" => true, "wrap" => 0);
$options = array("input-encoding" => "utf8", "output-encoding" => "utf8", "output-xhtml" => true, "doctype" => "omit", "show-body-only" => true, "char-encoding" => "utf8", "quote-ampersand" => true, "quote-nbsp" => true, "wrap" => 0);
$config = HTMLPurifier_Config::createDefault();
$cssDefinition = $config->getCSSDefinition();