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>Migrating from WSC
3.1 - Like System - 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">
37 <link rel=
"stylesheet" href=
"../../../stylesheets/extra.css">
51 <body dir=
"ltr" data-md-color-scheme=
"" data-md-color-primary=
"teal" data-md-color-accent=
"">
55 <input class=
"md-toggle" data-md-toggle=
"drawer" type=
"checkbox" id=
"__drawer" autocomplete=
"off">
56 <input class=
"md-toggle" data-md-toggle=
"search" type=
"checkbox" id=
"__search" autocomplete=
"off">
57 <label class=
"md-overlay" for=
"__drawer"></label>
58 <div data-md-component=
"skip">
61 <a href=
"#migrating-from-wsc-31-like-system" class=
"md-skip">
66 <div data-md-component=
"announce">
68 <aside class=
"md-announce">
69 <div class=
"md-announce__inner md-grid md-typeset">
71 <a href=
"https://www.woltlab.com">Back to
<strong>woltlab.com
</strong></a>
80 <header class=
"md-header" data-md-component=
"header">
81 <nav class=
"md-header__inner md-grid" aria-label=
"Header">
82 <a href=
"../../.." title=
"WoltLab Suite Documentation" class=
"md-header__button md-logo" aria-label=
"WoltLab Suite Documentation">
84 <img src=
"../../../assets/logo.png" alt=
"logo">
87 <label class=
"md-header__button md-icon" for=
"__drawer">
88 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
90 <div class=
"md-header__title" data-md-component=
"header-title">
91 <div class=
"md-header__ellipsis">
92 <div class=
"md-header__topic">
93 <span class=
"md-ellipsis">
94 WoltLab Suite Documentation
97 <div class=
"md-header__topic" data-md-component=
"header-topic">
98 <span class=
"md-ellipsis">
100 Migrating from WSC
3.1 - Like System
106 <div class=
"md-header__options">
110 <label class=
"md-header__button md-icon" for=
"__search">
111 <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>
114 <div class=
"md-search" data-md-component=
"search" role=
"dialog">
115 <label class=
"md-search__overlay" for=
"__search"></label>
116 <div class=
"md-search__inner" role=
"search">
117 <form class=
"md-search__form" name=
"search">
118 <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
>
119 <label class=
"md-search__icon md-icon" for=
"__search">
120 <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>
121 <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>
123 <button type=
"reset" class=
"md-search__icon md-icon" aria-label=
"Clear" tabindex=
"-1">
124 <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>
127 <div class=
"md-search__output">
128 <div class=
"md-search__scrollwrap" data-md-scrollfix
>
129 <div class=
"md-search-result" data-md-component=
"search-result">
130 <div class=
"md-search-result__meta">
133 <ol class=
"md-search-result__list"></ol>
144 <div class=
"md-container" data-md-component=
"container">
149 <main class=
"md-main" data-md-component=
"main">
150 <div class=
"md-main__inner md-grid">
154 <div class=
"md-sidebar md-sidebar--primary" data-md-component=
"sidebar" data-md-type=
"navigation" >
155 <div class=
"md-sidebar__scrollwrap">
156 <div class=
"md-sidebar__inner">
162 <nav class=
"md-nav md-nav--primary" aria-label=
"Navigation" data-md-level=
"0">
163 <label class=
"md-nav__title" for=
"__drawer">
164 <a href=
"../../.." title=
"WoltLab Suite Documentation" class=
"md-nav__button md-logo" aria-label=
"WoltLab Suite Documentation">
166 <img src=
"../../../assets/logo.png" alt=
"logo">
169 WoltLab Suite Documentation
172 <ul class=
"md-nav__list" data-md-scrollfix
>
181 <li class=
"md-nav__item">
182 <a href=
"../../../getting-started/" class=
"md-nav__link">
197 <li class=
"md-nav__item md-nav__item--nested">
200 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2" type=
"checkbox" id=
"__nav_2" >
202 <label class=
"md-nav__link" for=
"__nav_2">
204 <span class=
"md-nav__icon md-icon"></span>
206 <nav class=
"md-nav" aria-label=
"PHP API" data-md-level=
"1">
207 <label class=
"md-nav__title" for=
"__nav_2">
208 <span class=
"md-nav__icon md-icon"></span>
211 <ul class=
"md-nav__list" data-md-scrollfix
>
217 <li class=
"md-nav__item">
218 <a href=
"../../../php/pages/" class=
"md-nav__link">
229 <li class=
"md-nav__item">
230 <a href=
"../../../php/database-objects/" class=
"md-nav__link">
241 <li class=
"md-nav__item">
242 <a href=
"../../../php/database-access/" class=
"md-nav__link">
253 <li class=
"md-nav__item">
254 <a href=
"../../../php/exceptions/" class=
"md-nav__link">
266 <li class=
"md-nav__item md-nav__item--nested">
269 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5" type=
"checkbox" id=
"__nav_2_5" >
271 <label class=
"md-nav__link" for=
"__nav_2_5">
273 <span class=
"md-nav__icon md-icon"></span>
275 <nav class=
"md-nav" aria-label=
"API" data-md-level=
"2">
276 <label class=
"md-nav__title" for=
"__nav_2_5">
277 <span class=
"md-nav__icon md-icon"></span>
280 <ul class=
"md-nav__list" data-md-scrollfix
>
286 <li class=
"md-nav__item">
287 <a href=
"../../../php/api/caches/" class=
"md-nav__link">
298 <li class=
"md-nav__item">
299 <a href=
"../../../php/api/comments/" class=
"md-nav__link">
310 <li class=
"md-nav__item">
311 <a href=
"../../../php/api/cronjobs/" class=
"md-nav__link">
322 <li class=
"md-nav__item">
323 <a href=
"../../../php/api/events/" class=
"md-nav__link">
335 <li class=
"md-nav__item md-nav__item--nested">
338 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_5" type=
"checkbox" id=
"__nav_2_5_5" >
340 <label class=
"md-nav__link" for=
"__nav_2_5_5">
342 <span class=
"md-nav__icon md-icon"></span>
344 <nav class=
"md-nav" aria-label=
"Form Builder" data-md-level=
"3">
345 <label class=
"md-nav__title" for=
"__nav_2_5_5">
346 <span class=
"md-nav__icon md-icon"></span>
349 <ul class=
"md-nav__list" data-md-scrollfix
>
355 <li class=
"md-nav__item">
356 <a href=
"../../../php/api/form_builder/overview/" class=
"md-nav__link">
367 <li class=
"md-nav__item">
368 <a href=
"../../../php/api/form_builder/structure/" class=
"md-nav__link">
379 <li class=
"md-nav__item">
380 <a href=
"../../../php/api/form_builder/form_fields/" class=
"md-nav__link">
391 <li class=
"md-nav__item">
392 <a href=
"../../../php/api/form_builder/validation_data/" class=
"md-nav__link">
403 <li class=
"md-nav__item">
404 <a href=
"../../../php/api/form_builder/dependencies/" class=
"md-nav__link">
421 <li class=
"md-nav__item">
422 <a href=
"../../../php/api/package_installation_plugins/" class=
"md-nav__link">
423 Package Installation Plugins
433 <li class=
"md-nav__item">
434 <a href=
"../../../php/api/user_activity_points/" class=
"md-nav__link">
445 <li class=
"md-nav__item">
446 <a href=
"../../../php/api/user_notifications/" class=
"md-nav__link">
457 <li class=
"md-nav__item">
458 <a href=
"../../../php/api/sitemaps/" class=
"md-nav__link">
475 <li class=
"md-nav__item">
476 <a href=
"../../../php/code-style/" class=
"md-nav__link">
487 <li class=
"md-nav__item">
488 <a href=
"../../../php/apps/" class=
"md-nav__link">
499 <li class=
"md-nav__item">
500 <a href=
"../../../php/gdpr/" class=
"md-nav__link">
521 <li class=
"md-nav__item md-nav__item--nested">
524 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_3" type=
"checkbox" id=
"__nav_3" >
526 <label class=
"md-nav__link" for=
"__nav_3">
527 Languages, Templates & CSS
528 <span class=
"md-nav__icon md-icon"></span>
530 <nav class=
"md-nav" aria-label=
"Languages, Templates & CSS" data-md-level=
"1">
531 <label class=
"md-nav__title" for=
"__nav_3">
532 <span class=
"md-nav__icon md-icon"></span>
533 Languages, Templates & CSS
535 <ul class=
"md-nav__list" data-md-scrollfix
>
541 <li class=
"md-nav__item">
542 <a href=
"../../../view/languages/" class=
"md-nav__link">
553 <li class=
"md-nav__item">
554 <a href=
"../../../view/templates/" class=
"md-nav__link">
565 <li class=
"md-nav__item">
566 <a href=
"../../../view/css/" class=
"md-nav__link">
587 <li class=
"md-nav__item md-nav__item--nested">
590 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4" type=
"checkbox" id=
"__nav_4" >
592 <label class=
"md-nav__link" for=
"__nav_4">
594 <span class=
"md-nav__icon md-icon"></span>
596 <nav class=
"md-nav" aria-label=
"JavaScript API" data-md-level=
"1">
597 <label class=
"md-nav__title" for=
"__nav_4">
598 <span class=
"md-nav__icon md-icon"></span>
601 <ul class=
"md-nav__list" data-md-scrollfix
>
607 <li class=
"md-nav__item">
608 <a href=
"../../../javascript/general-usage/" class=
"md-nav__link">
620 <li class=
"md-nav__item md-nav__item--nested">
623 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4_2" type=
"checkbox" id=
"__nav_4_2" >
625 <label class=
"md-nav__link" for=
"__nav_4_2">
627 <span class=
"md-nav__icon md-icon"></span>
629 <nav class=
"md-nav" aria-label=
"New API" data-md-level=
"2">
630 <label class=
"md-nav__title" for=
"__nav_4_2">
631 <span class=
"md-nav__icon md-icon"></span>
634 <ul class=
"md-nav__list" data-md-scrollfix
>
640 <li class=
"md-nav__item">
641 <a href=
"../../../javascript/new-api_writing-a-module/" class=
"md-nav__link">
652 <li class=
"md-nav__item">
653 <a href=
"../../../javascript/new-api_data-structures/" class=
"md-nav__link">
664 <li class=
"md-nav__item">
665 <a href=
"../../../javascript/new-api_core/" class=
"md-nav__link">
676 <li class=
"md-nav__item">
677 <a href=
"../../../javascript/new-api_dom/" class=
"md-nav__link">
688 <li class=
"md-nav__item">
689 <a href=
"../../../javascript/new-api_events/" class=
"md-nav__link">
700 <li class=
"md-nav__item">
701 <a href=
"../../../javascript/new-api_ajax/" class=
"md-nav__link">
712 <li class=
"md-nav__item">
713 <a href=
"../../../javascript/new-api_dialogs/" class=
"md-nav__link">
724 <li class=
"md-nav__item">
725 <a href=
"../../../javascript/new-api_browser/" class=
"md-nav__link">
726 Browser and Screen Sizes
736 <li class=
"md-nav__item">
737 <a href=
"../../../javascript/new-api_ui/" class=
"md-nav__link">
754 <li class=
"md-nav__item">
755 <a href=
"../../../javascript/legacy-api/" class=
"md-nav__link">
766 <li class=
"md-nav__item">
767 <a href=
"../../../javascript/helper-functions/" class=
"md-nav__link">
778 <li class=
"md-nav__item">
779 <a href=
"../../../javascript/code-snippets/" class=
"md-nav__link">
800 <li class=
"md-nav__item md-nav__item--nested">
803 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5" type=
"checkbox" id=
"__nav_5" >
805 <label class=
"md-nav__link" for=
"__nav_5">
807 <span class=
"md-nav__icon md-icon"></span>
809 <nav class=
"md-nav" aria-label=
"Package Components" data-md-level=
"1">
810 <label class=
"md-nav__title" for=
"__nav_5">
811 <span class=
"md-nav__icon md-icon"></span>
814 <ul class=
"md-nav__list" data-md-scrollfix
>
820 <li class=
"md-nav__item">
821 <a href=
"../../../package/package-xml/" class=
"md-nav__link">
833 <li class=
"md-nav__item md-nav__item--nested">
836 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5_2" type=
"checkbox" id=
"__nav_5_2" >
838 <label class=
"md-nav__link" for=
"__nav_5_2">
840 <span class=
"md-nav__icon md-icon"></span>
842 <nav class=
"md-nav" aria-label=
"PIPs" data-md-level=
"2">
843 <label class=
"md-nav__title" for=
"__nav_5_2">
844 <span class=
"md-nav__icon md-icon"></span>
847 <ul class=
"md-nav__list" data-md-scrollfix
>
853 <li class=
"md-nav__item">
854 <a href=
"../../../package/pip/" class=
"md-nav__link">
865 <li class=
"md-nav__item">
866 <a href=
"../../../package/pip/acl-option/" class=
"md-nav__link">
877 <li class=
"md-nav__item">
878 <a href=
"../../../package/pip/acp-menu/" class=
"md-nav__link">
889 <li class=
"md-nav__item">
890 <a href=
"../../../package/pip/acp-search-provider/" class=
"md-nav__link">
901 <li class=
"md-nav__item">
902 <a href=
"../../../package/pip/acp-template/" class=
"md-nav__link">
913 <li class=
"md-nav__item">
914 <a href=
"../../../package/pip/bbcode/" class=
"md-nav__link">
925 <li class=
"md-nav__item">
926 <a href=
"../../../package/pip/box/" class=
"md-nav__link">
937 <li class=
"md-nav__item">
938 <a href=
"../../../package/pip/clipboard-action/" class=
"md-nav__link">
949 <li class=
"md-nav__item">
950 <a href=
"../../../package/pip/core-object/" class=
"md-nav__link">
961 <li class=
"md-nav__item">
962 <a href=
"../../../package/pip/cronjob/" class=
"md-nav__link">
973 <li class=
"md-nav__item">
974 <a href=
"../../../package/pip/event-listener/" class=
"md-nav__link">
985 <li class=
"md-nav__item">
986 <a href=
"../../../package/pip/file/" class=
"md-nav__link">
997 <li class=
"md-nav__item">
998 <a href=
"../../../package/pip/language/" class=
"md-nav__link">
1009 <li class=
"md-nav__item">
1010 <a href=
"../../../package/pip/media-provider/" class=
"md-nav__link">
1021 <li class=
"md-nav__item">
1022 <a href=
"../../../package/pip/menu/" class=
"md-nav__link">
1033 <li class=
"md-nav__item">
1034 <a href=
"../../../package/pip/menu-item/" class=
"md-nav__link">
1045 <li class=
"md-nav__item">
1046 <a href=
"../../../package/pip/object-type/" class=
"md-nav__link">
1057 <li class=
"md-nav__item">
1058 <a href=
"../../../package/pip/object-type-definition/" class=
"md-nav__link">
1059 objectTypeDefinition
1069 <li class=
"md-nav__item">
1070 <a href=
"../../../package/pip/option/" class=
"md-nav__link">
1081 <li class=
"md-nav__item">
1082 <a href=
"../../../package/pip/page/" class=
"md-nav__link">
1093 <li class=
"md-nav__item">
1094 <a href=
"../../../package/pip/pip/" class=
"md-nav__link">
1105 <li class=
"md-nav__item">
1106 <a href=
"../../../package/pip/script/" class=
"md-nav__link">
1117 <li class=
"md-nav__item">
1118 <a href=
"../../../package/pip/smiley/" class=
"md-nav__link">
1129 <li class=
"md-nav__item">
1130 <a href=
"../../../package/pip/sql/" class=
"md-nav__link">
1141 <li class=
"md-nav__item">
1142 <a href=
"../../../package/pip/style/" class=
"md-nav__link">
1153 <li class=
"md-nav__item">
1154 <a href=
"../../../package/pip/template/" class=
"md-nav__link">
1165 <li class=
"md-nav__item">
1166 <a href=
"../../../package/pip/template-listener/" class=
"md-nav__link">
1177 <li class=
"md-nav__item">
1178 <a href=
"../../../package/pip/user-group-option/" class=
"md-nav__link">
1189 <li class=
"md-nav__item">
1190 <a href=
"../../../package/pip/user-menu/" class=
"md-nav__link">
1201 <li class=
"md-nav__item">
1202 <a href=
"../../../package/pip/user-notification-event/" class=
"md-nav__link">
1203 userNotificationEvent
1213 <li class=
"md-nav__item">
1214 <a href=
"../../../package/pip/user-option/" class=
"md-nav__link">
1225 <li class=
"md-nav__item">
1226 <a href=
"../../../package/pip/user-profile-menu/" class=
"md-nav__link">
1243 <li class=
"md-nav__item">
1244 <a href=
"../../../package/database-php-api/" class=
"md-nav__link">
1265 <li class=
"md-nav__item md-nav__item--nested">
1268 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6" type=
"checkbox" id=
"__nav_6" >
1270 <label class=
"md-nav__link" for=
"__nav_6">
1272 <span class=
"md-nav__icon md-icon"></span>
1274 <nav class=
"md-nav" aria-label=
"Migration" data-md-level=
"1">
1275 <label class=
"md-nav__title" for=
"__nav_6">
1276 <span class=
"md-nav__icon md-icon"></span>
1279 <ul class=
"md-nav__list" data-md-scrollfix
>
1286 <li class=
"md-nav__item md-nav__item--nested">
1289 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_1" type=
"checkbox" id=
"__nav_6_1" >
1291 <label class=
"md-nav__link" for=
"__nav_6_1">
1292 Migrating from WSC
5.3
1293 <span class=
"md-nav__icon md-icon"></span>
1295 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.3" data-md-level=
"2">
1296 <label class=
"md-nav__title" for=
"__nav_6_1">
1297 <span class=
"md-nav__icon md-icon"></span>
1298 Migrating from WSC
5.3
1300 <ul class=
"md-nav__list" data-md-scrollfix
>
1306 <li class=
"md-nav__item">
1307 <a href=
"../../wsc53/php/" class=
"md-nav__link">
1318 <li class=
"md-nav__item">
1319 <a href=
"../../wsc53/session/" class=
"md-nav__link">
1320 Session Handling and Authentication
1330 <li class=
"md-nav__item">
1331 <a href=
"../../wsc53/javascript/" class=
"md-nav__link">
1342 <li class=
"md-nav__item">
1343 <a href=
"../../wsc53/templates/" class=
"md-nav__link">
1354 <li class=
"md-nav__item">
1355 <a href=
"../../wsc53/libraries/" class=
"md-nav__link">
1356 Third Party Libraries
1373 <li class=
"md-nav__item md-nav__item--nested">
1376 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_2" type=
"checkbox" id=
"__nav_6_2" >
1378 <label class=
"md-nav__link" for=
"__nav_6_2">
1379 Migrating from WSC
5.2
1380 <span class=
"md-nav__icon md-icon"></span>
1382 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.2" data-md-level=
"2">
1383 <label class=
"md-nav__title" for=
"__nav_6_2">
1384 <span class=
"md-nav__icon md-icon"></span>
1385 Migrating from WSC
5.2
1387 <ul class=
"md-nav__list" data-md-scrollfix
>
1393 <li class=
"md-nav__item">
1394 <a href=
"../../wsc52/php/" class=
"md-nav__link">
1405 <li class=
"md-nav__item">
1406 <a href=
"../../wsc52/templates/" class=
"md-nav__link">
1407 Templates and Languages
1417 <li class=
"md-nav__item">
1418 <a href=
"../../wsc52/libraries/" class=
"md-nav__link">
1419 Third Party Libraries
1436 <li class=
"md-nav__item md-nav__item--nested">
1439 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_3" type=
"checkbox" id=
"__nav_6_3" >
1441 <label class=
"md-nav__link" for=
"__nav_6_3">
1442 Migrating from WSC
3.1
1443 <span class=
"md-nav__icon md-icon"></span>
1445 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.1" data-md-level=
"2">
1446 <label class=
"md-nav__title" for=
"__nav_6_3">
1447 <span class=
"md-nav__icon md-icon"></span>
1448 Migrating from WSC
3.1
1450 <ul class=
"md-nav__list" data-md-scrollfix
>
1456 <li class=
"md-nav__item">
1457 <a href=
"../php/" class=
"md-nav__link">
1475 <li class=
"md-nav__item md-nav__item--nested">
1478 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_4" type=
"checkbox" id=
"__nav_6_4" >
1480 <label class=
"md-nav__link" for=
"__nav_6_4">
1481 Migrating from WSC
3.0
1482 <span class=
"md-nav__icon md-icon"></span>
1484 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.0" data-md-level=
"2">
1485 <label class=
"md-nav__title" for=
"__nav_6_4">
1486 <span class=
"md-nav__icon md-icon"></span>
1487 Migrating from WSC
3.0
1489 <ul class=
"md-nav__list" data-md-scrollfix
>
1495 <li class=
"md-nav__item">
1496 <a href=
"../../wsc30/php/" class=
"md-nav__link">
1507 <li class=
"md-nav__item">
1508 <a href=
"../../wsc30/javascript/" class=
"md-nav__link">
1519 <li class=
"md-nav__item">
1520 <a href=
"../../wsc30/templates/" class=
"md-nav__link">
1531 <li class=
"md-nav__item">
1532 <a href=
"../../wsc30/css/" class=
"md-nav__link">
1543 <li class=
"md-nav__item">
1544 <a href=
"../../wsc30/package/" class=
"md-nav__link">
1562 <li class=
"md-nav__item md-nav__item--nested">
1565 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_5" type=
"checkbox" id=
"__nav_6_5" >
1567 <label class=
"md-nav__link" for=
"__nav_6_5">
1568 Migrating from WCF
2.1
1569 <span class=
"md-nav__icon md-icon"></span>
1571 <nav class=
"md-nav" aria-label=
"Migrating from WCF 2.1" data-md-level=
"2">
1572 <label class=
"md-nav__title" for=
"__nav_6_5">
1573 <span class=
"md-nav__icon md-icon"></span>
1574 Migrating from WCF
2.1
1576 <ul class=
"md-nav__list" data-md-scrollfix
>
1582 <li class=
"md-nav__item">
1583 <a href=
"../../wcf21/php/" class=
"md-nav__link">
1594 <li class=
"md-nav__item">
1595 <a href=
"../../wcf21/templates/" class=
"md-nav__link">
1606 <li class=
"md-nav__item">
1607 <a href=
"../../wcf21/css/" class=
"md-nav__link">
1618 <li class=
"md-nav__item">
1619 <a href=
"../../wcf21/package/" class=
"md-nav__link">
1646 <li class=
"md-nav__item md-nav__item--nested">
1649 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7" type=
"checkbox" id=
"__nav_7" >
1651 <label class=
"md-nav__link" for=
"__nav_7">
1653 <span class=
"md-nav__icon md-icon"></span>
1655 <nav class=
"md-nav" aria-label=
"Tutorials" data-md-level=
"1">
1656 <label class=
"md-nav__title" for=
"__nav_7">
1657 <span class=
"md-nav__icon md-icon"></span>
1660 <ul class=
"md-nav__list" data-md-scrollfix
>
1667 <li class=
"md-nav__item md-nav__item--nested">
1670 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7_1" type=
"checkbox" id=
"__nav_7_1" >
1672 <label class=
"md-nav__link" for=
"__nav_7_1">
1674 <span class=
"md-nav__icon md-icon"></span>
1676 <nav class=
"md-nav" aria-label=
"Tutorial Series" data-md-level=
"2">
1677 <label class=
"md-nav__title" for=
"__nav_7_1">
1678 <span class=
"md-nav__icon md-icon"></span>
1681 <ul class=
"md-nav__list" data-md-scrollfix
>
1687 <li class=
"md-nav__item">
1688 <a href=
"../../../tutorial/series/overview/" class=
"md-nav__link">
1699 <li class=
"md-nav__item">
1700 <a href=
"../../../tutorial/series/part_1/" class=
"md-nav__link">
1711 <li class=
"md-nav__item">
1712 <a href=
"../../../tutorial/series/part_2/" class=
"md-nav__link">
1723 <li class=
"md-nav__item">
1724 <a href=
"../../../tutorial/series/part_3/" class=
"md-nav__link">
1751 <div class=
"md-sidebar md-sidebar--secondary" data-md-component=
"sidebar" data-md-type=
"toc" >
1752 <div class=
"md-sidebar__scrollwrap">
1753 <div class=
"md-sidebar__inner">
1755 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
1761 <label class=
"md-nav__title" for=
"__toc">
1762 <span class=
"md-nav__icon md-icon"></span>
1765 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
1767 <li class=
"md-nav__item">
1768 <a href=
"#introduction" class=
"md-nav__link">
1774 <li class=
"md-nav__item">
1775 <a href=
"#limitations-if-no-adjustments-are-made-to-the-existing-code" class=
"md-nav__link">
1776 Limitations if no adjustments are made to the existing code
1781 <li class=
"md-nav__item">
1782 <a href=
"#migration" class=
"md-nav__link">
1786 <nav class=
"md-nav" aria-label=
"Migration">
1787 <ul class=
"md-nav__list">
1789 <li class=
"md-nav__item">
1790 <a href=
"#notifications" class=
"md-nav__link">
1794 <nav class=
"md-nav" aria-label=
"Notifications">
1795 <ul class=
"md-nav__list">
1797 <li class=
"md-nav__item">
1798 <a href=
"#mark-notification-as-compatible" class=
"md-nav__link">
1799 Mark notification as compatible
1804 <li class=
"md-nav__item">
1805 <a href=
"#language-variables" class=
"md-nav__link">
1816 <li class=
"md-nav__item">
1817 <a href=
"#recent-activity" class=
"md-nav__link">
1821 <nav class=
"md-nav" aria-label=
"Recent Activity">
1822 <ul class=
"md-nav__list">
1824 <li class=
"md-nav__item">
1825 <a href=
"#english_1" class=
"md-nav__link">
1831 <li class=
"md-nav__item">
1832 <a href=
"#german_1" class=
"md-nav__link">
1843 <li class=
"md-nav__item">
1844 <a href=
"#comments" class=
"md-nav__link">
1855 <li class=
"md-nav__item">
1856 <a href=
"#forward-compatibility" class=
"md-nav__link">
1857 Forward Compatibility
1870 <div class=
"md-content" data-md-component=
"content">
1871 <article class=
"md-content__inner md-typeset">
1875 <h1 id=
"migrating-from-wsc-31-like-system">Migrating from WSC
3.1 - Like System
<a class=
"headerlink" href=
"#migrating-from-wsc-31-like-system" title=
"Permanent link">#
</a></h1>
1876 <h2 id=
"introduction">Introduction
<a class=
"headerlink" href=
"#introduction" title=
"Permanent link">#
</a></h2>
1877 <p>With version
5.2 of WoltLab Suite Core the like system was completely replaced by the new reactions system. This makes it necessary to make some adjustments to existing code so that your plugin integrates completely into the new system. However, we have kept these adjustments as small as possible so that it is possible to use the reaction system with slight restrictions even without adjustments.
</p>
1878 <h2 id=
"limitations-if-no-adjustments-are-made-to-the-existing-code">Limitations if no adjustments are made to the existing code
<a class=
"headerlink" href=
"#limitations-if-no-adjustments-are-made-to-the-existing-code" title=
"Permanent link">#
</a></h2>
1879 <p>If no adjustments are made to the existing code, the following functions are not available:
1880 * Notifications about reactions/likes
1881 * Recent Activity Events for reactions/likes
</p>
1882 <h2 id=
"migration">Migration
<a class=
"headerlink" href=
"#migration" title=
"Permanent link">#
</a></h2>
1883 <h3 id=
"notifications">Notifications
<a class=
"headerlink" href=
"#notifications" title=
"Permanent link">#
</a></h3>
1884 <h4 id=
"mark-notification-as-compatible">Mark notification as compatible
<a class=
"headerlink" href=
"#mark-notification-as-compatible" title=
"Permanent link">#
</a></h4>
1885 <p>Since there are no more likes with the new version, it makes no sense to send notifications about it. Instead of notifications about likes, notifications about reactions are now sent. However, this only changes the notification text and not the notification itself. To update the notification, we first add the interface
<code>\wcf\data\reaction\object\IReactionObject
</code> to the
<code>\wcf\data\like\object\ILikeObject
</code> object (e.g. in WoltLab Suite Forum we added the interface to the class
<code>\wbb\data\post\LikeablePost
</code>). After that the object is marked as
"compatible with WoltLab Suite Core 5.2" and notifications about reactions are sent again.
</p>
1886 <h4 id=
"language-variables">Language Variables
<a class=
"headerlink" href=
"#language-variables" title=
"Permanent link">#
</a></h4>
1887 <p>Next, to display all reactions for the current notification in the notification text, we include the trait
<code>\wcf\system\user\notification\event\TReactionUserNotificationEvent
</code> in the user notification event class (typically named like
<code>*LikeUserNotificationEvent
</code>). These trait provides a new function that reads out and groups the reactions. The result of this function must now only be passed to the language variable. The name
"reactions" is typically used as the variable name for the language variable.
</p>
1888 <p>As a final step, we only need to change the language variables themselves. To ensure a consistent usability, the same formulations should be used as in the WoltLab Suite Core.
</p>
1889 <h5 id=
"english">English
<a class=
"headerlink" href=
"#english" title=
"Permanent link">#
</a></h5>
1890 <p><code>{prefix}.like.title
</code>
1891 <div class=
"highlight"><pre><span></span><code>Reaction to a {objectName}
1892 </code></pre></div></p>
1893 <p><code>{prefix}.like.title.stacked
</code></p>
1894 <div class=
"highlight"><pre><span></span><code>{#$count} users reacted to your {objectName}
1896 <p><code>{prefix}.like.message
</code>
1897 <div class=
"highlight"><pre><span></span><code>{@$author-
>getAnchorTag()} reacted to your {objectName} ({implode from=$reactions key=reactionID item=count}{@$__wcf-
>getReactionHandler()-
>getReactionTypeByID($reactionID)-
>renderIcon()}×{#$count}{/implode}).
1898 </code></pre></div></p>
1899 <p><code>{prefix}.like.message.stacked
</code></p>
1900 <div class=
"highlight"><pre><span></span><code>{if $count
< 4}{@$authors[
0]-
>getAnchorTag()}{if $count ==
2} and {else}, {/if}{@$authors[
1]-
>getAnchorTag()}{if $count ==
3} and {@$authors[
2]-
>getAnchorTag()}{/if}{else}{@$authors[
0]-
>getAnchorTag()} and {#$others} others{/if} reacted to your {objectName} ({implode from=$reactions key=reactionID item=count}{@$__wcf-
>getReactionHandler()-
>getReactionTypeByID($reactionID)-
>renderIcon()}×{#$count}{/implode}).
1902 <p><code>wcf.user.notification.{objectTypeName}.like.notification.like
</code>
1903 <div class=
"highlight"><pre><span></span><code>Notify me when someone reacted to my {objectName}
1904 </code></pre></div></p>
1905 <h5 id=
"german">German
<a class=
"headerlink" href=
"#german" title=
"Permanent link">#
</a></h5>
1906 <p><code>{prefix}.like.title
</code>
1907 <div class=
"highlight"><pre><span></span><code>Reaktion auf einen {objectName}
1908 </code></pre></div></p>
1909 <p><code>{prefix}.like.title.stacked
</code></p>
1910 <div class=
"highlight"><pre><span></span><code>{#$count} Benutzern haben auf {if LANGUAGE_USE_INFORMAL_VARIANT}dein(en){else}Ihr(en){/if} {objectName} reagiert
1912 <p><code>{prefix}.like.message
</code>
1913 <div class=
"highlight"><pre><span></span><code>{@$author-
>getAnchorTag()} hat auf {if LANGUAGE_USE_INFORMAL_VARIANT}dein(en){else}Ihr(en){/if} {objectName} reagiert ({implode from=$reactions key=reactionID item=count}{@$__wcf-
>getReactionHandler()-
>getReactionTypeByID($reactionID)-
>renderIcon()}×{#$count}{/implode}).
1914 </code></pre></div></p>
1915 <p><code>{prefix}.like.message.stacked
</code></p>
1916 <div class=
"highlight"><pre><span></span><code>{if $count
< 4}{@$authors[
0]-
>getAnchorTag()}{if $count ==
2} und {else}, {/if}{@$authors[
1]-
>getAnchorTag()}{if $count ==
3} und {@$authors[
2]-
>getAnchorTag()}{/if}{else}{@$authors[
0]-
>getAnchorTag()} und {#$others} weitere{/if} haben auf {if LANGUAGE_USE_INFORMAL_VARIANT}dein(en){else}Ihr(en){/if} {objectName} reagiert ({implode from=$reactions key=reactionID item=count}{@$__wcf-
>getReactionHandler()-
>getReactionTypeByID($reactionID)-
>renderIcon()}×{#$count}{/implode}).
1918 <p><code>wcf.user.notification.{object_type_name}.like.notification.like
</code>
1919 <div class=
"highlight"><pre><span></span><code>Jemandem hat auf {if LANGUAGE_USE_INFORMAL_VARIANT}dein(en){else}Ihr(en){/if} {objectName} reagiert
1920 </code></pre></div></p>
1921 <h3 id=
"recent-activity">Recent Activity
<a class=
"headerlink" href=
"#recent-activity" title=
"Permanent link">#
</a></h3>
1922 <p>To adjust entries in the Recent Activity, only three small steps are necessary. First we pass the concrete reaction to the language variable, so that we can use the reaction object there. To do this, we add the following variable to the text of the
<code>\wcf\system\user\activity\event\IUserActivityEvent
</code> object:
<code>$event-
>reactionType
</code>. Typically we name the variable
<code>reactionType
</code>. In the second step, we mark the event as compatible. Therefore we set the parameter
<code>supportsReactions
</code> in the
<a href=
"../../../package/pip/object-type/"><code>objectType.xml
</code></a> to
<code>1</code>. So for example the entry looks like this:
</p>
1923 <div class=
"highlight"><pre><span></span><code><span class=
"nt"><type
></span>
1924 <span class=
"nt"><name
></span>com.woltlab.example.likeableObject.recentActivityEvent
<span class=
"nt"></name
></span>
1925 <span class=
"nt"><definitionname
></span>com.woltlab.wcf.user.recentActivityEvent
<span class=
"nt"></definitionname
></span>
1926 <span class=
"nt"><classname
></span>wcf\system\user\activity\event\LikeableObjectUserActivityEvent
<span class=
"nt"></classname
></span>
1927 <span class=
"nt"><supportsReactions
></span>1<span class=
"nt"></supportsReactions
></span>
1928 <span class=
"nt"></type
></span>
1930 <p>Finally we modify our language variable. To ensure a consistent usability, the same formulations should be used as in the WoltLab Suite Core.
</p>
1931 <h4 id=
"english_1">English
<a class=
"headerlink" href=
"#english_1" title=
"Permanent link">#
</a></h4>
1932 <p><code>wcf.user.recentActivity.{object_type_name}.recentActivityEvent
</code>
1933 <div class=
"highlight"><pre><span></span><code>Reaction ({objectName})
1934 </code></pre></div></p>
1935 <p><em>Your language variable for the recent activity text
</em>
1936 <div class=
"highlight"><pre><span></span><code>Reacted with
<span title=
"{$reactionType-
>getTitle()}
" class=
"jsTooltip
">{@$reactionType-
>renderIcon()}
</span
> to the {objectName}.
1937 </code></pre></div></p>
1938 <h4 id=
"german_1">German
<a class=
"headerlink" href=
"#german_1" title=
"Permanent link">#
</a></h4>
1939 <p><code>wcf.user.recentActivity.{objectTypeName}.recentActivityEvent
</code>
1940 <div class=
"highlight"><pre><span></span><code>Reaktion ({objectName})
1941 </code></pre></div></p>
1942 <p><em>Your language variable for the recent activity text
</em>
1943 <div class=
"highlight"><pre><span></span><code>Hat mit
<span title=
"{$reactionType-
>getTitle()}
" class=
"jsTooltip
">{@$reactionType-
>renderIcon()}
</span
> auf {objectName} reagiert.
1944 </code></pre></div></p>
1945 <h3 id=
"comments">Comments
<a class=
"headerlink" href=
"#comments" title=
"Permanent link">#
</a></h3>
1946 <p>If comments send notifications, they must also be updated. The language variables are changed in the same way as described in the section
<a href=
"./#Language-Variables">Notifications / Language
</a>. After that comment must be marked as compatible. Therefore we set the parameter
<code>supportsReactions
</code> in the
<a href=
"../../../package/pip/object-type/"><code>objectType.xml
</code></a> to
<code>1</code>. So for example the entry looks like this:
</p>
1947 <div class=
"highlight"><pre><span></span><code><span class=
"nt"><type
></span>
1948 <span class=
"nt"><name
></span>com.woltlab.wcf.objectComment.response.like.notification
<span class=
"nt"></name
></span>
1949 <span class=
"nt"><definitionname
></span>com.woltlab.wcf.notification.objectType
<span class=
"nt"></definitionname
></span>
1950 <span class=
"nt"><classname
></span>wcf\system\user\notification\object\type\LikeUserNotificationObjectType
<span class=
"nt"></classname
></span>
1951 <span class=
"nt"><category
></span>com.woltlab.example
<span class=
"nt"></category
></span>
1952 <span class=
"nt"><supportsReactions
></span>1<span class=
"nt"></supportsReactions
></span>
1953 <span class=
"nt"></type
></span>
1955 <h2 id=
"forward-compatibility">Forward Compatibility
<a class=
"headerlink" href=
"#forward-compatibility" title=
"Permanent link">#
</a></h2>
1956 <p>So that these changes also work in older versions of WoltLab Suite Core, the used classes and traits were backported with WoltLab Suite Core
3.0.22 and WoltLab Suite Core
3.1.10.
</p>
1970 <footer class=
"md-footer">
1972 <div class=
"md-footer-meta md-typeset">
1973 <div class=
"md-footer-meta__inner md-grid">
1974 <div class=
"md-footer-copyright">
1976 <div class=
"md-footer-copyright__highlight">
1977 Copyright ©
2020 WoltLab GmbH
1981 <a href=
"https://squidfunk.github.io/mkdocs-material/" target=
"_blank" rel=
"noopener">
1986 <div class=
"md-footer-copyright">
1987 <a href=
"https://www.woltlab.com/legal-notice/">Legal Notice
</a>
1988 <a href=
"https://www.woltlab.com/privacy-policy/">Privacy Policy
</a>
1995 <div class=
"md-dialog" data-md-component=
"dialog">
1996 <div class=
"md-dialog__inner md-typeset"></div>
1998 <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>
2001 <script src=
"../../../assets/javascripts/bundle.5cf3e710.min.js"></script>