Browse Source

Обновление файла до версии 1.2.1

master
Repellent 8 years ago
parent
commit
09af510530
  1. 30
      module.php

30
module.php

@ -1,3 +1,9 @@
<style type="text/css">
.level_1:before {content: "\203a\a0";}
.level_2:before {margin-left: 10px; content: "\21b3\a0";}
.level_3:before {margin-left: 25px; content: "\21b3\a0";}
</style>
<?php
/**
@ -14,7 +20,7 @@ if (defined('ACP'))
{
$modul['ModuleName'] = 'Быстрый переход';
$modul['ModuleSysName'] = 'quickfinder';
$modul['ModuleVersion'] = '1.2';
$modul['ModuleVersion'] = '1.2.1';
$modul['ModuleDescription'] = 'Данный модуль является альтернативным способом организации меню навигации на сайте. Он представлен в виде выпадающего списка разделов и подразделов вашего сайта. Для использования модуля, разместите системный тег <strong>[mod_quickfinder:XXX]</strong> в нужном месте вашего шаблона, где XXX - идентификаторы меню навигации указанные через запятую.';
$modul['ModuleAutor'] = 'Arcanum, UPD Repellent ';
$modul['ModuleCopyright'] = '&copy; 2007-2016 AVE.CMS';
@ -131,6 +137,7 @@ function mod_quickfinder($navi_ids = '')
printQuickfinder($nav_items, $quickfinder);
echo $quickfinder . '</select>';
}
$sql->Close();
}
function printQuickfinder(&$nav_items, &$quickfinder = '', $parent = '0')
@ -149,6 +156,9 @@ function printQuickfinder(&$nav_items, &$quickfinder = '', $parent = '0')
'index.php?id=' . $row['document_id'] = rewrite_link('index.php?id=' . $row['document_id']);
if($row['alias']=='/') {
if (!start_with('javascript:', 'index.php?id=' . $row['document_id']))
{
if ($row['target'] == '_blank')
@ -160,14 +170,30 @@ function printQuickfinder(&$nav_items, &$quickfinder = '', $parent = '0')
$row['alias'] = "window.location.href = '" . $row['alias'] . "'";
}
}
} else {
if (!start_with('javascript:', 'index.php?id=' . $row['document_id']))
{
if ($row['target'] == '_blank')
{
$row['alias'] = "javascript:window.open('". ABS_PATH. $row['alias'] . "', '', '')";
}
else
{
$row['alias'] = "window.location.href = '". ABS_PATH. $row['alias'] . "'";
}
}
}
$quickfinder .= '<option class="level_' . $row['level'] . '" value="' . $row['alias'] . '"' . ($row['active'] == 1 ? ' selected="selected"' : '') . '>' . pretty_chars($row['title']) . '</option>';
if (isset($nav_items[$row['navigation_item_id']]))
{
printQuickfinder($nav_items, $quickfinder, $row['navigation_item_id']);
}
}
}
?>
Loading…
Cancel
Save