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
$pattern = '/(?(?=<\S*>)<\S*>|)\s*(\[[a-z|A-Z|-|\/|\s|\"|\=]*\])\s*(?(?=<\/\S*>)<\/\S*>|)/'; | |
$html = '<p> | |
[highlight type="note"]You and your confinement nanny are bound by the basic Work Permit conditions. For example, the nanny cannot work for other employers in an occupation other than that stated in the Work Permit.[/highlight]</p>'; | |
$filtered = preg_replace($pattern, '$1', $html); | |
// Returns | |
/* |
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
<blockquote> | |
<p>Written with <a href="https://stackedit.io/">StackEdit</a>.</p> | |
</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
// Create transport if the browser can provide an xhr | |
if ( xhrSupported ) { | |
jQuery.ajaxTransport(function( options ) { | |
// Cross domain only allowed if supported through XMLHttpRequest | |
if ( !options.crossDomain || support.cors ) { | |
var callback; | |
return { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Twitter Search Plugin</title> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="jquery.twitter.js"></script> | |
<style type="text/css"> | |
.twitter-posts li {margin-bottom: 10px; font-size: 12px; clear: both; list-style-type:none;} | |
.twitter-posts li img {float:left; width: 48px; margin:0px 10px 10px 0px;border:1px solid #c2c2c2; -moz-box-shadow: 0px 0px 4px #c2c2c2; -webkit-box-shadow: 0px 0px 4px #c2c2c2; box-shadow: 0px 0px 4px #c2c2c2;} | |
.twitter-posts li a {text-decoration:none; color: #009;} |
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:freeform:form form_name="tellafriend" required="name|email|senderemail" | |
send_user_email="yes" user_email_template="tellafriend" template="brief_version" return="seaawards/nominate/thankyou"} | |
<fieldset> | |
<label for="name">Your Name</label> | |
<input type="text" name="name" id="name" value="{if screen_name!=''}{screen_name}{/if}" /> | |
</fieldset> | |
<fieldset> | |
<label for="senderemail">Your Email Address</label><input type="text" name="senderemail" id="senderemail" value="{email}" /> |
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
// Ipad Iphone | |
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))||(navigator.userAgent.match(/Android/i))) { | |
var isTouchScreen = 1; | |
}else{ | |
var isTouchScreen = 0; | |
} | |
$container.bind('touchstart', function(e){ | |
var cpos = dragPosition; |
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
// Sammy Routes for Expression Engine | |
this.get('#/', function(context) { | |
this.partial('{path=sammy/home}'); | |
context.app.swap(); | |
}); | |
this.get('#!/:url', function(context) { | |
this.partial('{path=sammy}/'+this.params['url']); | |
}); |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>Doodle.js Demo - Bouncy Balls</title> | |
<!--[if IE]> | |
<script type="text/javascript" src="http://explorercanvas.googlecode.com/svn/trunk/excanvas.js"></script> | |
<![endif]--> | |
<script type="text/javascript" src="http://cloud.github.com/downloads/biilly/doodle.js/doodle-0.1.1.min.js"></script> |
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
#!/bin/env ruby | |
if ARGV.empty? | |
$stderr.puts <<-EOM | |
ExpressionEngine (1.x) MYSQL DUMP Localizer | |
1. Reads MYSQL DUMP of ExpressionEngine website from STDIN | |
2. Replaces ALL HOSTNAME & PATH data (config) with LOCAL SETTINGS | |
3. Output corrected MYSQL DYMP file. |
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 | |
/** | |
* Custom configuration bootsrtap file for ExpressionEngine | |
* | |
* Place config.php in your site root | |
* Add require(realpath(dirname(__FILE__) . '/../../config.php')); to the bottom of system/expressionengine/config/config.php | |
* Add require(realpath(dirname(__FILE__) . '/../../config.php')); to the bottom of system/expressionengine/config/database.php | |
* If you have moved your site root you'll need to update the require_once path | |
* |
OlderNewer