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-parent-snips
Created Nov 30, 2018
collection of modx parent snippets
View modx-parent-snips
GetParentAlias
$output = '';
/* Get the current resource's 'parent' field */
$parentId = $modx->resource->get('parent');
/* Get the parent object */
$parentObj = $modx->getObject('modResource', $parentId);
@dubrod
dubrod / Call Google Geocoding API with jQuery
Created Aug 30, 2013
Call the Google Geocoding API with jQuery. Get the formatted address, the LAT & LONG, the County, all the official google map data for an address.
View Call Google Geocoding API with jQuery
<label>Street Address #: <small>123</small></label><br>
<input type="text" id="stAddNum"><br>
<label>Street Address Name: <small>Elm</small></label><br>
<input type="text" id="stAdd"><br>
<label>Address Type: <small>St, Ave, Ln, Rd, etc</small></label><br>
<input type="text" id="stAddPrefix"><br>
<label>City: </label><br>
<input type="text" id="city"><br>
<label>State: <small>Abbreviation</small></label><br>
<input type="text" id="state"><br>
@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) ||
@dubrod
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, http://www.revitalagency.com/blog This file is at: template/colorselectorplus/catalog…
View Using Radio Buttons on Color Selector Plus for Magento
<?php
$_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)): ?>
<dl>
@dubrod
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
// https://forums.modx.com/thread/?thread=80740&page=2
// 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
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^
`
]]
You can’t perform that action at this time.