This file contains hidden or 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
$query = $this->modx->newQuery('modUser'); | |
$query->innerJoin('modUserProfile','Profile'); | |
//Select ALL fields from both tables | |
$query->select(array('modUser.*, Profile.*')); | |
--- | |
$query->select(array('modUser.*')); | |
$query->select($this->modx->getSelectColumns('modUserProfile','Profile','profile_')); | |
//Select SPECIFIC fields from both tables |
This file contains hidden or 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
$query = $this->modx->newQuery('modUser'); | |
//checks | |
$query->where(array( | |
'active' => 1, | |
'Profile.blocked' => 0 | |
)); | |
//by usergroup | |
$query->where(array('primary_group:IN' => array(1,2,3))); | |
//by id | |
$query->where(array('id:IN' => array(1,2,3)),xPDOQuery::SQL_OR); //<-- uses OR condition |
This file contains hidden or 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
$c->where("CAST(width AS DECIMAL(5,3)) = {$_REQUEST['width']}"); |
This file contains hidden or 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
padding-top: padding-top:calc( ([[+height]]% / [[+width]]) * 100 ); |
This file contains hidden or 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 | |
/** | |
* Checks current users group membership | |
* | |
* @var modX $modx | |
* @var array $scriptProperties | |
*/ | |
/* set default properties */ | |
$usergroup = $modx->getOption('usergroup',$scriptProperties); | |
$sendError = $modx->getOption('sendError',$scriptProperties) == 1 || null; |
This file contains hidden or 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
RewriteEngine On | |
RewriteBase / | |
### ---REWRITE DYNAMIC CACHE VERSION URL--- ### | |
# EXAMPLE: http://domain.com/css/prp-styles_ver<timestamp>.css | |
# RewriteRule (.*)_ver\d+\.(.*)$ $1.$2 [L] | |
### ---REWRITE DYNAMIC CACHE VERSION URL--- ### | |
### ---CACHE HEADER CONTROL--- ### |
This file contains hidden or 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
<IfModule mod_headers.c> | |
# Disable caching by sending no-cache headers | |
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0" | |
Header set Pragma "no-cache" # Adds compatibility for older HTTP 1.0 caches | |
Header set Expires 0 | |
</IfModule> |
OlderNewer