in software

Blog toolbox controllers


Blog toolbox list of controllers

  1. Newsletter
  2. Category
  3. User
  4. Post
  5. Visit count
  6. Tags
  7. Custom post type
  8. Two step authorization

Newsletter controller

Newsletter controller will show you previews of your subscribers inside the Blogtoolbox menu. With this controller, you can see the list of subscribers and when did they subscribe. There you also have the option to select certain users and delete them manually from the newsletter by clicking the delete button in the upper left corner. Clicking on the list item – subscriber will show you a detailed page of selected user where you have two tabs: “Newsletter email” and “Newsletter Types”.

Inside the “Newsletter email” tab you can see the user's email address where you can then manually change them and save.

Inside the “Newsletter Types” tab you can see users newsletter selections with the ability to change them manually and update them.

Note: This controller was not created in order to manipulate users data without their approval. This was added just in case a user contacts you directly first, without going through the process of changing his options by himself or unsubscribing from them. This controller's function is solely for administration and serves as an ability to change or delete subscribers from the database in case they contact you directly.

Category

Category controller is the default part of RainLab.Blog plugin which we've simply extended by adding is_newsletter field to its form. With this checkbox, you control which category is considered as a newsletter category and which isn't.

User

User controller is part of core OctoberCMS which we've once again extended by adding new fields to User's form.

  • Bio - User's bio where he can describe himself
  • Contact email – User's official email which he uses to contact with his community. Important note is that this email is separated from core email field
  • User slug – this field is auto generated for new users. It is a required field and mandatory for a UserProfile component to function properly.
  • Facebook – User's Facebook profile page link
  • Twitter – User's Twitter profile link
  • YouTube – User's YouTube channel link
  • Instagram – User's Instagram profile link
  • LinkedIn – User's LinkedIn profile link
  • Medium – User's Medium profile link
  • Twitch – User's Twitch channel link
  • Business position – User's business position inside corporation

All fields listed above can be used inside the UserProfile component. They are not required with exception of the user's slug being required as it's the only way to connect a User to UserProfile component as GET parameter.

Post

Post controller is the default part of RainLab.Blog plugin which we’ve extended to add additional fields to it's form.

Added fields are:

  • Tags – Inside tab “Tags”. It is a textarea field where values are separated with commas.
  • SEO title – Inside “SEO” tab
  • SEO description – Inside “SEO” tab
  • SEO keywords – Inside “SEO” tab
  • SEO canonical url – Inside “SEO” tab
  • SEO author – Inside “SEO” tab
  • SEO robot follow – Inside “SEO” tab
  • SEO robot index – Inside “SEO” tab
  • OG:title – Inside “SEO” tab
  • OG:description – Inside “SEO” tab
  • OG:image – Inside “SEO” tab, mediafinder type
  • Can send newsletter – inside “Manage” tab, checkbox type

All fields listed above, except “Can send newsletter”, are used by the PostSeo component. If this property isn't set, it's going to be empty by default. “Can send newsletter” is an option which has to be checked if you want Newsletter email notification to be sent.

Note: “Can send newsletter” checkbox is only available during creation of the post. It’s not available when you are updating post in order to reduce email spam risk.

Visit count

VisitCount controller will give you a preview of your post visits in an elegant and descriptive way. We use apexchart.js to give you graphical representation of your post visits in the last 7 days. Under the graph you have a posts table in which are listed post title, categories and number of visits.

Tags

Tags controller will give you a list of used tags. It will help you with managing tag names and their number. It is currently a simple controller which makes administration of tags inside posts easier, but in next iterations we will extend this feature.

Custom post type

CustomPostType controller is a feature for mass assignment of custom post types, separated in two tabs: “Post list” and “Types in usage”.

Inside the “Post list” tab, you will find posts listed inside the table on the left part of the screen and custom post types component on the right side. Proper way of using it is to select posts from the table and then add as many post types you'd like and input the “key => value” combinations you wish, then press the “Save data” button.

Inside the “Types in usage” tab, you can see a list of all created custom post types that are currently in use.

Two step authorization

TwoStepAuth controller is responsible for improving backend login security. BackendUsersController is extended with new fields, which are:

  • Two_step_auth_enabled – checkbox
  • Recovery_email – User will use this email if he loses access to his primary email. When a user is trying to log in, he’ll get a two step auth page and if he clicks on option to use recovery email, he will be prompted to input the correct recovery email and recovery token combination.
  • Recovery token (download button) – This is a user's recovery token which he will need in order to gain access to login, in case he can't use his primary email. This token file should be downloaded and kept safe because if it's lost, it can’t be replaced and the user will be locked out of the system. Note: Only user can download the file, as administrator you cannot download other user's token files

The way two step auth works is: When a user wants to activate this option, he should open his account page and inside the “Account” tab, tick option „Enable two step authentication?“. When the checkbox is activated, new fields will become visible. When the user sets recovery email and downloads his token, then he can proceed with updating his account.

When a user tries to log in with two step option enabled, he will get a standard backend login form. After successful login, he’ll be redirected to a two step auth login form. Token is sent automatically to his primary email address and in order to proceed, he must insert that token (received from email) into the form. If a token isn’t sent, he can click on the button „Generate token“ which will generate a new temporary token and send it to his primary email again.

If the user has lost access to his primary email account, he should then proceed by clicking on the link to enter recovery email and recovery token. When a user inserts the correct combination of recovery email and recovery token, he should then receive a new token on his recovery email and be redirected back to the first page of the two step auth process. After that, he should insert a token that was sent to him and then he would have access to administration.

Buy blog toolbox plugin - 13 USD

Prev: Components Next: Models