Модули NP1
From Ask in Wiki
Contents |
[edit]
Список
- NPParser
- FCKeditor
- TinуMCE
[edit]
Parser
- HTML to wikixml
Input: google - define:bill gates http://www.google.com/search?hl=en&rls=com.microsoft%3A*&q=define%3Aparis&btnG=Search
Output: wikixml http://en.wikipedia.org/wiki/Special:Export/Train
TEXTAREA-------
Россия Франция Германия США
TEXTAREA-------
CATAREA--------
Europe
CATAREA--------
[edit]
Описание
- Файлы которые могут использоваться, а могут и не использоваться в работе сайта в зависимости от конкретных задач.
- HTML нежелателен, но возможен в исключительных случаях и по минимум(в основном таблицы)
- Часто используемые и проверенные временем модули могут быть перенесены в ядро.
- Отсуцвие тех или иных модулей никак не повлияет на работу сайта за исключением функцинальности.
- Модули могу иметь парметры для запуска.
- Модули имеет стандартный синстаксис и структуру, но он не слишком жесткий
[edit]
ЧПУ - путь
[edit]
user (по умолчанию /Special:View)
/Films/ID (или name) - страница фильма(товара)
/Genre/Boyeviki/ - страница каталога(список или галлерея)
/Genre/Boyeviki/page2/ - вирт.(динамическая) страница постраничного вывода(список или галлерея)
[edit]
Special (вызов спец. шаблонов)
/Special:Edit/Films/ID (или name) - редактирование нода
/Special:Delete/Films/ID - удаление нода
/Special:Search/Films/String - поиск (список или галлерея)
/Special:Gallery/Films/ - галлерея файлов (список или галлерея)
/Special:Add/Title - добавление нода
/Special:AddGroup/Films/
/Special:Config/Filename
[edit]
Типы
- Путь
- Структура
- Контент
- Список
- Меню
- Календарь
- Поиск
- Баннер
[edit]
Вид в массивах
- $types = array(
- 'way' => array(
- 'title' => 'Путь',
- 'input' => array(
- 'type' => 'db',
- 'table' => 'pages',
- 'root_node' => 1,
- 'fields' => '*',
- ),
- 'output' => array(
- 'cycle' => true,
- 'templates' => array(
- 'top' => 'way.top.html',
- 'row' => 'way.row.html',
- 'bottom' => 'way.bottom.html',
- 'common' => 'way.html',
- ),
- 'type' => 'list',
- 'row_delimiter' => ' >> ',
- 'editor' => 'AREA',
- ),
- ),
- 'structure' => array(
- 'title' => 'Структура',
- 'input' => array(
- 'type' => 'db',
- 'table' => $config['structure'],
- 'root_node' => 1,
- 'limit' => 20,
- 'fields' => '*',
- ),
- 'output' => array(
- 'cycle' => true,
- 'templates' => array(
- 'common' => 'structure.html',
- ),
- 'type' => 'tree',
- 'editor' => 'AREA',
- ),
- ),
- 'content' => array(
- 'title' => 'Контент',
- 'input' => array(
- 'type' => 'db',
- 'table' => $config['structure'],
- 'fields' => '*',
- 'id' => $PAGE->page['id'],
- ),
- 'output' => array(
- 'type' => 'single',
- 'editor' => 'AREA',
- ),
- ),
- 'list' => array(
- 'title' => 'Список',
- 'input' => array(
- 'type' => ,
- 'table' => ,
- 'limit' => 20,
- ),
- 'output' => array(
- 'cycle' => true,
- 'templates' => array(
- 'top' => 'list.top.html',
- 'row' => 'list.row.html',
- 'bottom' => 'list.bottom.html',
- 'common' => 'list.html',
- ),
- 'type' => 'list',
- 'editor' => 'AREA',
- ),
- ),
- 'menu' => array(
- 'title' => 'Меню',
- 'input' => array(
- 'type' => 'db',
- 'table' => $config['structure'],
- 'root_node' => 1,
- 'limit' => 20,
- 'fields' => '*',
- ),
- 'output' => array(
- 'cycle' => true,
- 'templates' => array(
- 'top' => 'menu.top.html',
- 'row' => 'menu.row.html',
- 'bottom' => 'menu.bottom.html',
- 'common' => 'menu.html',
- ),
- 'type' => 'tree',
- 'editor' => 'AREA',
- ),
- ),
- 'tree' => array(
- 'title' => 'Дерево',
- 'input' => array(
- 'type' => 'db',
- 'table' => ,
- 'root_node' => 1,
- 'limit' => 20,
- 'fields' => '*',
- ),
- 'output' => array(
- 'cycle' => true,
- 'templates' => array(
- 'top' => 'tree.top.html',
- 'row' => 'tree.row.html',
- 'bottom' => 'tree.bottom.html',
- 'common' => 'tree.html',
- ),
- 'type' => 'tree',
- 'editor' => 'AREA',
- ),
- ),
- 'gallery' => array(
- 'title' => 'Галлерея',
- 'input' => array(
- 'type' => 'db',
- 'table' => ,
- 'root_node' => 1,
- 'limit' => 20,
- 'fields' => '*',
- ),
- 'output' => array(
- 'cycle' => true,
- 'templates' => array(
- 'top' => 'gallery.top.html',
- 'row' => 'gallery.row.html',
- 'bottom' => 'gallery.bottom.html',
- 'common' => 'gallery.html',
- ),
- 'type' => 'list',
- 'cols' => 3,
- 'rows' => 4,
- 'pages' => true,
- 'on_page' => 20,
- ),
- ),
- 'way' => array(
- );

