Migrating from WoltLab Suite 6.1 - PHP
User Activity Events
User activity events can optionally be provided with an image.
The setImage() method expects an object of type wcf\system\file\processor\ImageData as a parameter.
Classes that implement the interface wcf\system\file\processor\IImageDataProvider provide the getImageData() method,
that returns a suitable ImageData object.
Example
$object = new FooBarObject(1);
$event->setTitle(WCF::getLanguage()->getDynamicVariable('com.foo.bar', [
// variables
]));
$event->setDescription(
StringUtil::encodeHTML(
StringUtil::truncate($object->getPlainTextMessage(), 500)
),
true
);
$event->setLink($object->getLink());
$event->setImage(new ImageData('image_src', 800, 600));User Profile Header
The header in the user profile has been completely overhauled.
Main goal of this change is the overhaul of the visuals of the user profile header.
At the same time, the use of a view removes a lot of business logic from the templates and simplifies extensibility through a clear API.
Stats
You can add your own counters to the user profile header via a dedicated event. The use of template listeners is no longer necessary.
Example:
EventHandler::getInstance()->register(
\wcf\event\user\profile\UserProfileStatItemCollecting::class,
static function (\wcf\event\user\profile\UserProfileStatItemCollecting $event) {
if ($event->user->exampleCounter) {
$event->register(\wcf\system\view\user\profile\UserProfileStatItem::forLink(
WCF::getLanguage()->get('phrase.exampleCounter'),
StringUtil::formatNumeric($event->user->exampleCounter),
LinkHandler::getInstance()->getControllerLink(
\example\page\ExampleListPage::class,
['object' => $event->user]
)
));
}
}
);Suche Content Links
Additional links for searching for content can also be added via a dedicated event.
Example:
EventHandler::getInstance()->register(
\wcf\event\user\profile\UserProfileHeaderSearchContentLinkCollecting::class,
static function (\wcf\event\user\profile\UserProfileHeaderSearchContentLinkCollecting $event) {
if ($event->user->exampleCounter) {
$event->register(new \wcf\system\view\user\profile\UserProfileHeaderViewSearchContentLink(
WCF::getLanguage()->get('phrase.exampleCounter'),
LinkHandler::getInstance()->getControllerLink(
\example\page\ExampleListPage::class,
['object' => $event->user]
)
));
}
}
);Interactions
Two different interaction menus are available in the user profile header.
Corresponding events are available for both menus to add custom menu items.
An example of this can be found in the interaction documentation.
| Type | Class Name | Event Class Name |
|-----------------------------|------------------------------|---------------------------------------|
| General interactions. | UserProfileInteractions | UserProfileInteractionCollecting |
| Administrative interactions | UserManagementInteractions | UserManagementInteractionCollecting |
Deleted Content Provider
A new interface IDeletedContentListViewProvider for displaying deleted content in the moderator panel based on a list view has been added.
An abstract implementation of the interface is also available: AbstractDeletedContentListViewProvider
Example:
class DeletedExampleProvider extends AbstractDeletedContentListViewProvider
{
#[\Override]
public function getListView(): AbstractListView
{
return new DeletedExampleListView();
}
}Taggable Content
A new interface ITaggedListViewProvider for displaying tagged content based on a list view has been added.
An abstract implementation of the interface is also available: AbstractTaggedListViewProvider
Example:
class TaggableExample extends AbstractTaggedListViewProvider
{
#[\Override]
public function getListView(array $tagIDs): AbstractListView
{
return new TaggedExampleListView($tagIDs);
}
}Grid Views
The following pages have been migrated to grid views.
Plugins that have been hooked into these pages via event or template listeners must be adapted accordingly.
An example how to add additional columns to an existing grid view can be found in the grid view documentation.
calendar\acp\page\EventImportListPagefilebase\acp\page\LicenseListPagewbb\acp\page\RssFeedListPagewcf\acp\page\ACPSessionLogListPagewcf\acp\page\ACPSessionLogPagewcf\acp\page\AdListPagewcf\acp\page\ArticleListPagewcf\acp\page\AttachmentListPagewcf\acp\page\BBCodeListPagewcf\acp\page\BBCodeMediaProviderListPagewcf\acp\page\BoxListPagewcf\acp\page\CaptchaQuestionListPagewcf\acp\page\CronjobListPagewcf\acp\page\CronjobLogListPagewcf\acp\page\EmailLogListPagewcf\acp\page\ExceptionLogViewPagewcf\acp\page\LabelGroupListPagewcf\acp\page\LabelListPagewcf\acp\page\LanguageItemListPagewcf\acp\page\LanguageListPagewcf\acp\page\MenuListPagewcf\acp\page\ModificationLogListPagewcf\acp\page\NoticeListPagewcf\acp\page\PackageListPagewcf\acp\page\PackageUpdateServerListPagewcf\acp\page\PageListPagewcf\acp\page\PaidSubscriptionListPagewcf\acp\page\PaidSubscriptionTransactionLogListPagewcf\acp\page\PaidSubscriptionUserListPagewcf\acp\page\ReactionTypeListPagewcf\acp\page\SmileyListPagewcf\acp\page\StyleListPagewcf\acp\page\TagListPagewcf\acp\page\TemplateGroupListPagewcf\acp\page\TemplateListPagewcf\acp\page\TrophyListPagewcf\acp\page\UserAuthenticationFailureListPagewcf\acp\page\UserGroupAssignmentListPagewcf\acp\page\UserGroupListPagewcf\acp\page\UserOptionListPagewcf\acp\page\UserRankListPagewcf\acp\page\UserTrophyListPagewcf\acp\page\SuspensionListPagewcf\acp\page\UserSuspensionListPagewcf\acp\page\UserWarningListPagewcf\acp\page\WarningListPagewcf\page\ConversationLabelListPagewcf\page\ModerationListPage
List Views
The following pages have been migrated to list views.
Plugins that have been hooked into these pages via event or template listeners must be adapted accordingly.
An example how to add additional sort fields can be found in the list view documentation.
blog\page\BlogEntryListPageblog\page\BlogListPageblog\page\CategoryEntryListPageblog\page\EntryListPageblog\page\MyBlogListPageblog\page\MyEntryListPageblog\page\UnreadEntryListPageblog\page\UserEntryListPageblog\page\WatchedEntryListPagewcf\page\ArticleListPagewcf\page\CategoryArticleListPagewcf\page\ConversationListPagewcf\page\MembersListPagewcf\page\UnreadArticleListPagewcf\page\WatchedArticleListPage
Forms
The following forms have been migrated to FormBuilder forms.
Plugins that have been hooked into these forms via event or template listeners must be adapted accordingly.
blog\acp\form\CategoryAddFormblog\acp\form\CategoryEditFormblog\form\BlogAddFormblog\form\BlogEditFormblog\form\EntryAddFormblog\form\EntryEditFormcalendar\acp\form\CategoryAddFormcalendar\acp\form\CategoryEditFormcalendar\acp\form\EventImportAddFormcalendar\acp\form\EventImportEditFormcalendar\acp\form\EventOptionAddFormcalendar\acp\form\EventOptionEditFormcalendar\form\EventAddFormcalendar\form\EventEditFormfilebase\acp\form\CategoryAddFormfilebase\acp\form\CategoryEditFormfilebase\acp\form\FileOptionAddFormfilebase\acp\form\FileOptionEditFormfilebase\acp\form\LicenseAddFormfilebase\acp\form\LicenseEditFormfilebase\form\FileAddFormfilebase\form\FileEditFormgallery\acp\form\CategoryAddFormgallery\acp\form\CategoryEditFormwbb\acp\form\RssFeedAddFormwbb\acp\form\RssFeedEditFormwcf\acp\form\BBCodeMediaProviderAddFormwcf\acp\form\BBCodeMediaProviderEditFormwcf\acp\form\CaptchaQuestionAddFormwcf\acp\form\CaptchaQuestionEditFormwcf\acp\form\ContactOptionAddFormwcf\acp\form\ContactOptionEditFormwcf\acp\form\ContactRecipientAddFormwcf\acp\form\ContactRecipientEditFormwcf\acp\form\CronjobAddFormwcf\acp\form\CronjobEditFormwcf\acp\form\LabelAddFormwcf\acp\form\LabelEditFormwcf\acp\form\LoginFormwcf\acp\form\MenuAddFormwcf\acp\form\MenuEditFormwcf\acp\form\MenuItemAddFormwcf\acp\form\MenuItemEditFormwcf\acp\form\PackageUpdateServerAddFormwcf\acp\form\PackageUpdateServerEditFormwcf\acp\form\SitemapEditFormwcf\acp\form\SuspensionAddFormwcf\acp\form\SuspensionEditFormwcf\acp\form\TagAddFormwcf\acp\form\TagEditFormwcf\acp\form\TemplateGroupAddFormwcf\acp\form\TemplateGroupEditFormwcf\acp\form\UserOptionAddFormwcf\acp\form\UserOptionEditFormwcf\acp\form\UserRankAddFormwcf\acp\form\UserRankEditFormwcf\acp\form\WarningAddFormwcf\acp\form\WarningEditFormwcf\form\ContactFormwcf\form\ConversationAddFormwcf\form\ConversationDraftEditFormwcf\form\LoginForm
