Skip to content

Instantly share code, notes, and snippets.

View MikSDigital's full-sized avatar
🎯
Focusing

Mikhail MikSDigital

🎯
Focusing
View GitHub Profile
@MikSDigital
MikSDigital / employee.class.php
Last active August 29, 2015 14:20
employee.class.php and snippet to access this class (just test)
<?php
/* class file in assets/classes/ folder */
class employee {
public $name;
public $surname;
private $date;
function __construct(modx &$modx, array $config = array()) {
$this->modx = & $modx;
}
@MikSDigital
MikSDigital / form.html
Last active August 29, 2015 14:21
Получает имя файла при отсылке через форму
<!-- Contact form -->
<form id="contact-form" class="contact-form" name="" method="POST" action="http://site.ee/ru/message-sent.htm" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
<legend>Me koostame hinnapakkumise ja saadame selle Teile juba ühe tunni jooksul!</legend>
<div class="input-field">
<input type="text" placeholder="Nimi:" value="" name="name" required>
</div>
<div class="input-field">
<input type="text" placeholder="Telefon:" value="" name="phone" required>
</div>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Word Rotate</title>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Word Rotate</title>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
@MikSDigital
MikSDigital / email.tpl
Last active August 29, 2015 14:23
Сниппет использовался на сайте Бюро переводов для отправки данных формы
/* chunk */
<h3>Пришел запрос сайта</h3>
Имя: [[+name]]
<br>
Телефон: [[+phone]]
<br>
EMAIL: [[+email]]
<br><br>
Текст сообщения : [[+message]]
<?php if($this->countModules('condition')) : ?>
// make this block of code if TRUE
<?php else : ?>
// make this in ELSE case (not TRUE)
<?php endif ; ?>
@MikSDigital
MikSDigital / delete.html
Last active August 29, 2015 14:25
confirmation
<a href="delete.php?subject=" onclick="return confirm('Are you sure?')">Delete</a>
a(href="delete.php?subject=" onclick="return confirm('Are you sure?')") Delete
@MikSDigital
MikSDigital / subdomain-context.php
Last active August 29, 2015 14:26 — forked from mkschell/subdomain-context.php
MODx Revolution plugin bound to OnHandleRequest event
<?php
/**
* plugin to map subdomain requests to contexts
* @setting event OnHandleRequest
* @todo currently, subdomains and context names are bound together.. remove this constraint through some mapping/lookup
* @todo currently, assumes first name in host (name before first dot) is what maps to the context
*/
$context = 'web';
@MikSDigital
MikSDigital / getTVLabel.snippet.php
Last active August 29, 2015 14:27 — forked from pepebe/getTVLabel.snippet.php
Proof of concept for toggling tv groups with a select TV in MODX.
<?php
/*
getTVLabel snippet for modx 2.3
Version:
------------------
v0.0.1 (2015-03-06 16:44)
Author:
------------------