MODx 1.0.4
MySQL strict
MODx MySQL STRICT_TRANS_TABLES , MODx . , , , . , strict SQL, . , MySQL Windows, . .
, , , , - MODx, MySQL strict.
1.0.4 1.0.3, , , . Breadcrumbs , . install/assets/snippets breadcrumbs.tpl
$pretemplateCrumb .= '<a class="'.$crumbClass.'" href="'.$modx->makeUrl($c['id']).'" title="'.$title.'">'.$text.'</a>';
$pretemplateCrumb .= '<a class="'.$crumbClass.'" href="'.(($c['id'] == $modx->config['site_start']) ? $modx->config['base_url'] : $modx->makeUrl($c['id'])).'" title="'.$title.'">'.$text.'</a>';
while ( $parent && $loopSafety < 1000 )
while ( $parent && $parent!=$modx->config['site_start'] && $loopSafety < 1000 )
, :
if ( $showHomeCrumb && $homeCrumb = $modx->getPageInfo
, :
if ( $showHomeCrumb && $homeId != $modx->documentObject['id'] && $homeCrumb = $modx->getPageInfo
MODx PHPMailer, . 5.1, . , , . PHP mail PHPMailer. Jot, Weblogin, ForgotManagerPassword save_user.processor.php save_web_user.processor.php. , ForgotManagerPassword.tpl sendEmail :
function sendEmail($to) {
global $modx, $_lang;
$user = $this->getUser(0, '', $to);
if($user['username']) {
include_once "includes/controls/class.phpmailer.php";
$mail = new PHPMailer();
$mail->IsMail();
$mail->CharSet = $modx->config['modx_charset'];
$mail->IsHTML(true);
$mail->From = $modx->config['emailsender'];
$mail->FromName = 'MODx';
$mail->Subject = $_lang['password_change_request'];
$mail->Body = <<<EOD
<p>{$_lang['forgot_password_email_intro']} <a href="{$modx->config['site_url']}manager/processors/login.processor.php?username={$user['username']}&hash={$user['hash']}">{$_lang['forgot_password_email_link']}</a></p>
<p>{$_lang['forgot_password_email_instructions']}</p>
<p><small>{$_lang['forgot_password_email_fine_print']}</small></p>
EOD;
$mail->AddAddress($to);
$mail->AddReplyTo("no-reply@{$_SERVER['HTTP_HOST']}")
if(!$mail->send()) { $this->errors[] = $_lang['error_sending_email']; }
return $mail;
}
}
.
, Jot, Weblogin, ForgotManagerPassword login.processor.php, error.class.inc.php, save_user.processor.php, save_web_user.processor.php. mcpuk , MODx.
Wayfinder, MODx, wayfinder.inc.php :
$ids = $modx->getChildIds($this->_config['id'],$this->_config['level']);
:
if (!$this->_config['hideSubMenus']) {
$ids = $modx->getChildIds($this->_config['id'],$this->_config['level']);
} else { // then hideSubMenus is checked, we don`t need all children
// first we always included the chilren of startId document
// this fix problem with site root chidrens,
// because site root not included in $modx->getParentIds
$ids = $modx->getChildIds($this->_config['id'], 1, $ids);
$parents = array($modx->documentIdentifier);
$parents += $modx->getParentIds($modx->documentIdentifier);
// if startId not in parents, only show children of startId
if ($this->_config['id'] == 0 || in_array($this->_config['id'], $parents)){
//remove parents higher than startId(including startId)
$startId_parents = array($this->_config['id']);
$startId_parents += $modx->getParentIds($this->_config['id']);
$parents = array_diff($parents, $startId_parents);
//remove parents lower than level of startId + level depth
$level = $this->_config['level'];
if ($level == 0)
$level = 10; // constant getted from getParentIds function
$parents = array_slice(array_reverse($parents), 0, $level-1);
foreach($parents as $p)
$ids = $modx->getChildIds($p, 1, $ids);
}
}
Ditto summary.extender.inc.php, mbstring UTF-8.
, install/assets/plugins transalias.tpl :
&table_name=Trans table;list;common,russian,utf8,utf8lowercase;utf8lowercase
:
&table_name=Trans table;list;common,russian,utf8,utf8lowercase;russian
, , .
, MODx. , EditArea assets MODx, install plugin.EditArea.tpl , EditArea.tpl, install/assets/plugins. , , :
//<?php
/**
* EditArea
* Allows text formatting, search and replace and real-time syntax highlighting
* @status GA
* @version 0.5.2
* @date March 17, 2010
* @category plugin
* @EditArea Packaged version: 0.8.2
:
* @bugs See plugin_bugs.txt
:
* @internal @properties &eadbg=Debug Enabled?;list;true,false;false &word_wrap=Word Wrap Enabled?;list;true,false;true &font_size=Font Size;list;8,9,10,11,12;9 &defaultHeight=Initialize editor height;list;300px,400px,500px,600px,700px;500px &min_height=Minimum editor height;list;200,300,400;400 &start_highlight=Initialize with highlighting enabled?;list;true,false;true &allow_toggle=Allow editor toggling?;list;true,false;true &allow_resize=Allow editor resizing?;list;y,n;y &fullscreen=Initialize editor in fullscreen mode?;list;true,false;false &replace_tab_with_spaces=Replace tab with spaces?;list;// No,// Yes ;// Yes &tab_as_spaces=How many spaces per tab?;list;3,4,5;4 &plugins=Active Plugins;string;modx, syntax_selection &catchunload=Try/Catch on Unload?;list;yes,no;yes&compressor=PHP Compressor Enabled?;list;0,1;0
* @internal @events OnChunkFormRender,OnDocFormRender,OnModFormRender,OnPluginFormRender,OnSnipFormRender,OnTempFormRender
* @internal @modx_category Manager and Admin
* @internal @legacy_names EditArea
, , MODx.
, MODx. install setup.sql . , , :
('captcha_words','0,1,2,3,4,5,6,7,8,9'),
, , :
('publish_default','1'),
, , , :
('tinymce_editor_theme','custom'),
, , assets/plugins/tinymce/style content.css .
, assets/plugins/managermanager/mm_rules.inc.php .
MODx, manager/includes/document.parser.class.inc.php (s , base ):
$queryTime= sprintf("%2.4f ", $queryTime);
$totalTime= sprintf("%2.4f ", $totalTime);
$phpTime= sprintf("%2.4f ", $phpTime);
$source= $this->documentGenerated == 1 ? "" : "";
:
$phpMemory = (memory_get_peak_usage(true) / 1024 / 1024) . " ";
$out= str_replace("[^m^]", $phpMemory, $out);
UTF-8 UTF-8 ( BOM). :
MySQL: [^qt^], : [^q^], PHP: [^p^], : [^t^], [^m^], [^s^]
:
MySQL: 0.1646 c, : 24, PHP: 0.1785 c, : 0.3430 c, 3.25 ,
MODx, , .