diff --git a/docs/en/_images/blog-post-management.png b/docs/en/_images/blog-post-management.png old mode 100755 new mode 100644 index 03300ed..1ada2e2 Binary files a/docs/en/_images/blog-post-management.png and b/docs/en/_images/blog-post-management.png differ diff --git a/docs/en/configuring-blog-posts.md b/docs/en/configuring-blog-posts.md index 01c4cb9..fcb0609 100644 --- a/docs/en/configuring-blog-posts.md +++ b/docs/en/configuring-blog-posts.md @@ -11,6 +11,6 @@ If you'd rather display your posts within the SiteTree, you can do so using Silv In mysite/_config/settings.yml ```yaml -BlogPost: +SilverStripe\Blog\Model\BlogPost: show_in_sitetree: true -``` \ No newline at end of file +``` diff --git a/docs/en/configuring-large-websites.md b/docs/en/configuring-large-websites.md index 1c387ac..82041b8 100644 --- a/docs/en/configuring-large-websites.md +++ b/docs/en/configuring-large-websites.md @@ -2,38 +2,38 @@ By default the blog module user and author selection form fields include all users in your website as candidates for writers, editors and contributors. Additionally, when adding a blog post, again all users are selectable. -This can cause issue with websites that store a large number of users in the database. +This can cause issues with websites that store a large number of users in the database. -In this case you may need to restrict the number of user accounts that are elegable to be selected. -The module has some useful configuration options for this that can be added to your projects config.yml +In this case you may need to restrict the number of user accounts that are eligible for selection. +This module has some useful configuration options for this that can be added to your projects config.yml ## Restricting blog managers to a permission setting Default is to list all users and when one is selected, they are added to a `blog-users` group with `CMS_ACCESS_CMSMain` permissions. To only include those already having these permissions you can set in your `config.yml`: ```yaml -Blog: +SilverStripe\Blog\Model\Blog: grant_user_access: false ``` -Note: depending on the incusion order of your config.yml you may need to clear the condifg setting -before updating it. In this case use the folling in yout `mysite/_config.php`: +Note: depending on the incusion order of your config.yml you may need to clear the config setting +before updating it. In this case use the following in your `mysite/_config.php`: ```php -Config::inst()->remove('Blog', 'grant_user_access'); +SilverStripe\Core\Config\Config::inst()->remove(SilverStripe\Blog\Model\Blog::class, 'grant_user_access'); ``` -If you create your own permission and want to ensure the pool of possible selectable users includes +If you create your own permissions and want to ensure the pool of possible selectable users includes those with this permission you can set the checked permission in `config.yml` with: ```yaml -Blog: - grant_user_permission: SOME_PERMISSION_here +SilverStripe\Blog\Model\Blog: + grant_user_permission: SOME_PERMISSION_HERE ``` ## Restricting blog post authors selection to a known group In a blog post when selecting an author it will default to you (the logged in person creating the post), -however you may be posting on behalf of another person. In this case the slection form field will offer +however you may be posting on behalf of another person. In this case the selection form field will offer all users as potential blog authors. Again for large websites with many thousands of users this can cause the site to be slow or non-responsive. We can turn on a filter so that authors need to be in a defined user group to be able to be selected as an author. @@ -41,31 +41,35 @@ user group to be able to be selected as an author. Enable this in your `config.yml` by adding a group code: ```yaml -BlogPost: +SilverStripe\Blog\Model\BlogPost: restrict_authors_to_group: 'group_code' ``` ## Extension points in Blog and BlogPost users and how to use Both Blog and BlogPost have methods which return the list of candidate users or authors. If the previously -mentioned mothods of reducing this list are not suitable or you wish to roll your own, you can utilise a -DataExtension to get the controll you require. +mentioned methods of reducing this list are not suitable or you wish to roll your own, you can utilise a +DataExtension to get the controller you require. For example in BlogPost: ```php -protected function getCandidateAuthors() { - if($this->config()->get('restrict_authors_to_group')) { - return Group::get()->filter('Code', $this->config()->get('restrict_authors_to_group'))->first()->Members(); - } else { - $list = Member::get(); - $this->extend('updateCandidateAuthors', $list); - return $list; - } - } +protected function getCandidateAuthors() +{ + if ($restrictedGroup = $this->config()->get('restrict_authors_to_group')) { + if ($group = $Group::get()->filter('Code', $restrictedGroup)->first()) { + return $group->Members(); + } + } else { + $list = Member::get(); + $this->extend('updateCandidateAuthors', $list); + return $list; + } +} ``` Note the line `$this->extend('updateCandidateAuthors', $list);` which allows you to call a -`updateCandidateAuthors` method in a DataExtension to the Blog Post class if you have not set a `restrict_authors_to_group` config, further filter the passed +`updateCandidateAuthors` method in a DataExtension to the Blog Post class if you have not set a +`restrict_authors_to_group` config, further filter the passed in Member list before it gets sent back to the form field. See the documentation on [DataExtension](https://docs.silverstripe.org/en/developer_guides/extending/extensions/) for further implementation notes. diff --git a/docs/en/configuring-notifications.md b/docs/en/configuring-notifications.md index 6558838..e16df83 100644 --- a/docs/en/configuring-notifications.md +++ b/docs/en/configuring-notifications.md @@ -2,14 +2,16 @@ ## Configuring whether notifications will send to authors of blogs if comments are spam -Default behaviour using the `silverstripe/comment-notifications` module is to send notification to authors of comments occuring regardless if they are spam or not. +Default behaviour using the `silverstripe/comment-notifications` module is to send notifications of comments to +authors regardless of whether they are spam or not. -In some cases you may wish to not send a notification email to an author if the comment is spam, this is a configurable option. +In some cases you may wish to not send a notification email to an author if the comment is spam, +this is a configurable option. Add the following into your yaml config: ``` -BlogPostNotifications: +SilverStripe\Blog\Model\BlogPostNotifications: notification_on_spam: false ``` diff --git a/docs/en/configuring-pagination.md b/docs/en/configuring-pagination.md index 4c021e6..2149c13 100644 --- a/docs/en/configuring-pagination.md +++ b/docs/en/configuring-pagination.md @@ -1,4 +1,5 @@ # Configuring pagination -To customise the look and feel of the pagination component, simply override the template located at `/blog/templates/Includes/Pagination.ss` +To customise the look and feel of the pagination component, simply override the template located +at `/blog/templates/Includes/Pagination.ss` If you have comments enabled, comment pagination is configurable via the [SilverStripe Comments Module configuration](https://github.com/silverstripe/silverstripe-comments/blob/master/docs/en/Configuration.md). \ No newline at end of file diff --git a/docs/en/configuring-widgets.md b/docs/en/configuring-widgets.md index f52727f..c98a199 100644 --- a/docs/en/configuring-widgets.md +++ b/docs/en/configuring-widgets.md @@ -1,16 +1,18 @@ # Configuring Widgets -The blog module comes bundled with some useful widgets. To take advantage of them, you'll need to install the [SilverStripe widgets module](https://github.com/silverstripe/silverstripe-widgets). Widgets are totally optional - so your blog will work just fine without having widgets installed. +The blog module comes bundled with some useful widgets. To take advantage of them, you'll need to install the +[SilverStripe widgets module](https://github.com/silverstripe/silverstripe-widgets). Widgets are totally optional - +so your blog will work just fine without having widgets installed. You can enable the widgets by adding the following YML config: ```yaml -Blog: +SilverStripe\Blog\Model\Blog: extensions: - - WidgetPageExtension -BlogPost: + - SilverStripe\Widgets\Extensions\WidgetPageExtension +SilverStripe\Blog\Model\BlogPost: extensions: - - WidgetPageExtension + - SilverStripe\Widgets\Extensions\WidgetPageExtension ``` Once you have widgets installed you'll see the "Widgets" tab in the content section of your blog. diff --git a/docs/en/userguide/_images/blog-settings-pagination.png b/docs/en/userguide/_images/blog-settings-pagination.png index 162cca1..0ee5990 100644 Binary files a/docs/en/userguide/_images/blog-settings-pagination.png and b/docs/en/userguide/_images/blog-settings-pagination.png differ diff --git a/docs/en/userguide/_images/blogging-add-blog-post.png b/docs/en/userguide/_images/blogging-add-blog-post.png index 7105e74..2ac8685 100644 Binary files a/docs/en/userguide/_images/blogging-add-blog-post.png and b/docs/en/userguide/_images/blogging-add-blog-post.png differ diff --git a/docs/en/userguide/_images/blogging-add-blog.png b/docs/en/userguide/_images/blogging-add-blog.png index 584420d..021406b 100644 Binary files a/docs/en/userguide/_images/blogging-add-blog.png and b/docs/en/userguide/_images/blogging-add-blog.png differ diff --git a/docs/en/userguide/_images/blogging-banner-summary.png b/docs/en/userguide/_images/blogging-banner-summary.png index 9272b17..2c896de 100644 Binary files a/docs/en/userguide/_images/blogging-banner-summary.png and b/docs/en/userguide/_images/blogging-banner-summary.png differ diff --git a/docs/en/userguide/_images/blogging-options.png b/docs/en/userguide/_images/blogging-options.png index 30a97eb..8adc8be 100644 Binary files a/docs/en/userguide/_images/blogging-options.png and b/docs/en/userguide/_images/blogging-options.png differ diff --git a/docs/en/userguide/_images/blogpost-add-tags-categories.png b/docs/en/userguide/_images/blogpost-add-tags-categories.png old mode 100755 new mode 100644 index a091d3d..0f5b1ae Binary files a/docs/en/userguide/_images/blogpost-add-tags-categories.png and b/docs/en/userguide/_images/blogpost-add-tags-categories.png differ diff --git a/docs/en/userguide/_images/comments-spam.png b/docs/en/userguide/_images/comments-spam.png index 188ddaa..8043d4a 100644 Binary files a/docs/en/userguide/_images/comments-spam.png and b/docs/en/userguide/_images/comments-spam.png differ diff --git a/docs/en/userguide/_images/comments.png b/docs/en/userguide/_images/comments.png index 896a59b..e46428c 100644 Binary files a/docs/en/userguide/_images/comments.png and b/docs/en/userguide/_images/comments.png differ diff --git a/docs/en/userguide/_images/post-publish-date.png b/docs/en/userguide/_images/post-publish-date.png index 64fb1af..669373f 100644 Binary files a/docs/en/userguide/_images/post-publish-date.png and b/docs/en/userguide/_images/post-publish-date.png differ diff --git a/docs/en/userguide/adding-blog-posts.md b/docs/en/userguide/adding-blog-posts.md index 0e033c4..9b60918 100644 --- a/docs/en/userguide/adding-blog-posts.md +++ b/docs/en/userguide/adding-blog-posts.md @@ -1,11 +1,8 @@ -title: Adding a blog post -summary: How to add a new blog post. - # Adding a blog post ## Creating a new blog -On the top of the Contents pane, you will find a button marked "Create." Click it, and a drop-down menu will show up. Select "Blog", then hit the "Go" button. +On the top of the Contents pane, you will find a button marked "Add new." Click it, and a drop-down menu will show up. Select "Blog" from the STEP 2, then hit the "Create" button. You will notice that a new blog page has been created, with the name of "New Blog". Rename this to "Blog" (or whatever you wish to call this page) and then you can later reorder where this is in your website tree. @@ -21,10 +18,10 @@ To create a blog post, click on your Blog page in the Page Tree in the site-tree Fill out your blog post content as you would any page in the CMS. -You can also include a banner images and a custom summary description (if this is omitted the first 15 words of your post content will be used when displaying your posts's abstract). +You can also include a banner images and a custom summary description (if this is omitted the first 30 words of your post content will be used when displaying your posts's abstract). ![Banner image and summary](_images/blogging-banner-summary.png) -There is a new right hand panel where you can set a publish date, categories, tags and authors. +From the tab labelled 'Post Options' you can set a publish date, categories, tags and authors. ![Setting blog options](_images/blogging-options.png) \ No newline at end of file