First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Withing the terminal, Fire this command:
which php
<?php | |
class GridFieldConfig_HasManyRelationEditor extends GridFieldConfig { | |
/** | |
* | |
* @param int $itemsPerPage - How many items per page should show up | |
*/ | |
public function __construct($itemsPerPage=null) { | |
$this->addComponent(new GridFieldButtonRow('before')); | |
$this->addComponent(new GridFieldAddNewButton('buttons-before-left')); |
--- | |
Name: app | |
After: framework/routes#coreroutes | |
--- | |
Director: | |
rules: | |
'dev': 'DevelopmentAdmin' | |
'sitemap.xml': 'GoogleSitemap' | |
'$Action' : 'BaseController' |
#!/bin/bash | |
# | |
# ss-upgrader.sh | |
# | |
# INTRODUCTION | |
# | |
# There are some threads on the SS forums that describe the techdocs for upgrading a 2.4 site to 3.x as being too technical. Mainly from content authors who | |
# also happen to be site maintainers - they are not coders. | |
# The aim of this script is to therefore to automate - in as much as this is possible in a user-configured, open-source software project - to help those new to | |
# SS3 upgrade from 2.x as smoothly as possible. |
First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Withing the terminal, Fire this command:
which php
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
.map { |
<?php | |
$custom_post_type = 'team_profiles; | |
$tax_term = 'department'; | |
$terms = get_terms($tax_term); | |
foreach($terms as $term) : | |
?> | |
<h2><?= $term->name;?></h2> | |
<?php | |
$cat_posts_args = array( | |
'post_type' => $custom_post_type, |
// Requires modular-scale | |
=heading-sizes($max-size: 30px, $min-size: 16px, $max-heading: 1, $min-heading: 6, $ratio: 1, $debug: false) | |
$number-of-headings: $min-heading - $max-heading + 1 | |
$scaled-size-of-max-heading: modular-scale($number-of-headings - 1, $min-size, $ratio) | |
$coefficient: 0 | |
@if $ratio != 1 | |
@if modular-scale(1, 1, octave()) != 2 |
<?php | |
/* | |
############################## | |
########### Search ########### | |
############################## | |
Included are steps to help make this script easier for other to follow | |
All you have to do is add custom ACF post types into Step 1 and custom taxonomies into Step 10 | |
[list_searcheable_acf list all the custom fields we want to include in our search query] | |
@return [array] [list of custom fields] |
Note: Because this is my personal cheat sheet, I'm installing a few PHP modules that you may not need if you're not running SilverStripe 4.x.x. Otherwise this is a pretty standard and secure LAMP installation.
Log into the remote machine as root: ssh root@123.45.67.890
First, add the admin user.