3 <html lang=
"en" class=
"no-js">
7 <meta name=
"viewport" content=
"width=device-width,initial-scale=1">
12 <link rel=
"shortcut icon" href=
"../assets/default.favicon.ico">
13 <meta name=
"generator" content=
"mkdocs-1.1.2, mkdocs-material-7.0.5">
17 <title>Getting Started - WoltLab Suite Documentation
</title>
21 <link rel=
"stylesheet" href=
"../assets/stylesheets/main.77f3fd56.min.css">
24 <link rel=
"stylesheet" href=
"../assets/stylesheets/palette.7fa14f5b.min.css">
28 <meta name=
"theme-color" content=
"#009485">
38 <link rel=
"stylesheet" href=
"../stylesheets/extra.css">
52 <body dir=
"ltr" data-md-color-scheme=
"" data-md-color-primary=
"teal" data-md-color-accent=
"">
56 <input class=
"md-toggle" data-md-toggle=
"drawer" type=
"checkbox" id=
"__drawer" autocomplete=
"off">
57 <input class=
"md-toggle" data-md-toggle=
"search" type=
"checkbox" id=
"__search" autocomplete=
"off">
58 <label class=
"md-overlay" for=
"__drawer"></label>
59 <div data-md-component=
"skip">
62 <a href=
"#creating-a-simple-package" class=
"md-skip">
67 <div data-md-component=
"announce">
69 <aside class=
"md-announce">
70 <div class=
"md-announce__inner md-grid md-typeset">
72 <a href=
"https://www.woltlab.com">Back to
<strong>woltlab.com
</strong></a>
81 <header class=
"md-header" data-md-component=
"header">
82 <nav class=
"md-header__inner md-grid" aria-label=
"Header">
83 <a href=
".." title=
"WoltLab Suite Documentation" class=
"md-header__button md-logo" aria-label=
"WoltLab Suite Documentation">
85 <img src=
"../assets/logo.png" alt=
"logo">
88 <label class=
"md-header__button md-icon" for=
"__drawer">
89 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
91 <div class=
"md-header__title" data-md-component=
"header-title">
92 <div class=
"md-header__ellipsis">
93 <div class=
"md-header__topic">
94 <span class=
"md-ellipsis">
95 WoltLab Suite Documentation
98 <div class=
"md-header__topic" data-md-component=
"header-topic">
99 <span class=
"md-ellipsis">
107 <div class=
"md-header__options">
111 <label class=
"md-header__button md-icon" for=
"__search">
112 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
115 <div class=
"md-search" data-md-component=
"search" role=
"dialog">
116 <label class=
"md-search__overlay" for=
"__search"></label>
117 <div class=
"md-search__inner" role=
"search">
118 <form class=
"md-search__form" name=
"search">
119 <input type=
"text" class=
"md-search__input" name=
"query" aria-label=
"Search" placeholder=
"Search" autocapitalize=
"off" autocorrect=
"off" autocomplete=
"off" spellcheck=
"false" data-md-component=
"search-query" data-md-state=
"active" required
>
120 <label class=
"md-search__icon md-icon" for=
"__search">
121 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
122 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
124 <button type=
"reset" class=
"md-search__icon md-icon" aria-label=
"Clear" tabindex=
"-1">
125 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
128 <div class=
"md-search__output">
129 <div class=
"md-search__scrollwrap" data-md-scrollfix
>
130 <div class=
"md-search-result" data-md-component=
"search-result">
131 <div class=
"md-search-result__meta">
134 <ol class=
"md-search-result__list"></ol>
145 <div class=
"md-container" data-md-component=
"container">
150 <main class=
"md-main" data-md-component=
"main">
151 <div class=
"md-main__inner md-grid">
155 <div class=
"md-sidebar md-sidebar--primary" data-md-component=
"sidebar" data-md-type=
"navigation" >
156 <div class=
"md-sidebar__scrollwrap">
157 <div class=
"md-sidebar__inner">
163 <nav class=
"md-nav md-nav--primary" aria-label=
"Navigation" data-md-level=
"0">
164 <label class=
"md-nav__title" for=
"__drawer">
165 <a href=
".." title=
"WoltLab Suite Documentation" class=
"md-nav__button md-logo" aria-label=
"WoltLab Suite Documentation">
167 <img src=
"../assets/logo.png" alt=
"logo">
170 WoltLab Suite Documentation
173 <ul class=
"md-nav__list" data-md-scrollfix
>
184 <li class=
"md-nav__item md-nav__item--active">
186 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"toc" type=
"checkbox" id=
"__toc">
191 <label class=
"md-nav__link md-nav__link--active" for=
"__toc">
193 <span class=
"md-nav__icon md-icon"></span>
196 <a href=
"./" class=
"md-nav__link md-nav__link--active">
201 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
207 <label class=
"md-nav__title" for=
"__toc">
208 <span class=
"md-nav__icon md-icon"></span>
211 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
213 <li class=
"md-nav__item">
214 <a href=
"#setup-and-requirements" class=
"md-nav__link">
215 Setup and Requirements
220 <li class=
"md-nav__item">
221 <a href=
"#the-packagexml-file" class=
"md-nav__link">
227 <li class=
"md-nav__item">
228 <a href=
"#the-php-class" class=
"md-nav__link">
234 <li class=
"md-nav__item">
235 <a href=
"#the-template" class=
"md-nav__link">
241 <li class=
"md-nav__item">
242 <a href=
"#the-page-definition" class=
"md-nav__link">
248 <li class=
"md-nav__item">
249 <a href=
"#building-the-package" class=
"md-nav__link">
255 <li class=
"md-nav__item">
256 <a href=
"#installation" class=
"md-nav__link">
262 <li class=
"md-nav__item">
263 <a href=
"#developer-tools" class=
"md-nav__link">
267 <nav class=
"md-nav" aria-label=
"Developer Tools">
268 <ul class=
"md-nav__list">
270 <li class=
"md-nav__item">
271 <a href=
"#registering-a-project" class=
"md-nav__link">
272 Registering a Project
277 <li class=
"md-nav__item">
278 <a href=
"#synchronizing" class=
"md-nav__link">
289 <li class=
"md-nav__item">
290 <a href=
"#appendix" class=
"md-nav__link">
294 <nav class=
"md-nav" aria-label=
"Appendix">
295 <ul class=
"md-nav__list">
297 <li class=
"md-nav__item">
298 <a href=
"#template-guessing" class=
"md-nav__link">
325 <li class=
"md-nav__item md-nav__item--nested">
328 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2" type=
"checkbox" id=
"__nav_2" >
330 <label class=
"md-nav__link" for=
"__nav_2">
332 <span class=
"md-nav__icon md-icon"></span>
334 <nav class=
"md-nav" aria-label=
"PHP API" data-md-level=
"1">
335 <label class=
"md-nav__title" for=
"__nav_2">
336 <span class=
"md-nav__icon md-icon"></span>
339 <ul class=
"md-nav__list" data-md-scrollfix
>
345 <li class=
"md-nav__item">
346 <a href=
"../php/pages/" class=
"md-nav__link">
357 <li class=
"md-nav__item">
358 <a href=
"../php/database-objects/" class=
"md-nav__link">
369 <li class=
"md-nav__item">
370 <a href=
"../php/database-access/" class=
"md-nav__link">
381 <li class=
"md-nav__item">
382 <a href=
"../php/exceptions/" class=
"md-nav__link">
394 <li class=
"md-nav__item md-nav__item--nested">
397 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5" type=
"checkbox" id=
"__nav_2_5" >
399 <label class=
"md-nav__link" for=
"__nav_2_5">
401 <span class=
"md-nav__icon md-icon"></span>
403 <nav class=
"md-nav" aria-label=
"API" data-md-level=
"2">
404 <label class=
"md-nav__title" for=
"__nav_2_5">
405 <span class=
"md-nav__icon md-icon"></span>
408 <ul class=
"md-nav__list" data-md-scrollfix
>
414 <li class=
"md-nav__item">
415 <a href=
"../php/api/caches/" class=
"md-nav__link">
426 <li class=
"md-nav__item">
427 <a href=
"../php/api/comments/" class=
"md-nav__link">
438 <li class=
"md-nav__item">
439 <a href=
"../php/api/cronjobs/" class=
"md-nav__link">
450 <li class=
"md-nav__item">
451 <a href=
"../php/api/events/" class=
"md-nav__link">
463 <li class=
"md-nav__item md-nav__item--nested">
466 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_5" type=
"checkbox" id=
"__nav_2_5_5" >
468 <label class=
"md-nav__link" for=
"__nav_2_5_5">
470 <span class=
"md-nav__icon md-icon"></span>
472 <nav class=
"md-nav" aria-label=
"Form Builder" data-md-level=
"3">
473 <label class=
"md-nav__title" for=
"__nav_2_5_5">
474 <span class=
"md-nav__icon md-icon"></span>
477 <ul class=
"md-nav__list" data-md-scrollfix
>
483 <li class=
"md-nav__item">
484 <a href=
"../php/api/form_builder/overview/" class=
"md-nav__link">
495 <li class=
"md-nav__item">
496 <a href=
"../php/api/form_builder/structure/" class=
"md-nav__link">
507 <li class=
"md-nav__item">
508 <a href=
"../php/api/form_builder/form_fields/" class=
"md-nav__link">
519 <li class=
"md-nav__item">
520 <a href=
"../php/api/form_builder/validation_data/" class=
"md-nav__link">
531 <li class=
"md-nav__item">
532 <a href=
"../php/api/form_builder/dependencies/" class=
"md-nav__link">
549 <li class=
"md-nav__item">
550 <a href=
"../php/api/package_installation_plugins/" class=
"md-nav__link">
551 Package Installation Plugins
561 <li class=
"md-nav__item">
562 <a href=
"../php/api/user_activity_points/" class=
"md-nav__link">
573 <li class=
"md-nav__item">
574 <a href=
"../php/api/user_notifications/" class=
"md-nav__link">
585 <li class=
"md-nav__item">
586 <a href=
"../php/api/sitemaps/" class=
"md-nav__link">
603 <li class=
"md-nav__item">
604 <a href=
"../php/code-style/" class=
"md-nav__link">
615 <li class=
"md-nav__item">
616 <a href=
"../php/apps/" class=
"md-nav__link">
627 <li class=
"md-nav__item">
628 <a href=
"../php/gdpr/" class=
"md-nav__link">
649 <li class=
"md-nav__item md-nav__item--nested">
652 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_3" type=
"checkbox" id=
"__nav_3" >
654 <label class=
"md-nav__link" for=
"__nav_3">
655 Languages, Templates & CSS
656 <span class=
"md-nav__icon md-icon"></span>
658 <nav class=
"md-nav" aria-label=
"Languages, Templates & CSS" data-md-level=
"1">
659 <label class=
"md-nav__title" for=
"__nav_3">
660 <span class=
"md-nav__icon md-icon"></span>
661 Languages, Templates & CSS
663 <ul class=
"md-nav__list" data-md-scrollfix
>
669 <li class=
"md-nav__item">
670 <a href=
"../view/languages/" class=
"md-nav__link">
681 <li class=
"md-nav__item">
682 <a href=
"../view/templates/" class=
"md-nav__link">
693 <li class=
"md-nav__item">
694 <a href=
"../view/css/" class=
"md-nav__link">
715 <li class=
"md-nav__item md-nav__item--nested">
718 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4" type=
"checkbox" id=
"__nav_4" >
720 <label class=
"md-nav__link" for=
"__nav_4">
722 <span class=
"md-nav__icon md-icon"></span>
724 <nav class=
"md-nav" aria-label=
"JavaScript API" data-md-level=
"1">
725 <label class=
"md-nav__title" for=
"__nav_4">
726 <span class=
"md-nav__icon md-icon"></span>
729 <ul class=
"md-nav__list" data-md-scrollfix
>
735 <li class=
"md-nav__item">
736 <a href=
"../javascript/general-usage/" class=
"md-nav__link">
748 <li class=
"md-nav__item md-nav__item--nested">
751 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4_2" type=
"checkbox" id=
"__nav_4_2" >
753 <label class=
"md-nav__link" for=
"__nav_4_2">
755 <span class=
"md-nav__icon md-icon"></span>
757 <nav class=
"md-nav" aria-label=
"New API" data-md-level=
"2">
758 <label class=
"md-nav__title" for=
"__nav_4_2">
759 <span class=
"md-nav__icon md-icon"></span>
762 <ul class=
"md-nav__list" data-md-scrollfix
>
768 <li class=
"md-nav__item">
769 <a href=
"../javascript/new-api_writing-a-module/" class=
"md-nav__link">
780 <li class=
"md-nav__item">
781 <a href=
"../javascript/new-api_data-structures/" class=
"md-nav__link">
792 <li class=
"md-nav__item">
793 <a href=
"../javascript/new-api_core/" class=
"md-nav__link">
804 <li class=
"md-nav__item">
805 <a href=
"../javascript/new-api_dom/" class=
"md-nav__link">
816 <li class=
"md-nav__item">
817 <a href=
"../javascript/new-api_events/" class=
"md-nav__link">
828 <li class=
"md-nav__item">
829 <a href=
"../javascript/new-api_ajax/" class=
"md-nav__link">
840 <li class=
"md-nav__item">
841 <a href=
"../javascript/new-api_dialogs/" class=
"md-nav__link">
852 <li class=
"md-nav__item">
853 <a href=
"../javascript/new-api_browser/" class=
"md-nav__link">
854 Browser and Screen Sizes
864 <li class=
"md-nav__item">
865 <a href=
"../javascript/new-api_ui/" class=
"md-nav__link">
882 <li class=
"md-nav__item">
883 <a href=
"../javascript/legacy-api/" class=
"md-nav__link">
894 <li class=
"md-nav__item">
895 <a href=
"../javascript/helper-functions/" class=
"md-nav__link">
906 <li class=
"md-nav__item">
907 <a href=
"../javascript/code-snippets/" class=
"md-nav__link">
928 <li class=
"md-nav__item md-nav__item--nested">
931 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5" type=
"checkbox" id=
"__nav_5" >
933 <label class=
"md-nav__link" for=
"__nav_5">
935 <span class=
"md-nav__icon md-icon"></span>
937 <nav class=
"md-nav" aria-label=
"Package Components" data-md-level=
"1">
938 <label class=
"md-nav__title" for=
"__nav_5">
939 <span class=
"md-nav__icon md-icon"></span>
942 <ul class=
"md-nav__list" data-md-scrollfix
>
948 <li class=
"md-nav__item">
949 <a href=
"../package/package-xml/" class=
"md-nav__link">
961 <li class=
"md-nav__item md-nav__item--nested">
964 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5_2" type=
"checkbox" id=
"__nav_5_2" >
966 <label class=
"md-nav__link" for=
"__nav_5_2">
968 <span class=
"md-nav__icon md-icon"></span>
970 <nav class=
"md-nav" aria-label=
"PIPs" data-md-level=
"2">
971 <label class=
"md-nav__title" for=
"__nav_5_2">
972 <span class=
"md-nav__icon md-icon"></span>
975 <ul class=
"md-nav__list" data-md-scrollfix
>
981 <li class=
"md-nav__item">
982 <a href=
"../package/pip/" class=
"md-nav__link">
993 <li class=
"md-nav__item">
994 <a href=
"../package/pip/acl-option/" class=
"md-nav__link">
1005 <li class=
"md-nav__item">
1006 <a href=
"../package/pip/acp-menu/" class=
"md-nav__link">
1017 <li class=
"md-nav__item">
1018 <a href=
"../package/pip/acp-search-provider/" class=
"md-nav__link">
1029 <li class=
"md-nav__item">
1030 <a href=
"../package/pip/acp-template/" class=
"md-nav__link">
1041 <li class=
"md-nav__item">
1042 <a href=
"../package/pip/bbcode/" class=
"md-nav__link">
1053 <li class=
"md-nav__item">
1054 <a href=
"../package/pip/box/" class=
"md-nav__link">
1065 <li class=
"md-nav__item">
1066 <a href=
"../package/pip/clipboard-action/" class=
"md-nav__link">
1077 <li class=
"md-nav__item">
1078 <a href=
"../package/pip/core-object/" class=
"md-nav__link">
1089 <li class=
"md-nav__item">
1090 <a href=
"../package/pip/cronjob/" class=
"md-nav__link">
1101 <li class=
"md-nav__item">
1102 <a href=
"../package/pip/event-listener/" class=
"md-nav__link">
1113 <li class=
"md-nav__item">
1114 <a href=
"../package/pip/file/" class=
"md-nav__link">
1125 <li class=
"md-nav__item">
1126 <a href=
"../package/pip/language/" class=
"md-nav__link">
1137 <li class=
"md-nav__item">
1138 <a href=
"../package/pip/media-provider/" class=
"md-nav__link">
1149 <li class=
"md-nav__item">
1150 <a href=
"../package/pip/menu/" class=
"md-nav__link">
1161 <li class=
"md-nav__item">
1162 <a href=
"../package/pip/menu-item/" class=
"md-nav__link">
1173 <li class=
"md-nav__item">
1174 <a href=
"../package/pip/object-type/" class=
"md-nav__link">
1185 <li class=
"md-nav__item">
1186 <a href=
"../package/pip/object-type-definition/" class=
"md-nav__link">
1187 objectTypeDefinition
1197 <li class=
"md-nav__item">
1198 <a href=
"../package/pip/option/" class=
"md-nav__link">
1209 <li class=
"md-nav__item">
1210 <a href=
"../package/pip/page/" class=
"md-nav__link">
1221 <li class=
"md-nav__item">
1222 <a href=
"../package/pip/pip/" class=
"md-nav__link">
1233 <li class=
"md-nav__item">
1234 <a href=
"../package/pip/script/" class=
"md-nav__link">
1245 <li class=
"md-nav__item">
1246 <a href=
"../package/pip/smiley/" class=
"md-nav__link">
1257 <li class=
"md-nav__item">
1258 <a href=
"../package/pip/sql/" class=
"md-nav__link">
1269 <li class=
"md-nav__item">
1270 <a href=
"../package/pip/style/" class=
"md-nav__link">
1281 <li class=
"md-nav__item">
1282 <a href=
"../package/pip/template/" class=
"md-nav__link">
1293 <li class=
"md-nav__item">
1294 <a href=
"../package/pip/template-listener/" class=
"md-nav__link">
1305 <li class=
"md-nav__item">
1306 <a href=
"../package/pip/user-group-option/" class=
"md-nav__link">
1317 <li class=
"md-nav__item">
1318 <a href=
"../package/pip/user-menu/" class=
"md-nav__link">
1329 <li class=
"md-nav__item">
1330 <a href=
"../package/pip/user-notification-event/" class=
"md-nav__link">
1331 userNotificationEvent
1341 <li class=
"md-nav__item">
1342 <a href=
"../package/pip/user-option/" class=
"md-nav__link">
1353 <li class=
"md-nav__item">
1354 <a href=
"../package/pip/user-profile-menu/" class=
"md-nav__link">
1371 <li class=
"md-nav__item">
1372 <a href=
"../package/database-php-api/" class=
"md-nav__link">
1393 <li class=
"md-nav__item md-nav__item--nested">
1396 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6" type=
"checkbox" id=
"__nav_6" >
1398 <label class=
"md-nav__link" for=
"__nav_6">
1400 <span class=
"md-nav__icon md-icon"></span>
1402 <nav class=
"md-nav" aria-label=
"Migration" data-md-level=
"1">
1403 <label class=
"md-nav__title" for=
"__nav_6">
1404 <span class=
"md-nav__icon md-icon"></span>
1407 <ul class=
"md-nav__list" data-md-scrollfix
>
1414 <li class=
"md-nav__item md-nav__item--nested">
1417 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_1" type=
"checkbox" id=
"__nav_6_1" >
1419 <label class=
"md-nav__link" for=
"__nav_6_1">
1420 Migrating from WSC
5.3
1421 <span class=
"md-nav__icon md-icon"></span>
1423 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.3" data-md-level=
"2">
1424 <label class=
"md-nav__title" for=
"__nav_6_1">
1425 <span class=
"md-nav__icon md-icon"></span>
1426 Migrating from WSC
5.3
1428 <ul class=
"md-nav__list" data-md-scrollfix
>
1434 <li class=
"md-nav__item">
1435 <a href=
"../migration/wsc53/php/" class=
"md-nav__link">
1446 <li class=
"md-nav__item">
1447 <a href=
"../migration/wsc53/session/" class=
"md-nav__link">
1448 Session Handling and Authentication
1458 <li class=
"md-nav__item">
1459 <a href=
"../migration/wsc53/javascript/" class=
"md-nav__link">
1470 <li class=
"md-nav__item">
1471 <a href=
"../migration/wsc53/templates/" class=
"md-nav__link">
1482 <li class=
"md-nav__item">
1483 <a href=
"../migration/wsc53/libraries/" class=
"md-nav__link">
1484 Third Party Libraries
1501 <li class=
"md-nav__item md-nav__item--nested">
1504 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_2" type=
"checkbox" id=
"__nav_6_2" >
1506 <label class=
"md-nav__link" for=
"__nav_6_2">
1507 Migrating from WSC
5.2
1508 <span class=
"md-nav__icon md-icon"></span>
1510 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.2" data-md-level=
"2">
1511 <label class=
"md-nav__title" for=
"__nav_6_2">
1512 <span class=
"md-nav__icon md-icon"></span>
1513 Migrating from WSC
5.2
1515 <ul class=
"md-nav__list" data-md-scrollfix
>
1521 <li class=
"md-nav__item">
1522 <a href=
"../migration/wsc52/php/" class=
"md-nav__link">
1533 <li class=
"md-nav__item">
1534 <a href=
"../migration/wsc52/templates/" class=
"md-nav__link">
1535 Templates and Languages
1545 <li class=
"md-nav__item">
1546 <a href=
"../migration/wsc52/libraries/" class=
"md-nav__link">
1547 Third Party Libraries
1564 <li class=
"md-nav__item md-nav__item--nested">
1567 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_3" type=
"checkbox" id=
"__nav_6_3" >
1569 <label class=
"md-nav__link" for=
"__nav_6_3">
1570 Migrating from WSC
3.1
1571 <span class=
"md-nav__icon md-icon"></span>
1573 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.1" data-md-level=
"2">
1574 <label class=
"md-nav__title" for=
"__nav_6_3">
1575 <span class=
"md-nav__icon md-icon"></span>
1576 Migrating from WSC
3.1
1578 <ul class=
"md-nav__list" data-md-scrollfix
>
1584 <li class=
"md-nav__item">
1585 <a href=
"../migration/wsc31/php/" class=
"md-nav__link">
1603 <li class=
"md-nav__item md-nav__item--nested">
1606 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_4" type=
"checkbox" id=
"__nav_6_4" >
1608 <label class=
"md-nav__link" for=
"__nav_6_4">
1609 Migrating from WSC
3.0
1610 <span class=
"md-nav__icon md-icon"></span>
1612 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.0" data-md-level=
"2">
1613 <label class=
"md-nav__title" for=
"__nav_6_4">
1614 <span class=
"md-nav__icon md-icon"></span>
1615 Migrating from WSC
3.0
1617 <ul class=
"md-nav__list" data-md-scrollfix
>
1623 <li class=
"md-nav__item">
1624 <a href=
"../migration/wsc30/php/" class=
"md-nav__link">
1635 <li class=
"md-nav__item">
1636 <a href=
"../migration/wsc30/javascript/" class=
"md-nav__link">
1647 <li class=
"md-nav__item">
1648 <a href=
"../migration/wsc30/templates/" class=
"md-nav__link">
1659 <li class=
"md-nav__item">
1660 <a href=
"../migration/wsc30/css/" class=
"md-nav__link">
1671 <li class=
"md-nav__item">
1672 <a href=
"../migration/wsc30/package/" class=
"md-nav__link">
1690 <li class=
"md-nav__item md-nav__item--nested">
1693 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_5" type=
"checkbox" id=
"__nav_6_5" >
1695 <label class=
"md-nav__link" for=
"__nav_6_5">
1696 Migrating from WCF
2.1
1697 <span class=
"md-nav__icon md-icon"></span>
1699 <nav class=
"md-nav" aria-label=
"Migrating from WCF 2.1" data-md-level=
"2">
1700 <label class=
"md-nav__title" for=
"__nav_6_5">
1701 <span class=
"md-nav__icon md-icon"></span>
1702 Migrating from WCF
2.1
1704 <ul class=
"md-nav__list" data-md-scrollfix
>
1710 <li class=
"md-nav__item">
1711 <a href=
"../migration/wcf21/php/" class=
"md-nav__link">
1722 <li class=
"md-nav__item">
1723 <a href=
"../migration/wcf21/templates/" class=
"md-nav__link">
1734 <li class=
"md-nav__item">
1735 <a href=
"../migration/wcf21/css/" class=
"md-nav__link">
1746 <li class=
"md-nav__item">
1747 <a href=
"../migration/wcf21/package/" class=
"md-nav__link">
1774 <li class=
"md-nav__item md-nav__item--nested">
1777 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7" type=
"checkbox" id=
"__nav_7" >
1779 <label class=
"md-nav__link" for=
"__nav_7">
1781 <span class=
"md-nav__icon md-icon"></span>
1783 <nav class=
"md-nav" aria-label=
"Tutorials" data-md-level=
"1">
1784 <label class=
"md-nav__title" for=
"__nav_7">
1785 <span class=
"md-nav__icon md-icon"></span>
1788 <ul class=
"md-nav__list" data-md-scrollfix
>
1795 <li class=
"md-nav__item md-nav__item--nested">
1798 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7_1" type=
"checkbox" id=
"__nav_7_1" >
1800 <label class=
"md-nav__link" for=
"__nav_7_1">
1802 <span class=
"md-nav__icon md-icon"></span>
1804 <nav class=
"md-nav" aria-label=
"Tutorial Series" data-md-level=
"2">
1805 <label class=
"md-nav__title" for=
"__nav_7_1">
1806 <span class=
"md-nav__icon md-icon"></span>
1809 <ul class=
"md-nav__list" data-md-scrollfix
>
1815 <li class=
"md-nav__item">
1816 <a href=
"../tutorial/series/overview/" class=
"md-nav__link">
1827 <li class=
"md-nav__item">
1828 <a href=
"../tutorial/series/part_1/" class=
"md-nav__link">
1839 <li class=
"md-nav__item">
1840 <a href=
"../tutorial/series/part_2/" class=
"md-nav__link">
1851 <li class=
"md-nav__item">
1852 <a href=
"../tutorial/series/part_3/" class=
"md-nav__link">
1879 <div class=
"md-sidebar md-sidebar--secondary" data-md-component=
"sidebar" data-md-type=
"toc" >
1880 <div class=
"md-sidebar__scrollwrap">
1881 <div class=
"md-sidebar__inner">
1883 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
1889 <label class=
"md-nav__title" for=
"__toc">
1890 <span class=
"md-nav__icon md-icon"></span>
1893 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
1895 <li class=
"md-nav__item">
1896 <a href=
"#setup-and-requirements" class=
"md-nav__link">
1897 Setup and Requirements
1902 <li class=
"md-nav__item">
1903 <a href=
"#the-packagexml-file" class=
"md-nav__link">
1904 The package.xml File
1909 <li class=
"md-nav__item">
1910 <a href=
"#the-php-class" class=
"md-nav__link">
1916 <li class=
"md-nav__item">
1917 <a href=
"#the-template" class=
"md-nav__link">
1923 <li class=
"md-nav__item">
1924 <a href=
"#the-page-definition" class=
"md-nav__link">
1930 <li class=
"md-nav__item">
1931 <a href=
"#building-the-package" class=
"md-nav__link">
1932 Building the Package
1937 <li class=
"md-nav__item">
1938 <a href=
"#installation" class=
"md-nav__link">
1944 <li class=
"md-nav__item">
1945 <a href=
"#developer-tools" class=
"md-nav__link">
1949 <nav class=
"md-nav" aria-label=
"Developer Tools">
1950 <ul class=
"md-nav__list">
1952 <li class=
"md-nav__item">
1953 <a href=
"#registering-a-project" class=
"md-nav__link">
1954 Registering a Project
1959 <li class=
"md-nav__item">
1960 <a href=
"#synchronizing" class=
"md-nav__link">
1971 <li class=
"md-nav__item">
1972 <a href=
"#appendix" class=
"md-nav__link">
1976 <nav class=
"md-nav" aria-label=
"Appendix">
1977 <ul class=
"md-nav__list">
1979 <li class=
"md-nav__item">
1980 <a href=
"#template-guessing" class=
"md-nav__link">
1999 <div class=
"md-content" data-md-component=
"content">
2000 <article class=
"md-content__inner md-typeset">
2004 <h1 id=
"creating-a-simple-package">Creating a simple package
<a class=
"headerlink" href=
"#creating-a-simple-package" title=
"Permanent link">#
</a></h1>
2005 <h2 id=
"setup-and-requirements">Setup and Requirements
<a class=
"headerlink" href=
"#setup-and-requirements" title=
"Permanent link">#
</a></h2>
2006 <p>This guide will help you to create a simple package that provides a simple test
2007 page. It is nothing too fancy, but you can use it as the foundation for your
2009 <p>There are some requirements you should met before starting:
</p>
2011 <li>Text editor with syntax highlighting for PHP,
<a href=
"https://notepad-plus-plus.org/">Notepad++
</a> is a solid pick
</li>
2012 <li><code>*.php
</code> and
<code>*.tpl
</code> should be encoded with ANSI/ASCII
</li>
2013 <li><code>*.xml
</code> are always encoded with UTF-
8, but omit the BOM (byte-order-mark)
</li>
2014 <li>Use tabs instead of spaces to indent lines
</li>
2015 <li>It is recommended to set the tab width to
<code>8</code> spaces, this is used in the entire software and will ease reading the source files
</li>
2016 <li>An active installation of WoltLab Suite
3</li>
2017 <li>An application to create
<code>*.tar
</code> archives, e.g.
<a href=
"http://www.7-zip.org/">7-Zip
</a> on Windows
</li>
2019 <h2 id=
"the-packagexml-file">The package.xml File
<a class=
"headerlink" href=
"#the-packagexml-file" title=
"Permanent link">#
</a></h2>
2020 <p>We want to create a simple page that will display the sentence
"Hello World" embedded
2021 into the application frame. Create an empty directory in the workspace of your choice
2023 <p>Create a new file called
<code>package.xml
</code> and insert the code below:
</p>
2024 <div class=
"highlight"><pre><span></span><code><span class=
"cp"><?xml version=
"1.0" encoding=
"UTF-
8"?
></span>
2025 <span class=
"nt"><package
</span> <span class=
"na">xmlns=
</span><span class=
"s">"http://www.woltlab.com
"</span> <span class=
"na">xmlns:xsi=
</span><span class=
"s">"http://www.w3.org/
2001/XMLSchema-instance
"</span> <span class=
"na">xsi:schemaLocation=
</span><span class=
"s">"http://www.woltlab.com http://www.woltlab.com/XSD/
2019/package.xsd
"</span> <span class=
"na">name=
</span><span class=
"s">"com.example.test
"</span><span class=
"nt">></span>
2026 <span class=
"nt"><packageinformation
></span>
2027 <span class=
"c"><!-- com.example.test --
></span>
2028 <span class=
"nt"><packagename
></span>Simple Package
<span class=
"nt"></packagename
></span>
2029 <span class=
"nt"><packagedescription
></span>A simple package to demonstrate the package system of WoltLab Suite Core
<span class=
"nt"></packagedescription
></span>
2030 <span class=
"nt"><version
></span>1.0.0<span class=
"nt"></version
></span>
2031 <span class=
"nt"><date
></span>2019-
04-
28<span class=
"nt"></date
></span>
2032 <span class=
"nt"></packageinformation
></span>
2033 <span class=
"nt"><authorinformation
></span>
2034 <span class=
"nt"><author
></span>Your Name
<span class=
"nt"></author
></span>
2035 <span class=
"nt"><authorurl
></span>http://www.example.com
<span class=
"nt"></authorurl
></span>
2036 <span class=
"nt"></authorinformation
></span>
2037 <span class=
"nt"><excludedpackages
></span>
2038 <span class=
"nt"><excludedpackage
</span> <span class=
"na">version=
</span><span class=
"s">"6.0.0 Alpha
1"</span><span class=
"nt">></span>com.woltlab.wcf
<span class=
"nt"></excludedpackage
></span>
2039 <span class=
"nt"></excludedpackages
></span>
2040 <span class=
"nt"><instructions
</span> <span class=
"na">type=
</span><span class=
"s">"install
"</span><span class=
"nt">></span>
2041 <span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"file
"</span> <span class=
"nt">/
></span>
2042 <span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"template
"</span> <span class=
"nt">/
></span>
2043 <span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"page
"</span> <span class=
"nt">/
></span>
2044 <span class=
"nt"></instructions
></span>
2045 <span class=
"nt"></package
></span>
2047 <p>There is an
<a href=
"../package/package-xml/">entire chapter
</a> on the package system that explains what the code above
2048 does and how you can adjust it to fit your needs. For now we'll keep it as it is.
</p>
2049 <h2 id=
"the-php-class">The PHP Class
<a class=
"headerlink" href=
"#the-php-class" title=
"Permanent link">#
</a></h2>
2050 <p>The next step is to create the PHP class which will serve our page:
</p>
2052 <li>Create the directory
<code>files
</code> in the same directory where
<code>package.xml
</code> is located
</li>
2053 <li>Open
<code>files
</code> and create the directory
<code>lib
</code></li>
2054 <li>Open
<code>lib
</code> and create the directory
<code>page
</code></li>
2055 <li>Within the directory
<code>page
</code>, please create the file
<code>TestPage.class.php
</code></li>
2057 <p>Copy and paste the following code into the
<code>TestPage.class.php
</code>:
</p>
2058 <div class=
"highlight"><pre><span></span><code><span class=
"o"><?
</span><span class=
"nx">php
</span>
2059 <span class=
"k">namespace
</span> <span class=
"nx">wcf\page
</span><span class=
"p">;
</span>
2060 <span class=
"k">use
</span> <span class=
"nx">wcf\system\WCF
</span><span class=
"p">;
</span>
2062 <span class=
"sd">/**
</span>
2063 <span class=
"sd"> * A simple test page for demonstration purposes.
</span>
2064 <span class=
"sd"> *
</span>
2065 <span class=
"sd"> * @author YOUR NAME
</span>
2066 <span class=
"sd"> * @license GNU Lesser General Public License
<http://opensource.org/licenses/lgpl-license.php
></span>
2067 <span class=
"sd"> */
</span>
2068 <span class=
"k">class
</span> <span class=
"nc">TestPage
</span> <span class=
"k">extends
</span> <span class=
"nx">AbstractPage
</span> <span class=
"p">{
</span>
2069 <span class=
"sd">/**
</span>
2070 <span class=
"sd"> * @var string
</span>
2071 <span class=
"sd"> */
</span>
2072 <span class=
"k">protected
</span> <span class=
"nv">$greet
</span> <span class=
"o">=
</span> <span class=
"s1">''</span><span class=
"p">;
</span>
2074 <span class=
"sd">/**
</span>
2075 <span class=
"sd"> * @inheritDoc
</span>
2076 <span class=
"sd"> */
</span>
2077 <span class=
"k">public
</span> <span class=
"k">function
</span> <span class=
"nf">readParameters
</span><span class=
"p">()
</span> <span class=
"p">{
</span>
2078 <span class=
"k">parent
</span><span class=
"o">::
</span><span class=
"na">readParameters
</span><span class=
"p">();
</span>
2080 <span class=
"k">if
</span> <span class=
"p">(
</span><span class=
"nb">isset
</span><span class=
"p">(
</span><span class=
"nv">$_GET
</span><span class=
"p">[
</span><span class=
"s1">'greet
'</span><span class=
"p">]))
</span> <span class=
"nv">$this
</span><span class=
"o">-
></span><span class=
"na">greet
</span> <span class=
"o">=
</span> <span class=
"nv">$_GET
</span><span class=
"p">[
</span><span class=
"s1">'greet
'</span><span class=
"p">];
</span>
2081 <span class=
"p">}
</span>
2083 <span class=
"sd">/**
</span>
2084 <span class=
"sd"> * @inheritDoc
</span>
2085 <span class=
"sd"> */
</span>
2086 <span class=
"k">public
</span> <span class=
"k">function
</span> <span class=
"nf">readData
</span><span class=
"p">()
</span> <span class=
"p">{
</span>
2087 <span class=
"k">parent
</span><span class=
"o">::
</span><span class=
"na">readData
</span><span class=
"p">();
</span>
2089 <span class=
"k">if
</span> <span class=
"p">(
</span><span class=
"k">empty
</span><span class=
"p">(
</span><span class=
"nv">$this
</span><span class=
"o">-
></span><span class=
"na">greet
</span><span class=
"p">))
</span> <span class=
"p">{
</span>
2090 <span class=
"nv">$this
</span><span class=
"o">-
></span><span class=
"na">greet
</span> <span class=
"o">=
</span> <span class=
"s1">'World
'</span><span class=
"p">;
</span>
2091 <span class=
"p">}
</span>
2092 <span class=
"p">}
</span>
2094 <span class=
"sd">/**
</span>
2095 <span class=
"sd"> * @inheritDoc
</span>
2096 <span class=
"sd"> */
</span>
2097 <span class=
"k">public
</span> <span class=
"k">function
</span> <span class=
"nf">assignVariables
</span><span class=
"p">()
</span> <span class=
"p">{
</span>
2098 <span class=
"k">parent
</span><span class=
"o">::
</span><span class=
"na">assignVariables
</span><span class=
"p">();
</span>
2100 <span class=
"nx">WCF
</span><span class=
"o">::
</span><span class=
"na">getTPL
</span><span class=
"p">()
</span><span class=
"o">-
></span><span class=
"na">assign
</span><span class=
"p">([
</span>
2101 <span class=
"s1">'greet
'</span> <span class=
"o">=
></span> <span class=
"nv">$this
</span><span class=
"o">-
></span><span class=
"na">greet
</span>
2102 <span class=
"p">]);
</span>
2103 <span class=
"p">}
</span>
2104 <span class=
"p">}
</span>
2106 <p>The class inherits from
<a href=
"https://github.com/WoltLab/WCF/blob/master/wcfsetup/install/files/lib/page/AbstractPage.class.php">wcf\page\AbstractPage
</a>, the default implementation of pages without form controls. It
2107 defines quite a few methods that will be automatically invoked in a specific order, for example
<code>readParameters()
</code> before
<code>readData()
</code> and finally
<code>assignVariables()
</code> to pass arbitrary values to the template.
</p>
2108 <p>The property
<code>$greet
</code> is defined as
<code>World
</code>, but can optionally be populated through a GET variable (
<code>index.php?test/
&greet=You
</code> would output
<code>Hello You!
</code>). This extra code illustrates the separation of data
2109 processing that takes place within all sort of pages, where all user-supplied data is read from within a single method. It helps organizing the code, but most of all it enforces a clean class logic that does not
2110 start reading user input at random places, including the risk to only escape the input of variable
<code>$_GET['foo']
</code> 4 out of
5 times.
</p>
2111 <p>Reading and processing the data is only half the story, now we need a template to display the actual content for our page. You don't need to specify it yourself, it will be automatically guessed based on your
2112 namespace and class name, you can
<a href=
"#template-guessing">read more about it later
</a>.
</p>
2113 <p>Last but not least, you must not include the closing PHP tag
<code>?
></code> at the end, it can cause PHP to break on whitespaces and is not required at all.
</p>
2114 <h2 id=
"the-template">The Template
<a class=
"headerlink" href=
"#the-template" title=
"Permanent link">#
</a></h2>
2115 <p>Navigate back to the root directory of your package until you see both the
<code>files
</code> directory and the
<code>package.xml
</code>. Now create a directory called
<code>templates
</code>, open it and create the file
<code>test.tpl
</code>.
</p>
2116 <div class=
"highlight"><pre><span></span><code><span class=
"cp">{
</span><span class=
"nf">include
</span> <span class=
"na">file
</span><span class=
"o">=
</span><span class=
"s1">'header
'</span><span class=
"cp">}
</span><span class=
"x"></span>
2118 <span class=
"x"><div class=
"section
"></span>
2119 <span class=
"x"> Hello
</span><span class=
"cp">{
</span><span class=
"nv">$greet
</span><span class=
"cp">}
</span><span class=
"x">!
</span>
2120 <span class=
"x"></div
></span>
2122 <span class=
"cp">{
</span><span class=
"nf">include
</span> <span class=
"na">file
</span><span class=
"o">=
</span><span class=
"s1">'footer
'</span><span class=
"cp">}
</span><span class=
"x"></span>
2124 <p>Templates are a mixture of HTML and Smarty-like template scripting to overcome the static nature of raw HTML. The above code will display the phrase
<code>Hello World!
</code> in the application frame, just as any other
2125 page would render. The included templates
<code>header
</code> and
<code>footer
</code> are responsible for the majority of the overall page functionality, but offer a whole lot of customization abilities to influence their behavior and appearance.
</p>
2126 <h2 id=
"the-page-definition">The Page Definition
<a class=
"headerlink" href=
"#the-page-definition" title=
"Permanent link">#
</a></h2>
2127 <p>The package now contains the PHP class and the matching template, but it is still missing the page definition. Please create the file
<code>page.xml
</code> in your project's root directory, thus on the same level as the
<code>package.xml
</code>.
</p>
2128 <div class=
"highlight"><pre><span></span><code><span class=
"cp"><?xml version=
"1.0" encoding=
"UTF-
8"?
></span>
2129 <span class=
"nt"><data
</span> <span class=
"na">xmlns=
</span><span class=
"s">"http://www.woltlab.com
"</span> <span class=
"na">xmlns:xsi=
</span><span class=
"s">"http://www.w3.org/
2001/XMLSchema-instance
"</span> <span class=
"na">xsi:schemaLocation=
</span><span class=
"s">"http://www.woltlab.com http://www.woltlab.com/XSD/
2019/page.xsd
"</span><span class=
"nt">></span>
2130 <span class=
"nt"><import
></span>
2131 <span class=
"nt"><page
</span> <span class=
"na">identifier=
</span><span class=
"s">"com.example.test.Test
"</span><span class=
"nt">></span>
2132 <span class=
"nt"><controller
></span>wcf\page\TestPage
<span class=
"nt"></controller
></span>
2133 <span class=
"nt"><name
</span> <span class=
"na">language=
</span><span class=
"s">"en
"</span><span class=
"nt">></span>Test Page
<span class=
"nt"></name
></span>
2134 <span class=
"nt"><pageType
></span>system
<span class=
"nt"></pageType
></span>
2135 <span class=
"nt"></page
></span>
2136 <span class=
"nt"></import
></span>
2137 <span class=
"nt"></data
></span>
2139 <p>You can provide a lot more data for a page, including logical nesting and dedicated handler classes for display in menus.
</p>
2140 <h2 id=
"building-the-package">Building the Package
<a class=
"headerlink" href=
"#building-the-package" title=
"Permanent link">#
</a></h2>
2141 <p>If you have followed the above guidelines carefully, your package directory should now look like this:
</p>
2142 <div class=
"highlight"><pre><span></span><code>├── files
2145 │ │ ├── TestPage.class.php
2151 <p>Both files and templates are archive-based package components, that deploy their payload using tar archives rather than adding the raw files to the package file. Please create the archive
<code>files.tar
</code> and add the contents of the
<code>files/*
</code> directory, but not the directory
<code>files/
</code> itself. Repeat the same process for the
<code>templates
</code> directory, but this time with the file name
<code>templates.tar
</code>. Place both files in the root of your project.
</p>
2152 <p>Last but not least, create the package archive
<code>com.example.test.tar
</code> and add all the files listed below.
</p>
2154 <li><code>files.tar
</code></li>
2155 <li><code>package.xml
</code></li>
2156 <li><code>page.xml
</code></li>
2157 <li><code>templates.tar
</code></li>
2159 <p>The archive's filename can be anything you want, all though it is the general convention to use the package name itself for easier recognition.
</p>
2160 <h2 id=
"installation">Installation
<a class=
"headerlink" href=
"#installation" title=
"Permanent link">#
</a></h2>
2161 <p>Open the Administration Control Panel and navigate to
<code>Configuration
> Packages
> Install Package
</code>, click on
<code>Upload Package
</code> and select the file
<code>com.example.test.tar
</code> from your disk. Follow the on-screen instructions until it has been successfully installed.
</p>
2162 <p>Open a new browser tab and navigate to your newly created page. If WoltLab Suite is installed at
<code>https://example.com/wsc/
</code>, then the URL should read
<code>https://example.com/wsc/index.php?test/
</code>.
</p>
2163 <p>Congratulations, you have just created your first package!
</p>
2164 <h2 id=
"developer-tools">Developer Tools
<a class=
"headerlink" href=
"#developer-tools" title=
"Permanent link">#
</a></h2>
2165 <div class=
"admonition warning">
2166 <p class=
"admonition-title">This feature is available with WoltLab Suite
3.1 or newer only.
</p>
2168 <p>The developer tools provide an interface to synchronize the data of an installed package with a bare repository on the local disk. You can re-import most PIPs at any time and have the changes applied without crafting a manual update. This process simulates a regular package update with a single PIP only, and resets the cache after the import has been completed.
</p>
2169 <h3 id=
"registering-a-project">Registering a Project
<a class=
"headerlink" href=
"#registering-a-project" title=
"Permanent link">#
</a></h3>
2170 <p>Projects require the absolute path to the package directory, that is, the directory where it can find the
<code>package.xml
</code>. It is not required to install an package to register it as a project, but you have to install it in order to work with it. It does not install the package by itself!
</p>
2171 <p>There is a special button on the project list that allows for a mass-import of projects based on a search path. Each direct child directory of the provided path will be tested and projects created this way will use the identifier extracted from the
<code>package.xml
</code>.
</p>
2172 <h3 id=
"synchronizing">Synchronizing
<a class=
"headerlink" href=
"#synchronizing" title=
"Permanent link">#
</a></h3>
2173 <p>The install instructions in the
<code>package.xml
</code> are ignored when offering the PIP imports, the detection works entirely based on the default filename for each PIP. On top of that, only PIPs that implement the interface
<code>wcf\system\devtools\pip\IIdempotentPackageInstallationPlugin
</code> are valid for import, as it indicates that importing the PIP multiple times will have no side-effects and that the result is deterministic regardless of the number of times it has been imported.
</p>
2174 <p>Some built-in PIPs, such as
<code>sql
</code> or
<code>script
</code>, do not qualify for this step and remain unavailable at all times. However, you can still craft and perform an actual package update to have these PIPs executed.
</p>
2175 <h2 id=
"appendix">Appendix
<a class=
"headerlink" href=
"#appendix" title=
"Permanent link">#
</a></h2>
2176 <h3 id=
"template-guessing">Template Guessing
<a class=
"headerlink" href=
"#template-guessing" title=
"Permanent link">#
</a></h3>
2177 <p>The class name including the namespace is used to automatically determine the path to the template and its name. The example above used the page class name
<code>wcf\page\TestPage
</code> that is then split into four distinct parts:
</p>
2179 <li><code>wcf
</code>, the internal abbreviation of WoltLab Suite Core (previously known as WoltLab Community Framework)
</li>
2180 <li><code>\page\
</code> (ignored)
</li>
2181 <li><code>Test
</code>, the actual name that is used for both the template and the URL
</li>
2182 <li><code>Page
</code> (page type, ignored)
</li>
2184 <p>The fragments
<code>1.
</code> and
<code>3.
</code> from above are used to construct the path to the template:
<code><installDirOfWSC
>/templates/test.tpl
</code> (the first letter of
<code>Test
</code> is being converted to lower-case).
</p>
2198 <footer class=
"md-footer">
2200 <nav class=
"md-footer__inner md-grid" aria-label=
"Footer">
2203 <a href=
"../php/pages/" class=
"md-footer__link md-footer__link--next" rel=
"next">
2204 <div class=
"md-footer__title">
2205 <div class=
"md-ellipsis">
2206 <span class=
"md-footer__direction">
2212 <div class=
"md-footer__button md-icon">
2213 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
2219 <div class=
"md-footer-meta md-typeset">
2220 <div class=
"md-footer-meta__inner md-grid">
2221 <div class=
"md-footer-copyright">
2223 <div class=
"md-footer-copyright__highlight">
2224 Copyright ©
2020 WoltLab GmbH
2228 <a href=
"https://squidfunk.github.io/mkdocs-material/" target=
"_blank" rel=
"noopener">
2233 <div class=
"md-footer-copyright">
2234 <a href=
"https://www.woltlab.com/legal-notice/">Legal Notice
</a>
2235 <a href=
"https://www.woltlab.com/privacy-policy/">Privacy Policy
</a>
2242 <div class=
"md-dialog" data-md-component=
"dialog">
2243 <div class=
"md-dialog__inner md-typeset"></div>
2245 <script id=
"__config" type=
"application/json">{
"base":
"..",
"features": [],
"translations": {
"clipboard.copy":
"Copy to clipboard",
"clipboard.copied":
"Copied to clipboard",
"search.config.lang":
"en",
"search.config.pipeline":
"trimmer, stopWordFilter",
"search.config.separator":
"[\\s\\-]+",
"search.placeholder":
"Search",
"search.result.placeholder":
"Type to start searching",
"search.result.none":
"No matching documents",
"search.result.one":
"1 matching document",
"search.result.other":
"# matching documents",
"search.result.more.one":
"1 more on this page",
"search.result.more.other":
"# more on this page",
"search.result.term.missing":
"Missing"},
"search":
"../assets/javascripts/workers/search.fb4a9340.min.js",
"version": {
"provider":
"mike"}}
</script>
2248 <script src=
"../assets/javascripts/bundle.5cf3e710.min.js"></script>