From e866b80eaf22f02e6e5be9f7c77ac13207232f0a Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 7 Jun 2014 21:07:36 +0200 Subject: [PATCH] Add ad system --- com.woltlab.wcf/acpMenu.xml | 15 ++ com.woltlab.wcf/coreObject.xml | 4 + com.woltlab.wcf/objectType.xml | 140 +++++++++- com.woltlab.wcf/objectTypeDefinition.xml | 9 + com.woltlab.wcf/option.xml | 6 + com.woltlab.wcf/templates/footer.tpl | 11 + com.woltlab.wcf/templates/header.tpl | 7 + com.woltlab.wcf/userGroupOption.xml | 10 + wcfsetup/install/files/acp/js/WCF.ACP.js | 74 ++++++ .../install/files/acp/templates/adAdd.tpl | 159 ++++++++++++ .../install/files/acp/templates/adList.tpl | 70 +++++ wcfsetup/install/files/js/WCF.js | 18 ++ .../files/lib/acp/form/AdAddForm.class.php | 240 ++++++++++++++++++ .../files/lib/acp/form/AdEditForm.class.php | 135 ++++++++++ .../files/lib/acp/page/AdListPage.class.php | 30 +++ .../install/files/lib/data/ad/Ad.class.php | 61 +++++ .../files/lib/data/ad/AdAction.class.php | 119 +++++++++ .../files/lib/data/ad/AdEditor.class.php | 71 ++++++ .../files/lib/data/ad/AdList.class.php | 15 ++ .../files/lib/system/ad/AdHandler.class.php | 137 ++++++++++ .../cache/builder/AdCacheBuilder.class.php | 36 +++ .../MultiPageControllerCondition.class.php | 16 ++ .../system/condition/TimeCondition.class.php | 8 +- wcfsetup/install/lang/de.xml | 34 +++ wcfsetup/setup/db/install.sql | 12 + 25 files changed, 1432 insertions(+), 5 deletions(-) create mode 100644 wcfsetup/install/files/acp/templates/adAdd.tpl create mode 100644 wcfsetup/install/files/acp/templates/adList.tpl create mode 100644 wcfsetup/install/files/lib/acp/form/AdAddForm.class.php create mode 100644 wcfsetup/install/files/lib/acp/form/AdEditForm.class.php create mode 100644 wcfsetup/install/files/lib/acp/page/AdListPage.class.php create mode 100644 wcfsetup/install/files/lib/data/ad/Ad.class.php create mode 100644 wcfsetup/install/files/lib/data/ad/AdAction.class.php create mode 100644 wcfsetup/install/files/lib/data/ad/AdEditor.class.php create mode 100644 wcfsetup/install/files/lib/data/ad/AdList.class.php create mode 100644 wcfsetup/install/files/lib/system/ad/AdHandler.class.php create mode 100644 wcfsetup/install/files/lib/system/cache/builder/AdCacheBuilder.class.php diff --git a/com.woltlab.wcf/acpMenu.xml b/com.woltlab.wcf/acpMenu.xml index 6242c7da17..e633b3fc94 100644 --- a/com.woltlab.wcf/acpMenu.xml +++ b/com.woltlab.wcf/acpMenu.xml @@ -508,6 +508,21 @@ admin.content.notice.canManageNotice + + wcf.acp.menu.link.content + 7 + + + + wcf.acp.menu.link.ad + admin.content.ad.canManageAd + + + + wcf.acp.menu.link.ad + admin.content.ad.canManageAd + + 5 diff --git a/com.woltlab.wcf/coreObject.xml b/com.woltlab.wcf/coreObject.xml index d02ca2b9c2..634629004e 100644 --- a/com.woltlab.wcf/coreObject.xml +++ b/com.woltlab.wcf/coreObject.xml @@ -53,5 +53,9 @@ + + + + diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 072155d839..a594532b57 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -705,6 +705,144 @@ com.woltlab.wcf.user userOptions - + + + + + com.woltlab.wcf.logo + com.woltlab.wcf.adLocation + com.woltlab.wcf.global + + + com.woltlab.wcf.header.content + com.woltlab.wcf.adLocation + com.woltlab.wcf.global + + + com.woltlab.wcf.footer.content + com.woltlab.wcf.adLocation + com.woltlab.wcf.global + + + com.woltlab.wcf.sidebar.top + com.woltlab.wcf.adLocation + com.woltlab.wcf.global + + + com.woltlab.wcf.sidebar.bottom + com.woltlab.wcf.adLocation + com.woltlab.wcf.global + + + com.woltlab.wcf.footer.bottom + com.woltlab.wcf.adLocation + com.woltlab.wcf.global + + + + + + com.woltlab.wcf.page.controller + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.page + + + + com.woltlab.wcf.pointInTime.daysOfWeek + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.pointInTime + + + com.woltlab.wcf.pointInTime.time + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.pointInTime + + + + com.woltlab.wcf.user.username + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + + + com.woltlab.wcf.user.email + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + + + com.woltlab.wcf.user.userGroup + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + 1 + + + com.woltlab.wcf.user.languages + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + + + com.woltlab.wcf.user.registrationDate + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + + + com.woltlab.wcf.user.registrationDateInterval + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + + + com.woltlab.wcf.user.avatar + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + + + com.woltlab.wcf.user.state + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + general + + + com.woltlab.wcf.user.activityPoints + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + contents + activityPoints + 0 + + + com.woltlab.wcf.user.likesReceived + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + contents + likesReceived + 0 + + + com.woltlab.wcf.user.userOptions + com.woltlab.wcf.condition.ad + + com.woltlab.wcf.user + userOptions + + diff --git a/com.woltlab.wcf/objectTypeDefinition.xml b/com.woltlab.wcf/objectTypeDefinition.xml index 10a1bd08eb..8cfd6268ca 100644 --- a/com.woltlab.wcf/objectTypeDefinition.xml +++ b/com.woltlab.wcf/objectTypeDefinition.xml @@ -162,5 +162,14 @@ com.woltlab.wcf.condition.notice + + + com.woltlab.wcf.adLocation + + + + com.woltlab.wcf.condition.ad + + diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index 9564a4c433..50883b1d62 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -338,6 +338,12 @@ 1 + +