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
<?php | |
/**************************************************** | |
Redirect the page to another URL | |
Parameters: | |
- gotoURL : a resource ID or an URL | |
- dontGoto : default:false, if true, do nothing... | |
Usage: | |
[[GotoURL? &gotoURL=`10` &dontGoto=`1`]] |
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
<?php | |
/**************************************************** | |
List the files present in a file folder | |
Parameters: | |
- &directory: directory to scan | |
- &templateChunk (default:void): a chunk to parse on each found file | |
- &random (default =`0`): if true, the file list output is randomized | |
- &filterSubDirectory (default=`0`): if true, won't show the sub directory | |
- &implodeSeparator (default="\n"): a separator to use to implode the file lines or parsed chunk file lines |
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
<?php | |
/**** | |
This plugin escapes modx tags that are enclosed in %EscapeModx% %/EscapeModx% tags. | |
eg in a resource content in a RTE: | |
%EscapeModx% | |
[[!AndIf? | |
&condition=`[[+description]]%%notempty%%1||[[+urlLink]]%%notempty%%1` | |
&operator=`OR` |
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
<?php | |
/* | |
Snippet :getUserGroupsforResource | |
Abstract: get infos on the groups on a given resource | |
Example: | |
[[getUserGroupsforResource?&id=12]] | |
Input: | |
- id: (default:current resource) the id of the resource | |
- returnInfo (default:'all') : |
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
/* | |
Original version: http://jsfiddle.net/m1erickson/3SFJy/ | |
code HTML | |
--------- | |
<html> | |
<canvas id="canvas" width=300 height=300></canvas> | |
</html> | |
code CSS | |
-------- |
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
<!-- | |
Create squared blocks with a bootstrap configuration | |
--> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> | |
<style> | |
.square { | |
height: auto; | |
border-left: 1px solid green; |
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
<html> | |
<head> | |
<style> | |
@keyframes AnimationBackground { | |
0%{background-position:90% 0%} | |
50%{background-position:11% 100%} | |
100%{background-position:90% 0%} | |
} | |
.animatedBackground { | |
background: linear-gradient(270deg, #6cccb3, #8891e1, #dd4d9e,#f37e0b); |
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
<style> | |
:root { | |
--shape-fill-color: rgb(95, 176, 5); | |
--shape-height: 100px; | |
--shape-width: 100%; | |
} | |
body { | |
margin: 0; |