From: Marcel Werk Date: Mon, 6 Jun 2016 15:02:45 +0000 (+0200) Subject: Added article system X-Git-Tag: 3.0.0_Beta_1~1520 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a5a4f02d546886aaec7e31b03918f46deb341f4d;p=GitHub%2FWoltLab%2FWCF.git Added article system --- diff --git a/com.woltlab.wcf/aclOption.xml b/com.woltlab.wcf/aclOption.xml index a608f243f6..2091a61b8d 100644 --- a/com.woltlab.wcf/aclOption.xml +++ b/com.woltlab.wcf/aclOption.xml @@ -8,6 +8,10 @@ + + \ No newline at end of file diff --git a/com.woltlab.wcf/acpMenu.xml b/com.woltlab.wcf/acpMenu.xml index 94d96a8f89..7137571540 100644 --- a/com.woltlab.wcf/acpMenu.xml +++ b/com.woltlab.wcf/acpMenu.xml @@ -322,11 +322,44 @@ fa-plus + + + + wcf.acp.menu.link.content + module_article + 2 + + + + wcf.acp.menu.link.article + admin.content.article.canManageArticle + + + + wcf.acp.menu.link.article.list + admin.content.article.canManageArticle + fa-plus + + + + + wcf.acp.menu.link.article + admin.content.article.canManageCategory + + + + + wcf.acp.menu.link.article.category.list + admin.content.article.canManageCategory + fa-plus + + + wcf.acp.menu.link.content - 2 + 3 @@ -356,7 +389,7 @@ wcf.acp.menu.link.content - 3 + 4 @@ -386,7 +419,7 @@ wcf.acp.menu.link.content module_tagging - 4 + 5 @@ -405,7 +438,7 @@ wcf.acp.menu.link.content - 5 + 6 diff --git a/com.woltlab.wcf/menuItem.xml b/com.woltlab.wcf/menuItem.xml index 2edf305506..379242d721 100644 --- a/com.woltlab.wcf/menuItem.xml +++ b/com.woltlab.wcf/menuItem.xml @@ -7,6 +7,12 @@ <![CDATA[Dashboard]]> com.woltlab.wcf.Dashboard + + com.woltlab.wcf.MainMenu + <![CDATA[Artikel]]> + <![CDATA[Articles]]> + com.woltlab.wcf.ArticleList + com.woltlab.wcf.MainMenu diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index a5203a3771..d058b18728 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -24,6 +24,29 @@ com.woltlab.wcf.collapsibleContent + + + com.woltlab.wcf.article.category + com.woltlab.wcf.category + wcf\system\category\ArticleCategoryType + + + com.woltlab.wcf.article.category + com.woltlab.wcf.acl + + + com.woltlab.wcf.article + com.woltlab.wcf.tagging.taggableObject + wcf\system\tagging\TaggableArticle + + + com.woltlab.wcf.likeableArticle + com.woltlab.wcf.like.likeableObject + wcf\data\article\LikeableArticleProvider + + + + com.woltlab.wcf.bbcode.smiley com.woltlab.wcf.category @@ -157,6 +180,12 @@ com.woltlab.wcf.comment.commentableContent + + + com.woltlab.wcf.article + com.woltlab.wcf.comment.commentableContent + + diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index 75cc0ca064..bb046a9e28 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -247,6 +247,9 @@ cms.media + + cms + @@ -316,6 +319,12 @@ 1 + + - + - + + + + + + + + + + diff --git a/com.woltlab.wcf/page.xml b/com.woltlab.wcf/page.xml index de65cf06ad..b727d692b8 100644 --- a/com.woltlab.wcf/page.xml +++ b/com.woltlab.wcf/page.xml @@ -473,6 +473,40 @@ com.woltlab.wcf.MembersList 1 + + system + wcf\page\ArticleListPage + + + module_article + + + Articles + + + Artikel + + + + system + wcf\page\CategoryArticleListPage + wcf\system\page\handler\CategoryArticleListPageHandler + + + module_article + com.woltlab.wcf.ArticleList + 1 + + + system + wcf\page\ArticlePage + wcf\system\page\handler\ArticlePageHandler + + + module_article + com.woltlab.wcf.CategoryArticleList + 1 + diff --git a/com.woltlab.wcf/templates/article.tpl b/com.woltlab.wcf/templates/article.tpl new file mode 100644 index 0000000000..df85e5a4f6 --- /dev/null +++ b/com.woltlab.wcf/templates/article.tpl @@ -0,0 +1,276 @@ +{capture assign='pageTitle'}{$articleContent->title}{/capture} + +{capture assign='contentHeader'} +
+
+

{$articleContent->title}

