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
/** | |
* Excerpt | |
* | |
* Creates intro excerpts from long passages of text like a Ninja. | |
* | |
* @category snippet | |
* @version 1.0 | |
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL) | |
* @autohor Kevin Marvin, Ryan Thrash | |
* @internal @modx_category Content |
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 | |
$output = $this->modx->documentOutput; | |
$pattern = '/<a[^>]*>/'; | |
preg_match_all($pattern, $output, $matches); | |
$matches = array_pop($matches); | |
$replace = array(); | |
foreach($matches as $key => $match) { |
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 a.* | |
from Trucks t | |
inner join Boxes b on t.id = b.truck_id | |
inner join Apples a on b.id = a.box_id | |
where t.owner_id = 34 |
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
/* | |
Makes sense. From http://oppugn.us/posts/1287608776.html | |
*/ | |
body { | |
width: 960px; | |
margin-left: auto; | |
margin-right: auto; | |
} |
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 getLinkscape() { | |
lastRow = FindRows(); | |
startRow = lastRow + 1; | |
var active_spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var utility_sheet = active_spreadsheet.getSheetByName("Utilities"); | |
params = utility_sheet.getRange(5,3,7,3).getValues(); | |
url = params[2][0]; | |
AccessID = params[0][0]; | |
secret = params[1][0]; | |
method = "HMAC_SHA_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
jQuery.fn.quickpaginate = function (settings) { | |
settings = jQuery.extend({ | |
perpage: 6, | |
pager: null, | |
showcounter: true, | |
prev: "qp_next", | |
next: "qp_prev", | |
pagenumber: "qp_pagenumber", | |
totalnumber: "qp_totalnumber", | |
counter: "qp_counter" |
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
$failedDays = floor((strtotime("now") - strtotime($subscription->transaction_date)) / (60 * 60 * 24)); | |
if (date("Y-m-d",strtotime("now")) == date("Y-m-d", strtotime($subscription->end_date))) { | |
if (($failedDays % $billingReminderFrequencyInDays) == 0) { | |
if (in_array(date("j"),$updatePaymentMethodReminderDaysOfTheMonth)) { |
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 | |
// &file=`assets/foo/bar.php` indicates the file to include | |
// &return=`1` return explicit content from return statement in included file | |
// default behavior is to use output buffering to capture the content from the include | |
$output = ''; | |
if (isset($file) && file_exists($modx->config['base_path'] . $file)) { | |
if (!isset($return) || $return == false) { | |
ob_start(); | |
include ($modx->config['base_path'] . $file); |
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
Workflow | |
Who can Publish | |
- list groups (if checked, checks all users below) | |
- list users | |
Allowed Status' | |
- list status here [raw, for editor, for publisher] | |
"Raw" Status |
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
[ { "desc" : "Use the default parameter to have this Snippet redirect to the Resource specified in cases where there is no children. It can be a Resource ID or one of : site_start, site_unavailable_page, error_page, unauthorized_page.", | |
"desc_trans" : "Use the default parameter to have this Snippet redirect to the Resource specified in cases where there is no children. It can be a Resource ID or one of : site_start, site_unavailable_page, error_page, unauthorized_page.", | |
"lexicon" : null, | |
"menu" : null, | |
"name" : "default", | |
"options" : "", | |
"overridden" : false, | |
"value" : "site_start", | |
"xtype" : "textfield" | |
}, |