Skip to content

Instantly share code, notes, and snippets.


Wayne Roddy dubrod

  • MODX
  • Huntsville, AL
View GitHub Profile
View modx-archivist-notes
Friendly URL container_suffix must = /
System Setting:
Key: archivist.archive_ids
name empty
namespace: archivist
area lexicon: furls
value: 18:arc_ (18 being resource id)
Archive Template ( needs to be container )
dubrod / modx-form-snips
Created Nov 30, 2018
collection of modx form snips
View modx-form-snips,-checkboxes-and-radios
dubrod / modx-parent-snips
Created Nov 30, 2018
collection of modx parent snippets
View modx-parent-snips
$output = '';
/* Get the current resource's 'parent' field */
$parentId = $modx->resource->get('parent');
/* Get the parent object */
$parentObj = $modx->getObject('modResource', $parentId);
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) ||
dubrod / Using Radio Buttons on Color Selector Plus for Magento
Last active Feb 19, 2018
Configurable.phtml File for Magento that will switch SELECT to RADIO Buttons. Some customization required. This is not an automated extension but rather a hack. Working on a live site and tested on Magento 1.7 -- Full Instructions will be available on our blog, This file is at: template/colorselectorplus/catalog…
View Using Radio Buttons on Color Selector Plus for Magento
$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
$swatch_attributes = Mage::helper('colorselectorplus')->getSwatchAttributes();
$title = Mage::getStoreConfig('color_selector_plus/colorselectorplusgeneral/title', Mage::app()->getStore());
$hide = Mage::getStoreConfig('color_selector_plus/colorselectorplusgeneral/hidedropdown', Mage::app()->getStore());
<?php if ($_product->isSaleable() && count($_attributes)): ?>
dubrod / modx-user-profile-photo
Last active Oct 7, 2016
4 part MODX User Profile Upload. Not 1 large script.
View modx-user-profile-photo
// == Script Origin and Discussion
// Used Oct 2016 on MODX 2.5
// == Form Markup
[[!UpdateProfile? &validate=`fullname:required,email:required:email` &preHooks=`UploadProfilePhoto`]]
<label for="Profile_Photos">Profile Photo <span class="error">[[!+fi.error.Profile_Photos]]</span></label>
<img src="[[+Profile_Photos:phpthumbof=`w=210&h=210`]]" />
<input id="Profile_Photos" name="Profile_Photos" type="file" value="[[+fi.Profile_Photos]]" maxlength="100000" />
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="[[+id]]">
<img src="[[+thumb]]" alt="">
dubrod / modx-user-dob-table
Last active Jul 6, 2016
Display a Table Count of Users by DOB
View modx-user-dob-table
$datearr = [];
$users = $modx->getIterator('modUser', array('active'=>'1'));
foreach ($users as $user) {
$profile = $user->getOne('Profile');
$dob = date("Y", $profile->get('dob'));
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
$year = date("Y");
$jerseyYS = 0;
$jerseyYM = 0;
$jerseyYL = 0;
$jerseyYXL = 0;
$jerseyAS = 0;
$jerseyAM = 0;
$jerseyAL = 0;
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
<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>
You can’t perform that action at this time.