october cms – create backend controller with “hello world” page

Sometimes you want to create a root level backend menu page with lists more controller or hold some information:

When i click on “Core” I want to see a page with “hello world”. I will call this “HelloController”.

All we need is:

  • the controller class
  • config_list.yaml
  • the hello world in index.htm

For the list and modelClass entry, just take other existing stuff.

Here we go 🙂

october cms: grid for backend forms

The following snippet show the usage of grid system for backend forms:

Available classes are:

 

plesk: redirect to https for entire site

plesk 12

https://der-linux-admin.de/2015/12/plesk-ssl-redirect-https-fuer-domain-erzwingen-und-www-entfernen/

october cms: basic seo

within the layout/theme:

inside the component:

 

deployment for october cms theme/plugin with deployer

The goal is, to deploy a plugin and theme for october cms on a remote server over bitbucket.

  • add a deploy user to your deployment server and allow ssh login with key (help)
  • create public key on deployment server and add it to bitbucket as a deployment key
  • i run plesk on my server, so I added deploy user to psaserv and psacln

  • init and set up your deploy.php file (docs)
  • check that your project dir is writeable
  • create symlinks from the shown location to current/

 

maplace.js – simple map with markers

Maplace.js is a library for google maps. This snippet

  • creates a map
  • creates 2 marker
  • applies some “style” to this map

https://github.com/danielemoraschi/maplace.js

 

october cms: relations

Resources:

Example:

This is a (hopefully correct) working example of a 1 to n relation.

1toN

 

 

october cms themes

Resources:

Basic Layout:

Here is a sample structure of a october theme. the layout file combines the header and the footer into a working layout, which can be used for pages.

Theme structure

layout_header.htm

layout_footer.htm

layouts/default.htm

 

parsley js: bootstrap validation

Parsley is a javascript form validation library. This snippets configures parsley for bootstrap input elements.

parsley options reference: http://parsleyjs.org/doc/annotated-source/defaults.html

ufw: firewall

status

config

 

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-14-04

secure a mongo instance with client access control

Set up the first user:

Now, create a database user:

 

Check if a form has changes before unload the page

Html:

Javascript:

 

wp-cli: update / backup strategy

The following sequence I use to backup WordPress before I do an update / upgrade:

1) DB Backup

2) File Backup

3) Core update

4) Plugin Update

5) Theme Update

Fallback / Recover

 

And here some shell scripts:

 

install mongodb for php7

deploy a wordpress multisite from development to production

Here are my steps for deploying a wordpress multisite (network) from local development environment to a production system.

  1. local: create database dump
  2. rewrite all urls in the database dump
  3. local: zip the wordpress directory
  4. check if your network domains are set up properly
  5. prod: unzip
  6. prod: import dump
  7. prod: change wp_config.php  for production settings
  8. thats it 🙂