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 | |
/** | |
* @package visioncart | |
*/ | |
$vc =& $modx->visioncart; | |
# !!! FIXED: Fixed statement to be !isset rather then isset | |
##################################################### | |
if (!isset($scriptProperties['id']) || !is_numeric($scriptProperties['id'])) { |
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
/* | |
Quick plugin I just wrote to redirect querystring based uri's used in old site to new modx resource location. | |
Not intended to be anything more then a quick fix until search engines are no longer indexing the old links. | |
Might be useful in helping someone learn how to write a dynamic 301 redirect | |
*/ | |
/* | |
NOTE: For a more robust controller I would recommend you checkout http://modx.com/extras/package/simplxcontroller by larscwallin | |
*/ |
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
$min = 0; | |
$max = 10000000; | |
$input = $modx->getOption('input',$scriptProperties,null); | |
if(($input) && ($input != '')){ // used when used as output filter | |
$nums = explode(',',$input); | |
if($nums[0] != '' && is_numeric($nums[0])){ | |
$min = intval($nums[0]); | |
} |
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 Revo indexer plugin. Allows fast TV filter searches using custom snippet (not included) | |
* | |
* License: public domain | |
* | |
* Created by: Jeroen Kenters / www.kenters.com | |
* First released: 2012-02-21 (yyyy-mm-dd) | |
* | |
* !!!!!!!Important!!!!!!! |
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
$(function(){ | |
$('#jqt').ajaxComplete(function(){ | |
add_ga(); // add google analytics on each page load | |
}); | |
$(document).ready(function() { | |
add_ga(); // add google analytics to the first page | |
}); | |
function add_ga() { |
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 | |
/* LangRouter | |
* ========== | |
* | |
* This plugin is meant to be used with Babel extra for MODX Revolution. It | |
* takes care of switching contexts, which hold translations, depending on URL | |
* requested by client. LangRouter works with so called subfolder based setup, | |
* in which many languages are served under a single domain but are | |
* differentiated by a virtual subfolder indicating the language, eg. | |
* mydomain.com/pl/. |
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 | |
/** | |
* Example of how to fetch your own db table records cached, without using the snippet cached. | |
* | |
* Useful when the user can filter the data, like in a seach engine | |
* | |
* @package yourpackage | |
*/ | |
$yourpackage = $modx->getService('yourpackage','yourpackage',$modx->getOption('yourpackage.core_path',null,$modx->getOption('core_path').'components/yourpackage/').'model/yourpackage/',$scriptProperties); |
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
$dontRem = array('web','mgr'); /* add any additional context you dont wish to have removed here */ | |
$contexts = $modx->getCollection('modContext'); | |
foreach($contexts as $ctx){ | |
$key = $ctx->get('key'); | |
if(!in_array($key,$dontRem)) { | |
$response = $modx->runProcessor('context/remove',array('key'=>$key)); | |
if ($response->isError()) { | |
echo $response->getMessage() . '<hr/>'; |
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
$dontRem = array('adam','admin'); /* add any additional context you dont wish to have removed here */ | |
$users = $modx->getCollection('modUser'); | |
foreach($users as $user){ | |
$id = $user->get('id'); | |
$name = $user->get('username'); | |
if(!in_array($name,$dontRem)) { | |
$response = $modx->runProcessor('security/user/delete',array('id'=>$id)); | |
if ($response->isError()) { | |
echo $response->getMessage() . '<hr/>'; |
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 | |
/** | |
* ========================= | |
* defaultTemplateByParentTv | |
* ========================= | |
* | |
* Plugin for modX Revolution | |
* Set default template for children of a ressource | |
* | |
* Author: |
OlderNewer