3 <html lang=
"en" class=
"no-js">
7 <meta name=
"viewport" content=
"width=device-width,initial-scale=1">
12 <link rel=
"icon" href=
"../../../assets/default.favicon.ico">
13 <meta name=
"generator" content=
"mkdocs-1.1.2, mkdocs-material-7.1.0">
17 <title>Migrating from WSC
3.1 - Like System - WoltLab Suite Documentation
</title>
21 <link rel=
"stylesheet" href=
"../../../assets/stylesheets/main.33e2939f.min.css">
24 <link rel=
"stylesheet" href=
"../../../assets/stylesheets/palette.ef6f36e2.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=
"">
55 <script>function __prefix(e){return new URL(
"../../..",location).pathname+
"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}
</script>
57 <input class=
"md-toggle" data-md-toggle=
"drawer" type=
"checkbox" id=
"__drawer" autocomplete=
"off">
58 <input class=
"md-toggle" data-md-toggle=
"search" type=
"checkbox" id=
"__search" autocomplete=
"off">
59 <label class=
"md-overlay" for=
"__drawer"></label>
60 <div data-md-component=
"skip">
63 <a href=
"#migrating-from-wsc-31-like-system" class=
"md-skip">
68 <div data-md-component=
"announce">
70 <aside class=
"md-announce">
71 <div class=
"md-announce__inner md-grid md-typeset">
73 <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" data-md-component=
"logo">
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
109 <label class=
"md-header__button md-icon" for=
"__search">
110 <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>
113 <div class=
"md-search" data-md-component=
"search" role=
"dialog">
114 <label class=
"md-search__overlay" for=
"__search"></label>
115 <div class=
"md-search__inner" role=
"search">
116 <form class=
"md-search__form" name=
"search">
117 <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
>
118 <label class=
"md-search__icon md-icon" for=
"__search">
119 <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>
120 <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>
122 <button type=
"reset" class=
"md-search__icon md-icon" aria-label=
"Clear" tabindex=
"-1">
123 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M19 6.41 17.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>
126 <div class=
"md-search__output">
127 <div class=
"md-search__scrollwrap" data-md-scrollfix
>
128 <div class=
"md-search-result" data-md-component=
"search-result">
129 <div class=
"md-search-result__meta">
132 <ol class=
"md-search-result__list"></ol>
140 <div class=
"md-header__source">
142 <a href=
"https://github.com/WoltLab/docs.woltlab.com/" title=
"Go to repository" class=
"md-source" data-md-component=
"source">
143 <div class=
"md-source__icon md-icon">
145 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 448 512"><path d=
"M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
147 <div class=
"md-source__repository">
156 <div class=
"md-container" data-md-component=
"container">
161 <main class=
"md-main" data-md-component=
"main">
162 <div class=
"md-main__inner md-grid">
166 <div class=
"md-sidebar md-sidebar--primary" data-md-component=
"sidebar" data-md-type=
"navigation" >
167 <div class=
"md-sidebar__scrollwrap">
168 <div class=
"md-sidebar__inner">
172 <nav class=
"md-nav md-nav--primary" aria-label=
"Navigation" data-md-level=
"0">
173 <label class=
"md-nav__title" for=
"__drawer">
174 <a href=
"../../.." title=
"WoltLab Suite Documentation" class=
"md-nav__button md-logo" aria-label=
"WoltLab Suite Documentation" data-md-component=
"logo">
176 <img src=
"../../../assets/logo.png" alt=
"logo">
179 WoltLab Suite Documentation
182 <div class=
"md-nav__source">
184 <a href=
"https://github.com/WoltLab/docs.woltlab.com/" title=
"Go to repository" class=
"md-source" data-md-component=
"source">
185 <div class=
"md-source__icon md-icon">
187 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 448 512"><path d=
"M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
189 <div class=
"md-source__repository">
195 <ul class=
"md-nav__list" data-md-scrollfix
>
204 <li class=
"md-nav__item">
205 <a href=
"../../../getting-started/" class=
"md-nav__link">
220 <li class=
"md-nav__item md-nav__item--nested">
223 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2" type=
"checkbox" id=
"__nav_2" >
225 <label class=
"md-nav__link" for=
"__nav_2">
227 <span class=
"md-nav__icon md-icon"></span>
229 <nav class=
"md-nav" aria-label=
"PHP API" data-md-level=
"1">
230 <label class=
"md-nav__title" for=
"__nav_2">
231 <span class=
"md-nav__icon md-icon"></span>
234 <ul class=
"md-nav__list" data-md-scrollfix
>
240 <li class=
"md-nav__item">
241 <a href=
"../../../php/pages/" class=
"md-nav__link">
252 <li class=
"md-nav__item">
253 <a href=
"../../../php/database-objects/" class=
"md-nav__link">
264 <li class=
"md-nav__item">
265 <a href=
"../../../php/database-access/" class=
"md-nav__link">
276 <li class=
"md-nav__item">
277 <a href=
"../../../php/exceptions/" class=
"md-nav__link">
289 <li class=
"md-nav__item md-nav__item--nested">
292 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5" type=
"checkbox" id=
"__nav_2_5" >
294 <label class=
"md-nav__link" for=
"__nav_2_5">
296 <span class=
"md-nav__icon md-icon"></span>
298 <nav class=
"md-nav" aria-label=
"API" data-md-level=
"2">
299 <label class=
"md-nav__title" for=
"__nav_2_5">
300 <span class=
"md-nav__icon md-icon"></span>
303 <ul class=
"md-nav__list" data-md-scrollfix
>
310 <li class=
"md-nav__item md-nav__item--nested">
313 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_1" type=
"checkbox" id=
"__nav_2_5_1" >
315 <label class=
"md-nav__link" for=
"__nav_2_5_1">
317 <span class=
"md-nav__icon md-icon"></span>
319 <nav class=
"md-nav" aria-label=
"Caches" data-md-level=
"3">
320 <label class=
"md-nav__title" for=
"__nav_2_5_1">
321 <span class=
"md-nav__icon md-icon"></span>
324 <ul class=
"md-nav__list" data-md-scrollfix
>
330 <li class=
"md-nav__item">
331 <a href=
"../../../php/api/caches/" class=
"md-nav__link">
342 <li class=
"md-nav__item">
343 <a href=
"../../../php/api/caches_persistent-caches/" class=
"md-nav__link">
354 <li class=
"md-nav__item">
355 <a href=
"../../../php/api/caches_runtime-caches/" class=
"md-nav__link">
372 <li class=
"md-nav__item">
373 <a href=
"../../../php/api/comments/" class=
"md-nav__link">
384 <li class=
"md-nav__item">
385 <a href=
"../../../php/api/cronjobs/" class=
"md-nav__link">
396 <li class=
"md-nav__item">
397 <a href=
"../../../php/api/events/" class=
"md-nav__link">
409 <li class=
"md-nav__item md-nav__item--nested">
412 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_2_5_5" type=
"checkbox" id=
"__nav_2_5_5" >
414 <label class=
"md-nav__link" for=
"__nav_2_5_5">
416 <span class=
"md-nav__icon md-icon"></span>
418 <nav class=
"md-nav" aria-label=
"Form Builder" data-md-level=
"3">
419 <label class=
"md-nav__title" for=
"__nav_2_5_5">
420 <span class=
"md-nav__icon md-icon"></span>
423 <ul class=
"md-nav__list" data-md-scrollfix
>
429 <li class=
"md-nav__item">
430 <a href=
"../../../php/api/form_builder/overview/" class=
"md-nav__link">
441 <li class=
"md-nav__item">
442 <a href=
"../../../php/api/form_builder/structure/" class=
"md-nav__link">
453 <li class=
"md-nav__item">
454 <a href=
"../../../php/api/form_builder/form_fields/" class=
"md-nav__link">
465 <li class=
"md-nav__item">
466 <a href=
"../../../php/api/form_builder/validation_data/" class=
"md-nav__link">
477 <li class=
"md-nav__item">
478 <a href=
"../../../php/api/form_builder/dependencies/" class=
"md-nav__link">
495 <li class=
"md-nav__item">
496 <a href=
"../../../php/api/package_installation_plugins/" class=
"md-nav__link">
497 Package Installation Plugins
507 <li class=
"md-nav__item">
508 <a href=
"../../../php/api/user_activity_points/" class=
"md-nav__link">
519 <li class=
"md-nav__item">
520 <a href=
"../../../php/api/user_notifications/" class=
"md-nav__link">
531 <li class=
"md-nav__item">
532 <a href=
"../../../php/api/sitemaps/" class=
"md-nav__link">
549 <li class=
"md-nav__item">
550 <a href=
"../../../php/code-style/" class=
"md-nav__link">
561 <li class=
"md-nav__item">
562 <a href=
"../../../php/apps/" class=
"md-nav__link">
573 <li class=
"md-nav__item">
574 <a href=
"../../../php/gdpr/" class=
"md-nav__link">
595 <li class=
"md-nav__item md-nav__item--nested">
598 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_3" type=
"checkbox" id=
"__nav_3" >
600 <label class=
"md-nav__link" for=
"__nav_3">
601 Languages, Templates & CSS
602 <span class=
"md-nav__icon md-icon"></span>
604 <nav class=
"md-nav" aria-label=
"Languages, Templates & CSS" data-md-level=
"1">
605 <label class=
"md-nav__title" for=
"__nav_3">
606 <span class=
"md-nav__icon md-icon"></span>
607 Languages, Templates & CSS
609 <ul class=
"md-nav__list" data-md-scrollfix
>
615 <li class=
"md-nav__item">
616 <a href=
"../../../view/languages/" class=
"md-nav__link">
627 <li class=
"md-nav__item">
628 <a href=
"../../../view/templates/" class=
"md-nav__link">
639 <li class=
"md-nav__item">
640 <a href=
"../../../view/template-plugins/" class=
"md-nav__link">
651 <li class=
"md-nav__item">
652 <a href=
"../../../view/css/" class=
"md-nav__link">
673 <li class=
"md-nav__item md-nav__item--nested">
676 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4" type=
"checkbox" id=
"__nav_4" >
678 <label class=
"md-nav__link" for=
"__nav_4">
679 TypeScript and JavaScript API
680 <span class=
"md-nav__icon md-icon"></span>
682 <nav class=
"md-nav" aria-label=
"TypeScript and JavaScript API" data-md-level=
"1">
683 <label class=
"md-nav__title" for=
"__nav_4">
684 <span class=
"md-nav__icon md-icon"></span>
685 TypeScript and JavaScript API
687 <ul class=
"md-nav__list" data-md-scrollfix
>
693 <li class=
"md-nav__item">
694 <a href=
"../../../javascript/general-usage/" class=
"md-nav__link">
705 <li class=
"md-nav__item">
706 <a href=
"../../../javascript/typescript/" class=
"md-nav__link">
718 <li class=
"md-nav__item md-nav__item--nested">
721 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_4_3" type=
"checkbox" id=
"__nav_4_3" >
723 <label class=
"md-nav__link" for=
"__nav_4_3">
725 <span class=
"md-nav__icon md-icon"></span>
727 <nav class=
"md-nav" aria-label=
"New API" data-md-level=
"2">
728 <label class=
"md-nav__title" for=
"__nav_4_3">
729 <span class=
"md-nav__icon md-icon"></span>
732 <ul class=
"md-nav__list" data-md-scrollfix
>
738 <li class=
"md-nav__item">
739 <a href=
"../../../javascript/new-api_writing-a-module/" class=
"md-nav__link">
750 <li class=
"md-nav__item">
751 <a href=
"../../../javascript/new-api_data-structures/" class=
"md-nav__link">
762 <li class=
"md-nav__item">
763 <a href=
"../../../javascript/new-api_core/" class=
"md-nav__link">
774 <li class=
"md-nav__item">
775 <a href=
"../../../javascript/new-api_dom/" class=
"md-nav__link">
786 <li class=
"md-nav__item">
787 <a href=
"../../../javascript/new-api_events/" class=
"md-nav__link">
798 <li class=
"md-nav__item">
799 <a href=
"../../../javascript/new-api_ajax/" class=
"md-nav__link">
810 <li class=
"md-nav__item">
811 <a href=
"../../../javascript/new-api_dialogs/" class=
"md-nav__link">
822 <li class=
"md-nav__item">
823 <a href=
"../../../javascript/new-api_browser/" class=
"md-nav__link">
824 Browser and Screen Sizes
834 <li class=
"md-nav__item">
835 <a href=
"../../../javascript/new-api_ui/" class=
"md-nav__link">
852 <li class=
"md-nav__item">
853 <a href=
"../../../javascript/legacy-api/" class=
"md-nav__link">
864 <li class=
"md-nav__item">
865 <a href=
"../../../javascript/helper-functions/" class=
"md-nav__link">
876 <li class=
"md-nav__item">
877 <a href=
"../../../javascript/code-snippets/" class=
"md-nav__link">
898 <li class=
"md-nav__item md-nav__item--nested">
901 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5" type=
"checkbox" id=
"__nav_5" >
903 <label class=
"md-nav__link" for=
"__nav_5">
905 <span class=
"md-nav__icon md-icon"></span>
907 <nav class=
"md-nav" aria-label=
"Package Components" data-md-level=
"1">
908 <label class=
"md-nav__title" for=
"__nav_5">
909 <span class=
"md-nav__icon md-icon"></span>
912 <ul class=
"md-nav__list" data-md-scrollfix
>
918 <li class=
"md-nav__item">
919 <a href=
"../../../package/package-xml/" class=
"md-nav__link">
931 <li class=
"md-nav__item md-nav__item--nested">
934 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_5_2" type=
"checkbox" id=
"__nav_5_2" >
936 <label class=
"md-nav__link" for=
"__nav_5_2">
938 <span class=
"md-nav__icon md-icon"></span>
940 <nav class=
"md-nav" aria-label=
"PIPs" data-md-level=
"2">
941 <label class=
"md-nav__title" for=
"__nav_5_2">
942 <span class=
"md-nav__icon md-icon"></span>
945 <ul class=
"md-nav__list" data-md-scrollfix
>
951 <li class=
"md-nav__item">
952 <a href=
"../../../package/pip/" class=
"md-nav__link">
963 <li class=
"md-nav__item">
964 <a href=
"../../../package/pip/acl-option/" class=
"md-nav__link">
975 <li class=
"md-nav__item">
976 <a href=
"../../../package/pip/acp-menu/" class=
"md-nav__link">
987 <li class=
"md-nav__item">
988 <a href=
"../../../package/pip/acp-search-provider/" class=
"md-nav__link">
999 <li class=
"md-nav__item">
1000 <a href=
"../../../package/pip/acp-template/" class=
"md-nav__link">
1011 <li class=
"md-nav__item">
1012 <a href=
"../../../package/pip/bbcode/" class=
"md-nav__link">
1023 <li class=
"md-nav__item">
1024 <a href=
"../../../package/pip/box/" class=
"md-nav__link">
1035 <li class=
"md-nav__item">
1036 <a href=
"../../../package/pip/clipboard-action/" class=
"md-nav__link">
1047 <li class=
"md-nav__item">
1048 <a href=
"../../../package/pip/core-object/" class=
"md-nav__link">
1059 <li class=
"md-nav__item">
1060 <a href=
"../../../package/pip/cronjob/" class=
"md-nav__link">
1071 <li class=
"md-nav__item">
1072 <a href=
"../../../package/pip/database/" class=
"md-nav__link">
1083 <li class=
"md-nav__item">
1084 <a href=
"../../../package/pip/event-listener/" class=
"md-nav__link">
1095 <li class=
"md-nav__item">
1096 <a href=
"../../../package/pip/file/" class=
"md-nav__link">
1107 <li class=
"md-nav__item">
1108 <a href=
"../../../package/pip/language/" class=
"md-nav__link">
1119 <li class=
"md-nav__item">
1120 <a href=
"../../../package/pip/media-provider/" class=
"md-nav__link">
1131 <li class=
"md-nav__item">
1132 <a href=
"../../../package/pip/menu/" class=
"md-nav__link">
1143 <li class=
"md-nav__item">
1144 <a href=
"../../../package/pip/menu-item/" class=
"md-nav__link">
1155 <li class=
"md-nav__item">
1156 <a href=
"../../../package/pip/object-type/" class=
"md-nav__link">
1167 <li class=
"md-nav__item">
1168 <a href=
"../../../package/pip/object-type-definition/" class=
"md-nav__link">
1169 objectTypeDefinition
1179 <li class=
"md-nav__item">
1180 <a href=
"../../../package/pip/option/" class=
"md-nav__link">
1191 <li class=
"md-nav__item">
1192 <a href=
"../../../package/pip/page/" class=
"md-nav__link">
1203 <li class=
"md-nav__item">
1204 <a href=
"../../../package/pip/pip/" class=
"md-nav__link">
1215 <li class=
"md-nav__item">
1216 <a href=
"../../../package/pip/script/" class=
"md-nav__link">
1227 <li class=
"md-nav__item">
1228 <a href=
"../../../package/pip/smiley/" class=
"md-nav__link">
1239 <li class=
"md-nav__item">
1240 <a href=
"../../../package/pip/sql/" class=
"md-nav__link">
1251 <li class=
"md-nav__item">
1252 <a href=
"../../../package/pip/style/" class=
"md-nav__link">
1263 <li class=
"md-nav__item">
1264 <a href=
"../../../package/pip/template/" class=
"md-nav__link">
1275 <li class=
"md-nav__item">
1276 <a href=
"../../../package/pip/template-listener/" class=
"md-nav__link">
1287 <li class=
"md-nav__item">
1288 <a href=
"../../../package/pip/user-group-option/" class=
"md-nav__link">
1299 <li class=
"md-nav__item">
1300 <a href=
"../../../package/pip/user-menu/" class=
"md-nav__link">
1311 <li class=
"md-nav__item">
1312 <a href=
"../../../package/pip/user-notification-event/" class=
"md-nav__link">
1313 userNotificationEvent
1323 <li class=
"md-nav__item">
1324 <a href=
"../../../package/pip/user-option/" class=
"md-nav__link">
1335 <li class=
"md-nav__item">
1336 <a href=
"../../../package/pip/user-profile-menu/" class=
"md-nav__link">
1353 <li class=
"md-nav__item">
1354 <a href=
"../../../package/database-php-api/" class=
"md-nav__link">
1375 <li class=
"md-nav__item md-nav__item--nested">
1378 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6" type=
"checkbox" id=
"__nav_6" >
1380 <label class=
"md-nav__link" for=
"__nav_6">
1382 <span class=
"md-nav__icon md-icon"></span>
1384 <nav class=
"md-nav" aria-label=
"Migration" data-md-level=
"1">
1385 <label class=
"md-nav__title" for=
"__nav_6">
1386 <span class=
"md-nav__icon md-icon"></span>
1389 <ul class=
"md-nav__list" data-md-scrollfix
>
1396 <li class=
"md-nav__item md-nav__item--nested">
1399 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_1" type=
"checkbox" id=
"__nav_6_1" >
1401 <label class=
"md-nav__link" for=
"__nav_6_1">
1402 Migrating from WSC
5.3
1403 <span class=
"md-nav__icon md-icon"></span>
1405 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.3" data-md-level=
"2">
1406 <label class=
"md-nav__title" for=
"__nav_6_1">
1407 <span class=
"md-nav__icon md-icon"></span>
1408 Migrating from WSC
5.3
1410 <ul class=
"md-nav__list" data-md-scrollfix
>
1416 <li class=
"md-nav__item">
1417 <a href=
"../../wsc53/php/" class=
"md-nav__link">
1428 <li class=
"md-nav__item">
1429 <a href=
"../../wsc53/session/" class=
"md-nav__link">
1430 Session Handling and Authentication
1440 <li class=
"md-nav__item">
1441 <a href=
"../../wsc53/javascript/" class=
"md-nav__link">
1442 TypeScript and JavaScript
1452 <li class=
"md-nav__item">
1453 <a href=
"../../wsc53/templates/" class=
"md-nav__link">
1464 <li class=
"md-nav__item">
1465 <a href=
"../../wsc53/libraries/" class=
"md-nav__link">
1466 Third Party Libraries
1483 <li class=
"md-nav__item md-nav__item--nested">
1486 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_2" type=
"checkbox" id=
"__nav_6_2" >
1488 <label class=
"md-nav__link" for=
"__nav_6_2">
1489 Migrating from WSC
5.2
1490 <span class=
"md-nav__icon md-icon"></span>
1492 <nav class=
"md-nav" aria-label=
"Migrating from WSC 5.2" data-md-level=
"2">
1493 <label class=
"md-nav__title" for=
"__nav_6_2">
1494 <span class=
"md-nav__icon md-icon"></span>
1495 Migrating from WSC
5.2
1497 <ul class=
"md-nav__list" data-md-scrollfix
>
1503 <li class=
"md-nav__item">
1504 <a href=
"../../wsc52/php/" class=
"md-nav__link">
1515 <li class=
"md-nav__item">
1516 <a href=
"../../wsc52/templates/" class=
"md-nav__link">
1517 Templates and Languages
1527 <li class=
"md-nav__item">
1528 <a href=
"../../wsc52/libraries/" class=
"md-nav__link">
1529 Third Party Libraries
1546 <li class=
"md-nav__item md-nav__item--nested">
1549 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_3" type=
"checkbox" id=
"__nav_6_3" >
1551 <label class=
"md-nav__link" for=
"__nav_6_3">
1552 Migrating from WSC
3.1
1553 <span class=
"md-nav__icon md-icon"></span>
1555 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.1" data-md-level=
"2">
1556 <label class=
"md-nav__title" for=
"__nav_6_3">
1557 <span class=
"md-nav__icon md-icon"></span>
1558 Migrating from WSC
3.1
1560 <ul class=
"md-nav__list" data-md-scrollfix
>
1566 <li class=
"md-nav__item">
1567 <a href=
"../php/" class=
"md-nav__link">
1585 <li class=
"md-nav__item md-nav__item--nested">
1588 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_4" type=
"checkbox" id=
"__nav_6_4" >
1590 <label class=
"md-nav__link" for=
"__nav_6_4">
1591 Migrating from WSC
3.0
1592 <span class=
"md-nav__icon md-icon"></span>
1594 <nav class=
"md-nav" aria-label=
"Migrating from WSC 3.0" data-md-level=
"2">
1595 <label class=
"md-nav__title" for=
"__nav_6_4">
1596 <span class=
"md-nav__icon md-icon"></span>
1597 Migrating from WSC
3.0
1599 <ul class=
"md-nav__list" data-md-scrollfix
>
1605 <li class=
"md-nav__item">
1606 <a href=
"../../wsc30/php/" class=
"md-nav__link">
1617 <li class=
"md-nav__item">
1618 <a href=
"../../wsc30/javascript/" class=
"md-nav__link">
1629 <li class=
"md-nav__item">
1630 <a href=
"../../wsc30/templates/" class=
"md-nav__link">
1641 <li class=
"md-nav__item">
1642 <a href=
"../../wsc30/css/" class=
"md-nav__link">
1653 <li class=
"md-nav__item">
1654 <a href=
"../../wsc30/package/" class=
"md-nav__link">
1672 <li class=
"md-nav__item md-nav__item--nested">
1675 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_6_5" type=
"checkbox" id=
"__nav_6_5" >
1677 <label class=
"md-nav__link" for=
"__nav_6_5">
1678 Migrating from WCF
2.1
1679 <span class=
"md-nav__icon md-icon"></span>
1681 <nav class=
"md-nav" aria-label=
"Migrating from WCF 2.1" data-md-level=
"2">
1682 <label class=
"md-nav__title" for=
"__nav_6_5">
1683 <span class=
"md-nav__icon md-icon"></span>
1684 Migrating from WCF
2.1
1686 <ul class=
"md-nav__list" data-md-scrollfix
>
1692 <li class=
"md-nav__item">
1693 <a href=
"../../wcf21/php/" class=
"md-nav__link">
1704 <li class=
"md-nav__item">
1705 <a href=
"../../wcf21/templates/" class=
"md-nav__link">
1716 <li class=
"md-nav__item">
1717 <a href=
"../../wcf21/css/" class=
"md-nav__link">
1728 <li class=
"md-nav__item">
1729 <a href=
"../../wcf21/package/" class=
"md-nav__link">
1756 <li class=
"md-nav__item md-nav__item--nested">
1759 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7" type=
"checkbox" id=
"__nav_7" >
1761 <label class=
"md-nav__link" for=
"__nav_7">
1763 <span class=
"md-nav__icon md-icon"></span>
1765 <nav class=
"md-nav" aria-label=
"Tutorials" data-md-level=
"1">
1766 <label class=
"md-nav__title" for=
"__nav_7">
1767 <span class=
"md-nav__icon md-icon"></span>
1770 <ul class=
"md-nav__list" data-md-scrollfix
>
1777 <li class=
"md-nav__item md-nav__item--nested">
1780 <input class=
"md-nav__toggle md-toggle" data-md-toggle=
"__nav_7_1" type=
"checkbox" id=
"__nav_7_1" >
1782 <label class=
"md-nav__link" for=
"__nav_7_1">
1784 <span class=
"md-nav__icon md-icon"></span>
1786 <nav class=
"md-nav" aria-label=
"Tutorial Series" data-md-level=
"2">
1787 <label class=
"md-nav__title" for=
"__nav_7_1">
1788 <span class=
"md-nav__icon md-icon"></span>
1791 <ul class=
"md-nav__list" data-md-scrollfix
>
1797 <li class=
"md-nav__item">
1798 <a href=
"../../../tutorial/series/overview/" class=
"md-nav__link">
1809 <li class=
"md-nav__item">
1810 <a href=
"../../../tutorial/series/part_1/" class=
"md-nav__link">
1821 <li class=
"md-nav__item">
1822 <a href=
"../../../tutorial/series/part_2/" class=
"md-nav__link">
1833 <li class=
"md-nav__item">
1834 <a href=
"../../../tutorial/series/part_3/" class=
"md-nav__link">
1861 <div class=
"md-sidebar md-sidebar--secondary" data-md-component=
"sidebar" data-md-type=
"toc" >
1862 <div class=
"md-sidebar__scrollwrap">
1863 <div class=
"md-sidebar__inner">
1865 <nav class=
"md-nav md-nav--secondary" aria-label=
"Table of contents">
1871 <label class=
"md-nav__title" for=
"__toc">
1872 <span class=
"md-nav__icon md-icon"></span>
1875 <ul class=
"md-nav__list" data-md-component=
"toc" data-md-scrollfix
>
1877 <li class=
"md-nav__item">
1878 <a href=
"#introduction" class=
"md-nav__link">
1884 <li class=
"md-nav__item">
1885 <a href=
"#limitations-if-no-adjustments-are-made-to-the-existing-code" class=
"md-nav__link">
1886 Limitations if no adjustments are made to the existing code
1891 <li class=
"md-nav__item">
1892 <a href=
"#migration" class=
"md-nav__link">
1896 <nav class=
"md-nav" aria-label=
"Migration">
1897 <ul class=
"md-nav__list">
1899 <li class=
"md-nav__item">
1900 <a href=
"#notifications" class=
"md-nav__link">
1904 <nav class=
"md-nav" aria-label=
"Notifications">
1905 <ul class=
"md-nav__list">
1907 <li class=
"md-nav__item">
1908 <a href=
"#mark-notification-as-compatible" class=
"md-nav__link">
1909 Mark notification as compatible
1914 <li class=
"md-nav__item">
1915 <a href=
"#language-variables" class=
"md-nav__link">
1926 <li class=
"md-nav__item">
1927 <a href=
"#recent-activity" class=
"md-nav__link">
1931 <nav class=
"md-nav" aria-label=
"Recent Activity">
1932 <ul class=
"md-nav__list">
1934 <li class=
"md-nav__item">
1935 <a href=
"#english_1" class=
"md-nav__link">
1941 <li class=
"md-nav__item">
1942 <a href=
"#german_1" class=
"md-nav__link">
1953 <li class=
"md-nav__item">
1954 <a href=
"#comments" class=
"md-nav__link">
1965 <li class=
"md-nav__item">
1966 <a href=
"#forward-compatibility" class=
"md-nav__link">
1967 Forward Compatibility
1980 <div class=
"md-content" data-md-component=
"content">
1981 <article class=
"md-content__inner md-typeset">
1984 <a href=
"https://github.com/WoltLab/docs.woltlab.com/edit/5.4/docs/migration/wsc31/like.md" title=
"Edit this page" class=
"md-content__button md-icon">
1985 <svg xmlns=
"http://www.w3.org/2000/svg" viewBox=
"0 0 24 24"><path d=
"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
1989 <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>
1990 <h2 id=
"introduction">Introduction
<a class=
"headerlink" href=
"#introduction" title=
"Permanent link">#
</a></h2>
1991 <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>
1992 <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>
1993 <p>If no adjustments are made to the existing code, the following functions are not available:
1994 * Notifications about reactions/likes
1995 * Recent Activity Events for reactions/likes
</p>
1996 <h2 id=
"migration">Migration
<a class=
"headerlink" href=
"#migration" title=
"Permanent link">#
</a></h2>
1997 <h3 id=
"notifications">Notifications
<a class=
"headerlink" href=
"#notifications" title=
"Permanent link">#
</a></h3>
1998 <h4 id=
"mark-notification-as-compatible">Mark notification as compatible
<a class=
"headerlink" href=
"#mark-notification-as-compatible" title=
"Permanent link">#
</a></h4>
1999 <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>
2000 <h4 id=
"language-variables">Language Variables
<a class=
"headerlink" href=
"#language-variables" title=
"Permanent link">#
</a></h4>
2001 <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>
2002 <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>
2003 <h5 id=
"english">English
<a class=
"headerlink" href=
"#english" title=
"Permanent link">#
</a></h5>
2004 <p><code>{prefix}.like.title
</code>
2005 <div class=
"highlight"><pre><span></span><code>Reaction to a {objectName}
2006 </code></pre></div></p>
2007 <p><code>{prefix}.like.title.stacked
</code></p>
2008 <div class=
"highlight"><pre><span></span><code>{#$count} users reacted to your {objectName}
2010 <p><code>{prefix}.like.message
</code>
2011 <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}).
2012 </code></pre></div></p>
2013 <p><code>{prefix}.like.message.stacked
</code></p>
2014 <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}).
2016 <p><code>wcf.user.notification.{objectTypeName}.like.notification.like
</code>
2017 <div class=
"highlight"><pre><span></span><code>Notify me when someone reacted to my {objectName}
2018 </code></pre></div></p>
2019 <h5 id=
"german">German
<a class=
"headerlink" href=
"#german" title=
"Permanent link">#
</a></h5>
2020 <p><code>{prefix}.like.title
</code>
2021 <div class=
"highlight"><pre><span></span><code>Reaktion auf einen {objectName}
2022 </code></pre></div></p>
2023 <p><code>{prefix}.like.title.stacked
</code></p>
2024 <div class=
"highlight"><pre><span></span><code>{#$count} Benutzern haben auf {if LANGUAGE_USE_INFORMAL_VARIANT}dein(en){else}Ihr(en){/if} {objectName} reagiert
2026 <p><code>{prefix}.like.message
</code>
2027 <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}).
2028 </code></pre></div></p>
2029 <p><code>{prefix}.like.message.stacked
</code></p>
2030 <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}).
2032 <p><code>wcf.user.notification.{object_type_name}.like.notification.like
</code>
2033 <div class=
"highlight"><pre><span></span><code>Jemandem hat auf {if LANGUAGE_USE_INFORMAL_VARIANT}dein(en){else}Ihr(en){/if} {objectName} reagiert
2034 </code></pre></div></p>
2035 <h3 id=
"recent-activity">Recent Activity
<a class=
"headerlink" href=
"#recent-activity" title=
"Permanent link">#
</a></h3>
2036 <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>
2037 <div class=
"highlight"><pre><span></span><code><span class=
"nt"><type
></span>
2038 <span class=
"nt"><name
></span>com.woltlab.example.likeableObject.recentActivityEvent
<span class=
"nt"></name
></span>
2039 <span class=
"nt"><definitionname
></span>com.woltlab.wcf.user.recentActivityEvent
<span class=
"nt"></definitionname
></span>
2040 <span class=
"nt"><classname
></span>wcf\system\user\activity\event\LikeableObjectUserActivityEvent
<span class=
"nt"></classname
></span>
2041 <span class=
"nt"><supportsReactions
></span>1<span class=
"nt"></supportsReactions
></span>
2042 <span class=
"nt"></type
></span>
2044 <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>
2045 <h4 id=
"english_1">English
<a class=
"headerlink" href=
"#english_1" title=
"Permanent link">#
</a></h4>
2046 <p><code>wcf.user.recentActivity.{object_type_name}.recentActivityEvent
</code>
2047 <div class=
"highlight"><pre><span></span><code>Reaction ({objectName})
2048 </code></pre></div></p>
2049 <p><em>Your language variable for the recent activity text
</em>
2050 <div class=
"highlight"><pre><span></span><code>Reacted with
<span title=
"{$reactionType-
>getTitle()}
" class=
"jsTooltip
">{@$reactionType-
>renderIcon()}
</span
> to the {objectName}.
2051 </code></pre></div></p>
2052 <h4 id=
"german_1">German
<a class=
"headerlink" href=
"#german_1" title=
"Permanent link">#
</a></h4>
2053 <p><code>wcf.user.recentActivity.{objectTypeName}.recentActivityEvent
</code>
2054 <div class=
"highlight"><pre><span></span><code>Reaktion ({objectName})
2055 </code></pre></div></p>
2056 <p><em>Your language variable for the recent activity text
</em>
2057 <div class=
"highlight"><pre><span></span><code>Hat mit
<span title=
"{$reactionType-
>getTitle()}
" class=
"jsTooltip
">{@$reactionType-
>renderIcon()}
</span
> auf {objectName} reagiert.
2058 </code></pre></div></p>
2059 <h3 id=
"comments">Comments
<a class=
"headerlink" href=
"#comments" title=
"Permanent link">#
</a></h3>
2060 <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>
2061 <div class=
"highlight"><pre><span></span><code><span class=
"nt"><type
></span>
2062 <span class=
"nt"><name
></span>com.woltlab.wcf.objectComment.response.like.notification
<span class=
"nt"></name
></span>
2063 <span class=
"nt"><definitionname
></span>com.woltlab.wcf.notification.objectType
<span class=
"nt"></definitionname
></span>
2064 <span class=
"nt"><classname
></span>wcf\system\user\notification\object\type\LikeUserNotificationObjectType
<span class=
"nt"></classname
></span>
2065 <span class=
"nt"><category
></span>com.woltlab.example
<span class=
"nt"></category
></span>
2066 <span class=
"nt"><supportsReactions
></span>1<span class=
"nt"></supportsReactions
></span>
2067 <span class=
"nt"></type
></span>
2069 <h2 id=
"forward-compatibility">Forward Compatibility
<a class=
"headerlink" href=
"#forward-compatibility" title=
"Permanent link">#
</a></h2>
2070 <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>
2076 <div class=
"md-source-date">
2079 Last update:
2021-
01-
08
2098 <footer class=
"md-footer">
2100 <div class=
"md-footer-meta md-typeset">
2101 <div class=
"md-footer-meta__inner md-grid">
2102 <div class=
"md-footer-copyright">
2104 <div class=
"md-footer-copyright__highlight">
2105 Copyright ©
2020 WoltLab GmbH
2109 <a href=
"https://squidfunk.github.io/mkdocs-material/" target=
"_blank" rel=
"noopener">
2114 <div class=
"md-footer-copyright">
2115 <a href=
"https://www.woltlab.com/legal-notice/">Legal Notice
</a>
2116 <a href=
"https://www.woltlab.com/privacy-policy/">Privacy Policy
</a>
2123 <div class=
"md-dialog" data-md-component=
"dialog">
2124 <div class=
"md-dialog__inner md-typeset"></div>
2126 <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.fe42c31b.min.js",
"version": {
"provider":
"mike"}}
</script>
2129 <script src=
"../../../assets/javascripts/bundle.d892486b.min.js"></script>