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 | |
$docArray = $modx->getCollection('modResource'); | |
foreach($docArray as $doc) { | |
$doc->joinGroup('GroupName'); | |
} |
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
// banner slideshow | |
if ($('#js-banner-wrapper').children().length > 1) { | |
$('#js-banner-wrapper').cycle({ | |
fx: 'fade', | |
activePagerClass: 'active', | |
timeout: 0, | |
next: '#js-banner-next', | |
prev: '#js-banner-prev', | |
width: '100%', |
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 | |
/** | |
* MODX Revolution Backup script | |
* | |
* Useful for fast moving MODX Revolution from FTP (w/o SSH access) to local computer | |
*/ | |
$starttime = microtime(true); | |
// ini_set('max_execution_time', 300); |
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
THIRD_PARTY_LINK_TITLE = 'Dialog title'; | |
THIRD_PARTY_LINK_TEXT = 'Dialog text ...'; | |
// JS 3rd party link confirm dialog | |
$('.3rd-party-link').on('click', function() { | |
var anchor = this; | |
$('<div></div>') | |
.appendTo('body') |
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
{ | |
name: 'annex', | |
fieldLabel: _('workshops.annex'), | |
xtype: 'modx-combo-browser', | |
id: this.ident +'-annex', | |
maxLength: 250, | |
hideFiles: true, | |
listeners: { | |
'select': { | |
fn: function(data) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<model package="workshops" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1"> | |
<object class="Workshop" table="workshop" extends="xPDOSimpleObject"> | |
<field key="title" dbtype="varchar" precision="250" phptype="string" null="false" /> | |
<field key="date" dbtype="int" precision="20" phptype="integer" null="false" default="0" /> | |
<field key="time_start" dbtype="time" phptype="string" null="true" /> | |
<field key="time_end" dbtype="time" phptype="string" null="true" /> | |
<field key="capacity" dbtype="int" precision="11" phptype="integer" null="false" /> | |
<field key="description" dbtype="text" phptype="string" null="false" /> | |
<field key="status" dbtype="int" precision="11" phptype="integer" null="false" /> |
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 TABLE IF NOT EXISTS `cx_workshop` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`title` varchar(250) NOT NULL, | |
`date` int(20) NOT NULL DEFAULT '0', | |
`time_start` time DEFAULT NULL, | |
`time_end` time DEFAULT NULL, | |
`capacity` int(11) NOT NULL, | |
`description` text NOT NULL, | |
`status` int(11) NOT NULL, | |
`annex` varchar(250) NOT NULL, |
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 | |
// inicializace balíčku | |
$path = MODX_CORE_PATH .'components/workshops/'; | |
$result = $modx->addPackage('workshops', $path .'model/', 'cx_'); | |
if (! $result) { | |
return 'Failed to add package'; | |
} | |
else { | |
$output = '<p>Package added</p>'; |
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
var COEX = function(config) { | |
config = config || {}; | |
COEX.superclass.constructor.call(this, config); | |
}; | |
Ext.extend(COEX, Ext.Component, { | |
page: {}, | |
window: {}, | |
grid: {}, |
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
SELECT od.product_id, | |
pl.name, | |
pl.link_rewrite, | |
p.reference, | |
i.id_image, | |
product_shop.show_price, | |
cl.link_rewrite category, | |
p.ean13, | |
COUNT(*) AS product_count | |
FROM ps_order_detail od |
OlderNewer