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 | |
if ($modx->event->name == "OnDocFormSave") { | |
if ($resource->class_key != 'Ticket') return; | |
$introtext = $resource->get('introtext'); | |
$generateIntrotext = $resource->getIntroText($resource->get('content'), false); | |
if (empty($resource->getProperty('disable_jevix'))) { | |
$generateIntrotext = $resource->Jevix($generateIntrotext); | |
} | |
if ($introtext == $generateIntrotext) { | |
$resource->set('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
<?php | |
if (isset($options) && $options) { | |
$width = $height = $options; | |
} | |
if (!isset($bg) || !$bg) { | |
$bg = '#fff'; | |
} | |
if (substr($input,0,1) == '/') $input = substr($input,1); | |
$path_info = pathinfo($input); | |
$cropedFile = 'assets/images/croped/'.$width.'/'; |
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
<center> | |
Курс USD: [[!getCurRate?&cur_output=`rubinusd`]]<br> | |
Курс EUR: [[!getCurRate?&cur_output=`rubineur`]] | |
</center> |
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 | |
$year = date("Y"); | |
if($year == $start) | |
{ return $year; | |
} else { | |
return ''.$start.' – '.$year.''; | |
} |
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
<!-- create TV call "tags" with type "auto-tag" or similar from list of types and set to template. | |
Input tags into article through decimal(fo example article, blog, summer) and press SAVE. | |
Create template for search by tags and input code below:--> | |
[[!getResourcesTag? | |
&element=`pdoResources` | |
&elementClass=`modSnippet` | |
&grSnippet=`pdoPage` | |
&tpl=`postTpl` | |
&hideContainers=`1` |
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 | |
define('MODX_API_MODE', true); | |
require 'index.php'; | |
$modx->getService('error', 'error.modError'); | |
$modx->setLogLevel(modX::LOG_LEVEL_ERROR); | |
$modx->setLogTarget('ECHO'); | |
if (!XPDO_CLI_MODE) { | |
echo '<pre>'; | |
} | |
$c = $modx->newQuery('transport.modTransportPackage'); |
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
<script language="JavaScript"> | |
var login = 'netyspama'; | |
var server = 'mail.ru'; | |
var email = login+'@'+server; | |
var url = 'mailto:'+email; | |
document.write('<a href="'+url+'">'+email+'</a>'); | |
</script> |
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
<!--MinifyX call into HEAD and input all scripts and css in the necessary order, otherwise it may not work --> | |
[[MinifyX? | |
&minifyCss=`1` | |
&minifyJs=`1` | |
®isterJs=`default` | |
®isterCss=`default` | |
&jsSources=` | |
/assets/plugins/jquery/jquery-2.1.4.min.js, | |
/assets/js/scripts.js, | |
` |
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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> | |
<head> | |
<!--[if gte mso 9]> | |
<xml> | |
<o:OfficeDocumentSettings> | |
<o:AllowPNG/> | |
<o:PixelsPerInch>96</o:PixelsPerInch> | |
</o:OfficeDocumentSettings> | |
</xml> | |
<![endif]--> |
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
# Insert this code to .htaccess file | |
RewriteEngine on | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www.domain\.ru$ [NC] | |
RewriteRule ^(.*)$ https://domain.ru/$1 [R=301,L] |