Create a new plugin folder in user/plugins/example, and add those files:
user/plugins/example/example.php
user/plugins/example/example.yaml
Then in your twig, you'll have the users object available:
{{ dump(users) }}
| $(window).scroll(function() { | |
| var st = $(this).scrollTop() /10; | |
| $(".object").css({ | |
| "transform" : "translate3d(0px, " + st + "%, .01px)", | |
| "-webkit-transform" : "translate3d(0px, " + st + "%, .01px)" | |
| }); | |
| }); |
| #!/opt/local/bin/php | |
| <?php | |
| /* | |
| 1) replace the shebang (first line) with the path to your php binary | |
| (probably something like /usr/bin/php) | |
| 2) move the file to /usr/local/bin/datauri.php | |
| (this should be in your PATH) | |
| 3) chmod ugo+rx /usr/local/bin/datauri.php | |
| (make the script executable for everyone) |
| /** | |
| * @desc Функция получения русскоязычного варианта окончания для переданного числа | |
| * @param float $value Число, для которого надо подобрать окончание | |
| * @param array $names Массив имён вида [0]имя одного; [1]имя от 2 до 4; [2]имя 0 и от 5 до 20 | |
| * @return string Возвращает соответствующее числу слово | |
| * @link https://habrahabr.ru/post/51887/#comment_1375421 | |
| */ | |
| function getNumberWord($value,$names){ | |
| $temp = strval($value); | |
| $temp = $temp[utf8_strlen($temp)-1]; |
Create a new plugin folder in user/plugins/example, and add those files:
user/plugins/example/example.php
user/plugins/example/example.yaml
Then in your twig, you'll have the users object available:
{{ dump(users) }}