firesphere / silverstripe-newsmodule
A ModelAdmin based newsmodule to prevent clutter in the SiteTree
Installs: 810
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 6
Forks: 14
Open Issues: 11
Type:silverstripe-module
Requires
Suggests
- colymba/gridfield-gallery-theme: Wanna see the images in slideshow gridfield?
- firesphere/silverstripe-geshiparser: To be able to use parse bb-code style code examples.
- kinglozzer/silverstripe-multiselectfield: To use a multiselect-field instead of a checkboxset.
- silverstripe/translatable: If you need your stuff translated.
- unclecheese/display-logic: Hide some fields and show only if required.
- undefinedoffset/sortablegridfield: Unfortunately you'll need this to get slideshow sortable with gallery theme.
- wernerkrauss/folderperpage: create a seperate folder for each news item.
- 5.7.2
- 5.7.1
- 5.7
- 5.6.5
- 5.6.4
- 5.6.3
- 5.6.2
- 5.6.1
- 5.6
- 5.5.3
- 5.5.2
- 5.5.1
- 5.5
- 5.4
- 5.2.4
- 5.2.3.1
- 5.2.3
- 5.2.2
- 5.2.1
- 5.2
- 5.1
- 5.0.1
- 5.0
- 4.4.1
- 4.4
- 4.4b
- 4.3.4
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3
- 4.2.1
- 4.2
- 4.1
- 4.0
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3
- 3.3b
- 3.3a
- 3.2.1
- 3.2
- 3.1.1
- 3.1
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0
- 2.5.1
- 2.5
- 2.4.2
- 2.4.1
- 2.4
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5.1
- 2.2.5
- 2.2.4.4
- 2.2.4.3
- 2.2.4.2
- 2.2.4.1
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
- 2.1.4
- 2.1.3.1
- 2.1.3
- 2.1.2.1
- 2.1.2
- 2.1.1
- 2.1
- 2.0.10
- 2.0.9.3
- 2.0.9.2
- 2.0.9.1
- 2.0.9
- 2.0.8
- 2.0.7.1
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0
- 1.4.8.2
- 1.4.8.1
- 1.4.8
- 1.4.7
- 1.4.5
- 1.4.4.1
- 1.4.4
- 1.4.3.3
- 1.4.3.2
- 1.4.2
- 1.3
- dev-develop
- dev-feature/Overhaul_4.0
- dev-master_3.0
This package is auto-updated.
Last update: 2020-12-21 02:14:06 UTC
README
Build
WARNING
This latest version has a different multiselectfield! If you have the old multiselectfield, manually delete it and then run composer update.
This new field is prettier and a bit more userfriendly.
Apologies for any inconvenience.
SilverStripe 4
Not as far as I'm concerned. There are by now modules that do a way better job and are better maintained.
REQUEST
Help translate via Transifex
Introduction
This is the Silverstripe 3 Newsmodule. It's separate from the SiteTree.
Mainly to keep the SiteTree uncluttered.
If you expect to have a few hundred articles (like I do), your SiteTree becomes very unreadable. That's why I chose to make an alternative, using ModelAdmin.
It works. Pretty much. Has some missing features. Please read my comments on the functions and such. It should make everything clear.
If you encounter any problems with the Master, please let me know! I can't bugfix without a ticket!
If you use the development-branch, be aware that this is my untested area and therefor might contain bugs or just plain ruin your site with errors.
Ow, and the default template is based on HTML5 features and my own website. Functional frontend demo can also be found on my website. Casa Laguna
Strange code and undocumented features are probably due to my cat sleeping on the keyboard.
I strongly advice to read my inline comments. I've worked hard to make them both functional as funny. Feedback appreciated. And keep an eye on my issues, those are issues I want to fix or features I want to add. Feel free to add suggestions!
This project is always in development. I will always add features or fix bugs. Although it is always in development, I won't leave a bugged out version here. It always works. All new features or fixes are backwards compatible unless stated in the commit-message.
Maintainer Contacts
- Simon "Sphere" Erkelens
github[at]casa-laguna[dot]net
- I'm also on twitter.
SphereSilver
E-mail me your twitter contact if you added something and like to be mentioned!
PHP 7
Yes, works fine.
Requirements
Highly recommended
Optional
Note on which version of translatable, CMS and Framework you use! They might not be compatible.
Features
Demo of frontend
Demo of backend
Lacks
- History of changes in the items
(Indeed, that second bullet means it only lacks history, nothing else :P )
Help and installation
If you don't have a github account, just download:
- Click on the big "ZIP" button at the top (Make sure you download a Master-branch!).
- Extract the zip to your site-root
- Run in your browser -
www.example.com/dev/build?flush=all
to rebuild the manifest and database. A default page will be created if possible.
The advised option is to clone the repo into your site-root:
- In your site-root, do
git clone https://github.com/Firesphere/silverstripe-newsmodule.git
. - Run in your browser -
www.example.com/dev/build?flush=all
to rebuild the manifest and database. A default page will be created if possible. This method will make sure you can always pull the latest updates from the upstream, thus, keeping you up-to-date with the latest features!
Or use Composer:
composer require firesphere/silverstripe-newsmodule:dev-master
- Pray it works.
- Run in your browser -
www.example.com/dev/build?flush=all
to rebuild the manifest and database.
I would like it if you forked and cloned if you want to help out improving this module!
- Make a fork of this module.
- In your site-root, do
git clone https://{your username}@github.com/{your username}/silverstripe-newsmodule.git
. - Run in your browser -
www.example.com/dev/build?flush=all
to rebuild the manifest and database. A default page will be created if possible. This method is only if you know how git works and know how to add upstreams etc. to contribute.
Note, forking is NOT REQUIRED, only handy if you want to help out.
Best Practices
- Write grammatically correct. (If you don't, I'll prevent you from getting any updates. Be warned!)
- If you have Akismet, add your Akismet API-key to the SiteConfig in News settings (It's in the Comments-section). It saves you from comment-spam
- Make sure your cat doesn't walk over yoa23'oqexkji6ygfp89cbhv2
Configuration
- In the SiteConfig, set your wished configuration in the News-tab.
- To enable smilies, change in templates/Layout, the to-parse files. Add
.Parse(BBCodeParser)
To the items you want parsed. To enable smilies, in your config, set BBCodeParser::enable_smilies() (If I'm not mistaken) - In _config, you can disable, edit or change parsers. Note, the parsers are GLOBAL, so $Content from pages will be parsed too!
- In javascript/newsmodule.js, you can configure the tagcloud. Which element it should trigger on, etc.
- Check the templates, Replace placeholder texts!
- Set optional extra anti-spam methods in your SiteConfig
- The slideshow-feature requires you (or your developer) to include a slideshow-javascript. It's not included. Edit the templates in \templates\includes\NewsSlideshow*.ss as needed for the slideshow to work. If you set optional extra anti-spam method, the commentform will contain a field with the ID "Extra", position it "on the other side of the street", e.g. a position absolute with in your css #Extra.field{ left: -9000; }
Plans
- Integrate Facebook OAuth to automagically post when a new item is created (FB OAuth is really crappy :( ).
- Add a "Fetch me a beer" function. Should be useful I think.
Notes
As of version 2.0, multiple developers have contributed. Many thanks to them! Also, translators, thank you a lot!
To include reCaptcha as anti-spam method, alter the NewsHolderPage on line 399. Change that one line to these three:
$form = (CommentForm::create($this, 'CommentForm', $siteconfig, $params));
$protector = SpamProtectorManager::update_form($form, 'Message');
return $form;
Also, if you can't answer the following question, you are not allowed to help :P
"The cow, what do you think of it?"
Requests
- Beer.
- Improvements.
- Translations.
- Beer.
- Did I mention beer?
Other
- This module is given "as is" and I am not responsible for any damage it might do to your brain, dog, cat, house, computer or website.
- Code Comments should not be taken too seriously, since I'm bad at writing serious code-comments.
- Please use the Issue-tracker, otherwise I get lost too.
- This ModelAdmin method is chosen to declutter the SiteTree.
Actual license
This module is published under BSD 2-clause license, although these are not in the actual classes, the license does apply:
http://www.opensource.org/licenses/BSD-2-Clause
Copyright (c) 2012-NOW(), Simon "Sphere" Erkelens
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(I shouldn't scream, should I? This is copy-paste from BSD-2 license...)
Did you read this entire readme? You rock!
Pictured below is a cow, just for you.
/( ,,,,, )\
_\,;;;;;;;,/_
.-"; ;;;;;;;;; ;"-.
'.__/`_ / \ _`\__.'
| (')| |(') |
| .--' '--. |
|/ o o \|
| |
/ \ _..=.._ / \
/:. '._____.' \
;::' / \ .;
| _|_ _|_ ::|
.-| '==o==' '|-.
/ | . / \ | \
| | ::| | | .|
| ( ') (. )::|
|: | |; U U ;|:: | `|
|' | | \ U U / |' | |
##V| |_/`"""`\_| |V##
##V## ##V##