Skip to content

Instantly share code, notes, and snippets.

@dmmoelle
dmmoelle / gist:11046302
Last active August 29, 2015 14:00
add custome field to NationBuilder
<div class="row-fluid">
<div class="span6"><label for="dob">Date of Birth</label>{% text_field "custom_values.date_of_birth", class:"text" %}</div>
</div>
<script>
document.write(screen.width);
if (screen.width < 980) {
IWidth = screen.width;
} else { IWidth = 980 }
document.write('<iframe src="https://mapsengine.google.com/map/embed?mid=zv4x1F3xtt1A.kNa-SYOcLRXY" width="'+IWidth+'" height="680"></iframe>' );
</script>
@dmmoelle
dmmoelle / gist:434a27ae635e215d31e5
Created December 17, 2014 22:09
Find beginning of week date
var someDate = new Date();
var n = someDate.getDay();
someDate.setDate(someDate.getDate()-n);
var dd = someDate.getDate();
var mm = someDate.getMonth() + 1;
var y = someDate.getFullYear();
var someFormattedDate = mm + '/'+ dd + '/'+ y;
alert('start week: '+someFormattedDate);
SELECT
o.user_id,
o.timestamp,
(select user_login from wp_users where id = o.user_id limit 1) as user_login,
(select user_email from wp_users where id = o.user_id limit 1) as user_email,
(select name from wp_pmpro_membership_levels where id = o.membership_id limit 1) as level,
o.total,
(select meta_value from wp_usermeta where user_id = o.user_id and meta_key = 'last_name' limit 1) as last_name,
(select meta_value from wp_usermeta where user_id = o.user_id and meta_key = 'first_name' limit 1) as first_name,
(select meta_value from wp_usermeta where user_id = o.user_id and meta_key = 'pmpro_saddress1' limit 1) as address,
@dmmoelle
dmmoelle / membershipquery.php
Created January 2, 2018 20:47
how do I pass the value form the sdate form input on line 20 into the sql query on line 85
<?php
/*
Plugin Name: Member payment report
Plugin URI: http://www.michiganjaycees.org
Description: this is a report showing the payments that have processed
Author: Dan Moellering
Version: .1
Author URI: http://mdmnow.com
*/
add_action('admin_menu', 'member_payment_report_action');
@dmmoelle
dmmoelle / membershipquery.php
Created January 2, 2018 20:47
how do I pass the value form the sdate form input on line 20 into the sql query on line 85
<?php
/*
Plugin Name: Member payment report
Plugin URI: http://www.michiganjaycees.org
Description: this is a report showing the payments that have processed
Author: Dan Moellering
Version: .1
Author URI: http://mdmnow.com
*/
add_action('admin_menu', 'member_payment_report_action');