Skip to content

Instantly share code, notes, and snippets.

Nathan Parikh nathanp

View GitHub Profile
@nathanp
nathanp / Button that links to Connect Group report.lava
Created Feb 12, 2019
Only visible if the current person is a leader of the group being viewed. Relies on query strings.
View Button that links to Connect Group report.lava
@nathanp
nathanp / Connect Group Follow Up.lava
Last active Feb 12, 2019
Follow up for Connect Group Leaders
View Connect Group Follow Up.lava
<script src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready( function () {
$('#CGFollowUp').DataTable( {
paging: false,
"searching": false,
"order": [3, 'asc'],
"info": false
} );
} );
@nathanp
nathanp / pathway.lava
Last active Feb 6, 2019
RockRMS - Discipleship Pathway
View pathway.lava
<div class="row">
<div class="col-sm-12">
<div class="persondetails-group">
<header>
<h1>Hallmark's Discipleship Pathway</h1>
</header>
</div><!-- .persondetails-group-->
</div>
View Listing Events via Attribute.lava
<div class="panel panel-block">
<div class="panel-heading">
<h4 class="panel-title">Important Events</h4>
</div>
<div class="">
{% eventcalendaritem where:'EventCalendarId == 1' %}
<ul class="list-group list-group-panel">
{% for eventcalendaritem in eventcalendaritemItems %}
{% if eventcalendaritem.EventItem.IsActive == true %}
{% assign level = eventcalendaritem | Attribute:'EventLevel' %}
@nathanp
nathanp / Adult Connect Groups Count.lava
Last active May 3, 2018
RockRMS - Metric SQL and Lava
View Adult Connect Groups Count.lava
{% assign previousSunday = 'Now' | SundayDate | DateAdd:-7 | Date:'M/dd/yyyy' %}
Metric Date: {{ previousSunday }}
<br />
{% group where:'ParentGroupId == 49 || ParentGroupId == 10603 && IsActive == true' %}
{% for group in groupItems %}
{% attendance where:'DidAttend == true && GroupId == {{ group.Id }} && SundayDate == "{{ previousSunday }}"' count:'true' %}
{% if count > 0 %}
Metric Partition: {{ group.Name }}
<br />
Metric Value: {{ count }}
View dl-file.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# BEGIN THIS DL-FILE.PHP ADDITION
@nathanp
nathanp / dl-file.php
Last active Apr 5, 2017
File that helps restrict access to uploads in a specific folder. Use in conjunction with .htaccess file - https://gist.github.com/nathanp/02a615fbc7e8bac6ca139c6c3bea38e7
View dl-file.php
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
* @link https://gist.github.com/hakre/1552239
*
* @author Nathan Parikh <https://ndzynes.com/>
You can’t perform that action at this time.