This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
To inject JS code into CP you can use MX CP CSS & JS addon | |
https://expressionengine.com/add-ons/mx-cp-css-js | |
warning - it just a quick workaround, not a solution. You should know what you do. Good luck! :) | |
*/ | |
let btnRTE = '<div class="mx_extra"><a class="button button--default button--xsmall left show_editor" href="#" style="display:none">Editor</a> <a class="button button--default button--xsmall left show_code" href="#" >Source</a></div>'; | |
$('.rte-textarea').after(btnRTE); | |
$('.grid-rte').append(btnRTE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$roleIds = ee('Permission')->rolesThatHave('can_access_cp', $siteId); | |
return ee('Model')->get('Role', $roleIds)->all()->getDictionary('role_id', 'name'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (! defined('ENV')) { | |
$URL = strtolower($_SERVER['HTTP_HOST']); | |
define('ENV', 'local'); | |
define('ENV_FULL', 'Local'); | |
define('ENV_DEBUG', false); | |
define('ENV_DOMAIN', $URL); | |
} | |
$protocol = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ) ? 'https://' : 'http://'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!env bash | |
# Nginx-Craft virtual host configuration file | |
# @author MaxLazar | |
# @copyright Copyright (c) 2018 | |
# @link https://maxlazar.com/ | |
# @package server-install-lemp | |
# @since 1.0.0 | |
# @license MIT | |
# sudo sh install_server.sh | |
# https://linuxize.com/post/how-to-add-swap-space-on-centos-7/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/system [NC] | |
RewriteCond %{QUERY_STRING} !ACT|URL [NC] | |
RewriteCond %{REQUEST_METHOD} !=POST [NC] | |
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC] | |
RewriteCond %{DOCUMENT_ROOT}/static/default_site/static%{REQUEST_URI}/index\.php -f | |
RewriteRule ^ /static/default_site/static%{REQUEST_URI}/index\.php [L,QSA] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/system [NC] | |
RewriteCond %{QUERY_STRING} !ACT|URL [NC] | |
RewriteCond %{REQUEST_METHOD} !=POST [NC] | |
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC] | |
RewriteCond %{DOCUMENT_ROOT}/static/default_site/static%{REQUEST_URI}/index\.php -f | |
RewriteRule ^ /static/default_site/static%{REQUEST_URI}/index\.php [L,QSA] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/system [NC] | |
RewriteCond %{QUERY_STRING} !ACT|URL [NC] | |
RewriteCond %{REQUEST_METHOD} !=POST [NC] | |
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC] | |
RewriteCond %{DOCUMENT_ROOT}/static/default_site/static%{REQUEST_URI}/index\.php -f | |
RewriteRule ^ /static/default_site/static%{REQUEST_URI}/index\.php [L,QSA] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$member = ee('Model')->make('Member'); | |
$member->group_id = 5; | |
$member->screen_name = 'DUMMY' . ee()->localize->now; | |
$member->username = 'dummy' . ee()->localize->now; | |
$member->ip_address = ee()->input->ip_address(); | |
$member->join_date = ee()->localize->now; | |
$member->language = ee()->config->item('deft_lang'); | |
$member->password = 'HD9GD23sxL'; | |
$member->hashAndUpdatePassword( $member->password ); | |
$member->save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* /xmlrpc.php$ { | |
allow 172.0.1.1; | |
deny all; | |
} | |
if ($request_method !~ ^(GET|POST)$ ) { | |
return 444; | |
} | |
location ~* /(?:uploads|files|wp-content|wp-includes|akismet)/.*.php$ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Find location of this script. | |
# This ensures that only files in the directory in | |
# which this script exists (recursively) are modified. | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# Set what the name of your expressionengine folders are. | |
SYSTEM="system" | |
IMAGES_DIR="public_html/images" |
NewerOlder