Skip to content

Instantly share code, notes, and snippets.

View objectivehtml's full-sized avatar

Justin Kimbrell objectivehtml

  • Woodland Park, CO
View GitHub Profile
@objectivehtml
objectivehtml / gist:2491327
Created April 25, 2012 17:03 — forked from qbmarketing/gist:2490769
JS for qtip
<a href="#your-tooltip-id" class="definition">Show Tooltip</a>
<div class="ui-tooltip" id="your-tooltip-id">
<p>Some content goes here</p>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('a.definition').qtip({
content: {
$(document).ready(function() {
var params = {
//your params to change the tooltips go here
}
$('.tooltip').qtip(params);
});
@objectivehtml
objectivehtml / gist:2332488
Created April 7, 2012 22:27
Add custom API events to map markers with Google Maps for ExpressionEngine
// If you map id is "myMap" then this is what your code would look like.
//Use jQuery to execute your code after the DOM is ready
$(document).ready(function() {
var markers = myMap_markers;
var marker;
for(var i = 0; i < markers.length; i++) {
marker = markers[i];
@objectivehtml
objectivehtml / gist:2278099
Created April 1, 2012 19:48
Disable Info Windows Plugin
/**
* Customize Info Windows
*
* This plugins allows you to disable the infowindows or just parts
* of their functionality like edit and delete links.
*
* @package Google Maps for ExpressionEngine
* @subpackage JavaScript API
* @author Justin Kimbrell
* @copyright Copyright (c) 2012, Objective HTML
@objectivehtml
objectivehtml / gist:2237902
Created March 29, 2012 14:17
Return channel entries with all the categories grouped in a single category
SELECT GROUP_CONCAT(CONVERT(CONCAT(',', `exp_category_posts`.`cat_id`), CHAR(8)) SEPARATOR ' ') as `category_ids`
FROM `exp_channel_data`
LEFT JOIN `exp_category_posts` ON `exp_channel_data`.`entry_id` = `exp_category_posts`.`entry_id`
LEFT JOIN `exp_channel_titles` ON `exp_channel_data`.`entry_id` = `exp_channel_titles`.`entry_id`
GROUP BY `exp_channel_data`.`entry_id`
HAVING `category_ids` LIKE '%,10 %' AND `category_ids` LIKE '%,1 %'
LIMIT 0 , 30
@objectivehtml
objectivehtml / gist:2137320
Created March 20, 2012 15:46
Parsing Routes and Waypoints
{exp:channel:entries [your params here]}
<!-- This returns the first waypoint -->
{your_map_field parse="waypoints" limit="1" offset="0"}
{waypoints}
{waypoint:title}
{waypoint:content}
{waypoint:formatted_address}
@objectivehtml
objectivehtml / gist:1607083
Created January 13, 2012 15:53
A simpe date comparison utility
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Simple Date Formatting Plugin
*
* @package ExpressionEngine
* @category Plugin
* @author Justin Kimbrell
* @copyright Copyright (c) 2012, Justin Kimbrell
* @link http://objectivehtml.com/
{exp:date_format:future_entries date="01/01/2013"}
If the date is in the future, the tagdata is returned.
{/exp:date_format:future_entries}
@objectivehtml
objectivehtml / gist:1565549
Created January 5, 2012 14:47
Using Google Maps for ExpressionEngine with an accordion
<!-- This goes in the document HEAD and will add an additional click event to the objects with a class of 'trigger' -->
<script type="text/javascript">
/* By using the $(document).ready() function, we can ensure this JavaScript gets loaded after all the global map variables are set. */
$(document).ready(function() {
$('.trigger').click(function() {
var $t = $(this);
@objectivehtml
objectivehtml / gist:1534699
Created December 29, 2011 15:56
Simple EE Class interacting with Channel Data
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Email_Template {
public $to,
$from,
$cc,
$bcc,
$channel_id,
$categories,