This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get a users first name from the full name | |
* or return the full name if first name cannot be found | |
* e.g. | |
* James Smith -> James | |
* James C. Smith -> James | |
* Mr James Smith -> James | |
* Mr Smith -> Mr Smith |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Stripped down for brevity | |
class BPlugin { | |
public function init () { | |
// Trigger Google Shopping updates | |
// ===================================================================== | |
if (!craft()->config->get('devMode')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# _partials/blocks/blocks.html #} | |
{# | |
Blocks component | |
Outputs a matrix field blocks, intelligently wrapping blocks that need to be inset from the edges | |
@param {object} contentBlocks (MatrixBlockModel) | |
#} | |
{# Parameters #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Global template | |
{exp:nsm_better_meta:template} | |
// Page template | |
{embed="_embeds/start" | |
entry_id="{entry_id}" | |
description="Bar" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:stash:set_list name="venues" parse_tags="yes" parse_conditionals="yes" trim="yes"} | |
{exp:channel:entries channel="events" dynamic="no" show_future_entries="yes"} | |
{if cf_events_place} | |
{stash:venue_title}{cf_events_place}{title}{/cf_events_place}{/stash:venue_title} | |
{stash:venue_id}{cf_events_place}{entry_id}{/cf_events_place}{/stash:venue_id} | |
{/if} | |
{/exp:channel:entries} | |
{/exp:stash:set_list} | |
<select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:low_events:calendar | |
events_field="cf_events_date_time" | |
date="{freebie_4}" | |
} | |
<table class="calendar" cellspacing="0" cellpadding="0"> | |
<thead> | |
<tr id="month_pager"> | |
<th colspan="1" class="previous"><a href="{structure:page:uri} | |
on/{prev_month_url}" title="{prev_month format='%F %Y'}">←</a></th> | |
<th colspan="5" class="month_title"><a href="{structure:page:uri} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ct.entry_id, ct.title, ct.url_title, cd.field_id_344 as cf_places_latitude, cd.field_id_345 as cf_places_longitude, ROUND( '3959' * acos( cos( radians('51.494737') ) * cos( radians( cd.field_id_344 ) ) * cos( radians( cd.field_id_345 ) - radians('-0.146358') ) + sin( radians('51.494737') ) * sin( radians( cd.field_id_344 ) ) ), '2' ) AS distance | |
FROM exp_channel_data as cd | |
LEFT JOIN exp_channel_titles as ct ON ct.entry_id = cd.entry_id | |
WHERE ct.channel_id IN ('2') | |
AND ct.entry_id != '12' | |
HAVING distance < '1' | |
ORDER BY distance desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hidden form on checkout page | |
<div style="display: none"> | |
{exp:cartthrob:save_customer_info_form | |
return="" | |
id="customer_form" | |
} | |
<input type="hidden" name="country_code" id="hidden_country" value="" /> | |
{/exp:cartthrob:save_customer_info_form} | |
</div> |
NewerOlder