+
+ {$articleContent->getArticle()->getCategory()->getTitle()} +
+ +
+ + {hascontent} + + {/hascontent} +
+{/capture} + +{include file='header'} + +{if $articleContent->getImage()} +
+
+
{@$articleContent->getImage()->getThumbnailTag('large')}
+ {if $articleContent->getImage()->caption} +
{$articleContent->getImage()->caption}
+ {/if} +
+
+{/if} + +
+
+ {if $articleContent->teaser} + + {/if} + + {@$articleContent->getFormattedContent()} +
+ + {if !$tags|empty} + + {/if} + +
+ +
    + + {if ENABLE_SHARE_BUTTONS} +
    +

    {lang}wcf.message.share{/lang}

    + + {include file='shareButtons'} +
    + {/if} +
    + +{if ARTICLE_SHOW_ABOUT_AUTHOR} +
    +

    {lang}wcf.article.aboutAuthor{/lang}

    + +
    + {@$article->getUserProfile()->getAvatar()->getImageTag(128)} + +
    +
    {$article->getUserProfile()->aboutMe}
    + +
    + + + {if MODULE_USER_RANK} + {if $article->getUserProfile()->getUserTitle()} + {$article->getUserProfile()->getUserTitle()} + {/if} + {if $article->getUserProfile()->getRank() && $article->getUserProfile()->getRank()->rankImage} + {@$article->getUserProfile()->getRank()->getImage()} + {/if} + {/if} +
    +
    +
    +
    +{/if} + +
    + {hascontent} + + {/hascontent} +
    + +{if $previousArticle || $nextArticle} + +{/if} + +{if $relatedArticles|count} + +{/if} + +{if $article->enableComments} + {if $commentList|count || $commentCanAdd} +
    +

    {lang}wcf.article.comments{/lang}{if $article->comments} {#$article->comments}{/if}

    + + {include file='__commentJavaScript' commentContainerID='articleCommentList'} + +
      + {include file='commentList'} +
    +
    + {/if} +{/if} + +{if MODULE_LIKE && ARTICLE_ENABLE_LIKE} + +{/if} + +{include file='footer'} diff --git a/com.woltlab.wcf/templates/articleList.tpl b/com.woltlab.wcf/templates/articleList.tpl new file mode 100644 index 0000000000..a4313f597a --- /dev/null +++ b/com.woltlab.wcf/templates/articleList.tpl @@ -0,0 +1,54 @@ +{capture assign='headContent'} + {if $pageNo < $pages} + + {/if} + {if $pageNo > 1} + + {/if} + + {if $__wcf->getUser()->userID} + + {else} + + {/if} +{/capture} + +{capture assign='headerNavigation'} +
  • +{/capture} + +{include file='header'} + +{hascontent} +
    + {content} + {pages print=true assign='pagesLinks' controller='ArticleList' link="pageNo=%d"} + {/content} +
    +{/hascontent} + +{if $objects|count} +
    + {include file='articleListItems'} +
    +{else} +

    {lang}wcf.global.noItems{/lang}

    +{/if} + +
    + {hascontent} +
    + {content}{@$pagesLinks}{/content} +
    + {/hascontent} + + {hascontent} + + {/hascontent} +
    + +{include file='footer'} diff --git a/com.woltlab.wcf/templates/articleListItems.tpl b/com.woltlab.wcf/templates/articleListItems.tpl new file mode 100644 index 0000000000..17915318d6 --- /dev/null +++ b/com.woltlab.wcf/templates/articleListItems.tpl @@ -0,0 +1,46 @@ + \ No newline at end of file diff --git a/com.woltlab.wcf/templates/categoryArticleList.tpl b/com.woltlab.wcf/templates/categoryArticleList.tpl new file mode 100644 index 0000000000..a70db0d721 --- /dev/null +++ b/com.woltlab.wcf/templates/categoryArticleList.tpl @@ -0,0 +1,58 @@ +{capture assign='pageTitle'}{$category->getTitle()}{/capture} + +{capture assign='contentTitle'}{$category->getTitle()}{/capture} + +{capture assign='headContent'} + {if $pageNo < $pages} + + {/if} + {if $pageNo > 1} + + {/if} + + {if $__wcf->getUser()->userID} + + {else} + + {/if} +{/capture} + +{capture assign='headerNavigation'} +
  • +{/capture} + +{include file='header'} + +{hascontent} +
    + {content} + {pages print=true assign='pagesLinks' controller='CategoryArticleList' object=$category link="pageNo=%d"} + {/content} +
    +{/hascontent} + +{if $objects|count} +
    + {include file='articleListItems'} +
    +{else} +

    {lang}wcf.global.noItems{/lang}

    +{/if} + +
    + {hascontent} +
    + {content}{@$pagesLinks}{/content} +
    + {/hascontent} + + {hascontent} + + {/hascontent} +
    + +{include file='footer'} diff --git a/com.woltlab.wcf/templates/header.tpl b/com.woltlab.wcf/templates/header.tpl index 0f4ab999aa..1acf6bf1da 100644 --- a/com.woltlab.wcf/templates/header.tpl +++ b/com.woltlab.wcf/templates/header.tpl @@ -12,6 +12,10 @@ {include file='headInclude'} + {if !$canonicalURL|empty} + + {/if} + {if !$headContent|empty} {@$headContent} {/if} diff --git a/com.woltlab.wcf/templates/membersList.tpl b/com.woltlab.wcf/templates/membersList.tpl index a4867ed2e3..8380bedae1 100644 --- a/com.woltlab.wcf/templates/membersList.tpl +++ b/com.woltlab.wcf/templates/membersList.tpl @@ -12,7 +12,7 @@ {/if} -{/capture} +{/capture} {capture assign='sidebarRight'} {assign var=encodedLetter value=$letter|rawurlencode} diff --git a/com.woltlab.wcf/userGroupOption.xml b/com.woltlab.wcf/userGroupOption.xml index fdb84aa4a4..292309df29 100644 --- a/com.woltlab.wcf/userGroupOption.xml +++ b/com.woltlab.wcf/userGroupOption.xml @@ -32,6 +32,9 @@ user + + user + @@ -43,6 +46,9 @@ mod.general + + mod.general + @@ -362,6 +368,21 @@ 1 + + + + + + + + + + + +