For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains 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
<?php | |
$model = $modx->getOption('model', $scriptProperties); | |
$prompt = $modx->getOption('prompt', $scriptProperties); | |
$api_url = $modx->getOption('api_url', $scriptProperties); | |
$api_key = $modx->getOption('api_key', $scriptProperties); | |
switch($modx->event->name) { | |
case 'OnDocFormSave': | |
// Check if the resource has a summary | |
if (!$resource->get('introtext')) { |
This file contains 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
<div {{ $attributes }} wire:ignore x-data="{ | |
signaturePadId: $id('signature'), | |
signaturePad: null, | |
signature: @entangle($attributes->get('wire:model')), | |
ratio: null, | |
init() { | |
this.resizeCanvas(); | |
this.signaturePad = new SignaturePad(this.$refs.canvas); | |
if (this.signature) { | |
this.signaturePad.fromDataURL(this.signature, { ratio: this.ratio }); |
This file contains 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
/** | |
* Block Editor Settings. | |
* Add custom colors and gradients to the editor. | |
*/ | |
function tabor_add_colors_and_gradients() { | |
$colors = array( | |
'primary' => '#db1c7d', | |
'secondary' => '#a528f0', | |
'tertiary' => '#90cbff', |
This file contains 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
/* | |
* Splits array into subarrays. | |
* count parameter indicates that how many item per subarray contains. | |
* Example usage: splitIntoSubArray([1,2,3,4,5], 2) -> [[1, 2], [3, 4], [5]] | |
*/ | |
function splitIntoSubArray(arr, count) { | |
var newArray = []; | |
while (arr.length > 0) { | |
newArray.push(arr.splice(0, count)); | |
} |
This file contains 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
&where=`{ "template:IN" : [ 1,2,3 ] } | |
&where=`{ "template:NOT IN" : [ 1,2,3 ] } | |
&where=`[{"alias:LIKE":"foo%", "OR:alias:LIKE":"%bar"},{"OR:pagetitle:=":"foobar", "AND:description:=":"raboof"}]` |
This file contains 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
<?php | |
/* | |
* @author @sepiariver | |
* | |
* GPL license, no warranties, no liability, etc. | |
* | |
* USAGE EXAMPLE: | |
* [[rootResource? &toPlaceholder=`root_resource`]] | |
* //followed by something like |
modCLI is a wrapper for the MODX Revolution Processors, allowing you to pretty much do anything from the commandline that you would normally do within the manager.
To use modCLI, simply download the modcli.php file and put it in the MODX_BASE_PATH of your installation. Next open up the console or terminal, and start firing some commands at it.
This file contains 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
by kairon - http://www.unchi.co.uk/author/admin/ | |
Get all members of a user group in MODx Revolution. This can been done by accessing the database in the following way. | |
<?php | |
$usergroup = 4; | |
$c = $modx->newQuery('modUser'); | |
$c->innerJoin ('modUserProfile','Profile'); | |
$c->innerJoin ('modUserGroupMember','UserGroupMembers'); | |
$c->innerJoin ('modUserGroup','UserGroup','`UserGroupMembers`.`user_group` = `UserGroup`.`id`'); |