Skip to content

Instantly share code, notes, and snippets.

@qbmarketing
qbmarketing / gist:2490769
Created April 25, 2012 15:44
JS for qtip
Am i close???
Page in question: http://new.cps.ca/en/grants-bourses/details/resident-advocacy-grant
What I have in the footer:
<script type="text/javascript">
$(document).ready(function() {
$('a.definition').qtip({
content: {
<a name="map"></a>
<div class="map-wrapper">
<div class="map-search">
{exp:gmap:search
channel="offices"
latitude_field="offices_latitude"
longitude_field="offices_longitude"
geocode_field="location"
@qbmarketing
qbmarketing / gist:2819196
Created May 28, 2012 13:32
new version of map page
<a name="map"></a>
<div class="map-wrapper">
<div class="map-search">
{exp:gmap:search
channel="offices"
latitude_field="offices_latitude"
longitude_field="offices_longitude"
geocode_field="location"
@qbmarketing
qbmarketing / gist:2937763
Created June 15, 2012 17:36
my usual htaccess file
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /
# Redirect www Requests
# ------------------------------
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
@qbmarketing
qbmarketing / gist:2937792
Created June 15, 2012 17:42
In-development htaccess to remove index.php, www AND switch to https
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /
# Redirect www Requests
# ------------------------------
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
@qbmarketing
qbmarketing / gist:3056280
Created July 5, 2012 20:38
Query for year list
{exp:query sql="SELECT DISTINCT cf_statements_sort_date FROM exp_channel_data WHERE channel_id = 53 AND field_id_291 = '{user_language}' ORDER BY cf_statements_sort_date DESC"}
<li><a href="{path='{segment_1}/{segment_2}/{cf_statements_order_date format="%Y"}'}">{cf_statements_order_date format="%Y"}</a></li>
{/exp:query}
{exp:transcribe:language_links}
{languages}
{if current == "en"}put your english images here{/if}
{if current == "fr"}put your french images here{/if}
{if current == "sp"}put your spanish images here{/if}
{/languages}
{/exp:transcribe:language_links}
@qbmarketing
qbmarketing / gist:4127411
Created November 21, 2012 20:22
copying fields in my form
Taking your advice to do it in jQuery, this is what I NOW have above the form:
<script type="text/javascript">
$(document).ready(function(){
$("input#same").click(function(){
if ($("input#same").is(':checked'))
{
// Checked, copy values
$("input#first_name").val($("input#order_first_name").val());
$("input#last_name").val($("input#order_last_name").val());
@qbmarketing
qbmarketing / gist:5068167
Created March 1, 2013 21:56
current htaccess file for eecms
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /
# Redirect www Requests
# ------------------------------
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]