Skip to content

Instantly share code, notes, and snippets.

View objectivehtml's full-sized avatar

Justin Kimbrell objectivehtml

  • Woodland Park, CO
View GitHub Profile
(function() {
"use strict";
Timeblocker.Storage.Base = Marionette.Controller.extend({
// The core localStorageDb object
api: false,
// Table columns
{exp:channel_search:results id="Clubs" orderby="distance" sort="asc" limit="1000"}
{if has_searched}
{club_latitude}
{club_longitude}
{/if}
{if has_not_searched}
<?php
public function trigger($data, $member_id)
{
// The $data variable contains the member data passed by the hook itself
// The $member_id available is also available.
// Lets say you want to pass additional data to the template aside
// from the member data already given to you. So...
// Assign the data var to a new variable name, I like to use $parse_vars
<?php
// This is a module method. Use it like so...
// {exp:module_name:class_achievements course_url_title="{segment_3}"}
public function class_achievements()
{
// Course is a model I created. findUrlTitle() is an inherited static method
if(!$course = Course::findByUrlTitle($this->param('course_url_title')))
{
// If no course is found, return the noResults() method.
$.fn.markerList = function(options) {
var titles = {};
var geocoder = new google.maps.Geocoder();
var _default = {
map: {},
bounds: new google.maps.LatLngBounds(),
lat: false,
lng: false,
<?php
public function notification_action()
{
$this->EE->load->library('postmaster_notification', array(
'base_path' => PATH_THIRD.'postmaster/notifications/'
));
$id = $this->EE->input->get_post('id');
$subject = 'your_col_name';
$has_no_value = TRUE;
foreach($array as $index => $value)
{
if($index == $subject && !empty($value))
{
$has_no_value = FALSE;
}
<?php
class Addon_name {
public function __construct()
{
$this->EE->load->add_package_path(PATH_THIRD . 'channel_data');
$this->EE->load->driver('channeldata', array(
'directories' => array(
PATH_THIRD . 'addon_name/models'
<?php
/*
* An proposed spec for Channel Data v1.0
* Inspired by Eloquent ORM
*/
// Event is a channel. Basically you create a model per channel. Each model is just a class.
// The only thing that is required to be set in the class is the $channel property.
$entry = new Event();
@objectivehtml
objectivehtml / index.html
Created November 11, 2013 22:13
Channel Search - Search by Categories
<h3>Categories</h3>
{exp:channel_search:form id="Category Search" method="post"}
<ul>
{categories}
<li><label><input type="checkbox" name="category[]" value="{category_url_title}" {checked} /> {category_name}</label></li>
{/categories}
</ul>