Skip to content

Instantly share code, notes, and snippets.

Wayne Roddy dubrod

  • MODX
  • Inverness, FL
Block or report user

Report or block dubrod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dubrod
dubrod / modx-youtube-api
Created Oct 5, 2016
Pass a you Video ID or comma separated string of IDS to output a thumbnail and title and a link
View modx-youtube-api
//chunk youtube-video-tpl
<div class="col-1-3">
<a class="mediabox" rel="ytv" href="http://www.youtube.com/embed/[[+id]]">
<img src="[[+thumb]]" alt="">
<h3>[[+title]]</h3>
</a>
</div>
//Snippet
<?php
@dubrod
dubrod / modx-user-dob-table
Last active Jul 6, 2016
Display a Table Count of Users by DOB
View modx-user-dob-table
//SNIPPET
$datearr = [];
$users = $modx->getIterator('modUser', array('active'=>'1'));
foreach ($users as $user) {
$profile = $user->getOne('Profile');
$dob = date("Y", $profile->get('dob'));
@dubrod
dubrod / modx-active-users-plus-extended-fields-snippet
Created Jul 6, 2016
Get MODX Active Users and Create a Table based on Extended Fields
View modx-active-users-plus-extended-fields-snippet
//SNIPPET
$year = date("Y");
$jerseyYS = 0;
$jerseyYM = 0;
$jerseyYL = 0;
$jerseyYXL = 0;
$jerseyAS = 0;
$jerseyAM = 0;
$jerseyAL = 0;
@dubrod
dubrod / Not a full script - pieces of example
Created Jun 1, 2016
MODX - Register - DOB done on Frontend
View Not a full script - pieces of example
<section>
<label>Birth Date </label>
<select id="birthMonth">
<option value="0">January</option>
<option value="1">February</option>
<option value="2">March</option>
<option value="3">April</option>
<option value="4">May</option>
<option value="5">June</option>
<option value="6">July</option>
@dubrod
dubrod / MODX - Register Quickstart
Last active Jun 1, 2016
MODX - Register Quickstart
View MODX - Register Quickstart
[[!Register?
&submittedResourceId=`1`
&validate=`
fullname:required,
email:email:required,
username:required:minLength=^6^,
password:required:minLength=^6^
`
]]
@dubrod
dubrod / Commonly Used Context Variable Examples
Created Feb 3, 2016
Commonly Used Context Variable Examples for use in my Public Snapshots
View Commonly Used Context Variable Examples
<footer>
<h3>[[++site_name]]</h3>
<p>[[++site_desc]]</p>
<h3 class="mt1">Phone</h3>
<p>[[++site_phone]]</p>
<small class="m1">[[++site_copyright]]</small>
</footer>
@dubrod
dubrod / Commonly Used Content Tags in MODX
Created Feb 3, 2016
Commonly Used Content Tags in MODX used in my Public Snapshots
View Commonly Used Content Tags in MODX
[[$header]]
<h1>[[*longtitle]]</h1>
[[*content]]
[[$footer]]
@dubrod
dubrod / Commonly Used MODX Head Tags
Last active Jan 7, 2019
Commonly Used MODX Head Tags for use in my Public Snapshots
View Commonly Used MODX Head Tags
<title>[[*pagetitle]]</title>
<title>[[*longtitle:default=`[[*pagetitle]]`]]</title>
<meta name="description" content="[[*description]]">
<meta name="keywords" content="[[*keywords]]">
<meta itemprop="url" content="[[~[[*id? &scheme=`full`]]]]">
<meta itemprop="name headline" content="[[*pagetitle]]">
<meta itemprop="description" content="[[*description]]">
<meta itemprop="image" content="">
<!-- Twitter -->
@dubrod
dubrod / gist:3e6276350bd5ee27f232
Created Dec 14, 2015
Firebase DB to Static File for React JS
View gist:3e6276350bd5ee27f232
// first you have included your FireBase client JS
var leaguesNode = new Firebase("https://XXXX.firebaseio.com/Leagues");
jsonLeagues = '{"leagues": []}';
leaguesNode.once("value", function(snapshot) {
snapshot.forEach(function(childSnapshot) {
var key = childSnapshot.key();
var val = childSnapshot.val();
@dubrod
dubrod / jquery-device-detect
Created Jun 17, 2014
jQuery Device Detect via User Agent
View jquery-device-detect
//touch/mobile detection
if (
navigator.userAgent.match(/Phone/i) ||
navigator.userAgent.match(/DROID/i) ||
navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/) ||
navigator.userAgent.match(/Windows Phone/i) ||
You can’t perform that action at this time.