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
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> | |
<input type="hidden" name="business" value="[Your Secure Merchant ID]" > | |
<input type="hidden" name="cmd" value="_donations" > | |
<input type="hidden" name="item_name" value="[Donation Description]" > | |
<input type="hidden" name="return" value="http://yourdomain.com/thank-you" > | |
<div> | |
<label for="amount">Donation Amount:</label> | |
<input name="amount" type="text" id="amount" > | |
</div> | |
<input name="submit" type="submit" value="Donate" > |
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
yii\base\ErrorException: Illegal offset type in /path/to/plugin/kgrote/siteutilities/src/fields/Regionselect.php:95 | |
Stack trace: | |
#0 /path/to/site/craft/vendor/craftcms/cms/src/web/ErrorHandler.php(76): yii\base\ErrorHandler->handleError(2, 'Illegal offset ...', '/Users/kristeng...', 95) | |
#1 /path/to/plugin/kgrote/siteutilities/src/fields/Regionselect.php(95): craft\web\ErrorHandler->handleError(2, 'Illegal offset ...', '/Users/kristeng...', 95, Array) | |
#2 /path/to/site/craft/vendor/craftcms/cms/src/base/Element.php(1936): loveco\siteutilities\fields\Regionselect->normalizeValue(Array, Object(craft\elements\Entry)) | |
#3 /path/to/site/craft/vendor/craftcms/cms/src/base/Element.php(793): craft\base\Element->normalizeFieldValue('region') | |
#4 /path/to/site/craft/vendor/yiisoft/yii2/base/ArrayableTrait.php(126): craft\base\Element->__get('region') | |
#5 /path/to/site/craft/vendor/craftcms/cms/src/web/View.php(504): yii\base\Model->toArray(Array, Array, false) | |
#6 /path/to/site/craft/vendor/craftcms/cms/src/helpers/ElementHe |
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 | |
public function normalizeValue($value, ElementInterface $element = null) | |
{ | |
$opts = $this->setOptions(); | |
$value = array | |
( | |
'value' => $value, | |
'label' => $opts[$value] |
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
<form name="catmenu" action=""> | |
<label for="cat-select">Choose A Category</label> | |
<select id="cat-select" name="selcat"> | |
<option value="">-- Select --</option> | |
{exp:channel:categories channel="mychannel" disable="category_fields" style="linear"} | |
{if parent_id == '0'} | |
<option value="{path='mychannel'}">{category_name}</option> | |
{/if} | |
{if parent_id != '0'} | |
<option value="{path='mychannel'}" class="subcat">↳ {category_name}</option> |
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
<a href="https://vimeo.com/180766765">Watch Video</a> | |
<div id="video-wrap"></div> | |
<script> | |
$('a').on('click', function(e){ | |
e.preventDefault(); | |
var videoUrl = $(this).attr('href'); | |
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
<a href="https://vimeo.com/181033143">Link!</a> | |
Becomes: | |
<a href="http://192.168.1.123:8005/https://vimeo.com/181033143">Link!</a> |
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
<(p|ul|ol|h1|h2|h3|h4|h5|h6|div|table|blockquote)>[.\S\s]*?<\/(p|ul|ol|h1|h2|h3|h4|h5|h6|div|table|blockquote)> |
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
{# 'groupname' is the shortname of your category group #} | |
{% for category in entry.groupnameCategories %} | |
{{ category.title }} | |
{{ category.slug }} | |
{% endfor %} |
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
var exceptedLinks = [ | |
'.webinars .banner .share a', | |
'.someotherlink' | |
] | |
$('a').each(function() { | |
var link = $(this); | |
excepted = false; | |
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
$('a').each(function() { | |
// get this site's URL | |
var a = new RegExp('/' + window.location.host + '/'); | |
// check if the link is an actual web link | |
if(this.href.match(/^http/)){ | |
// check if the link contains this site's URL | |
if(!a.test(this.href)) { | |
$(this).click(function(event) { | |
event.preventDefault(); |
NewerOlder