View Standard.json
{ | |
"buttons": [ | |
"html", | |
"formatting", | |
"bold", | |
"italic", | |
"unorderedlist", | |
"orderedlist", | |
"link", | |
"image", |
View external-links.js
module.exports = { | |
init: function() { | |
this.setVars(); | |
this.addAttributes(); | |
}, | |
setVars: function() { | |
this.links = document.querySelectorAll('a[href^="http"]:not([href^="' + window.location.origin + '"])'); | |
}, |
View gist:2b3488fe9587be959a46
<?php | |
public function getEmbedCode($url) | |
{ | |
if (strpos($url, 'youtube') !== FALSE) { | |
$url_parts = parse_url($url); | |
parse_str($url_parts['query'], $segments); | |
return '//www.youtube.com/embed/' . $segments['v']; | |
} else if (strpos($url, 'vimeo') !== FALSE) { |
View gist:9621117
var $body = $('body'); | |
if (!$body.hasClass('whatever')) { | |
var header_wrap = $('#header-wrap'); | |
var sticky_navigation_offset_top = header_wrap.offset().top; | |
var sticky_navigation = function() { | |
var scroll_top = $(window).scrollTop(); | |
if (scroll_top > sticky_navigation_offset_top) { |
View pi.php
<?php | |
public function in_array() | |
{ | |
$haystack = $this->EE->TMPL->fetch_param('haystack', NULL); | |
$needle = $this->EE->TMPL->fetch_param('needle', NULL); | |
if ($haystack === NULL || $needle === NULL) { | |
return; | |
} |
View jquery.tabs.js
/** | |
* @name jQuery Tabs | |
* @author Trevor Davis | |
* @copyright (cc) Trevor Davis (http://www.viget.com) | |
* | |
* Licensed under the CC-GNU GPL (http://creativecommons.org/licenses/GPL/2.0/) | |
*/ | |
;(function($, window, document, undefined) { | |
var Tabs = function(elem, options) { |
View pi.auto_link.php
/** | |
* Add http:// to links if there isn't one | |
*/ | |
public function auto_link() { | |
$url = $this->EE->TMPL->fetch_param('url', NULL); | |
if ($url) { | |
$http = stripos($url, 'http://'); | |
$https = stripos($url, 'https://'); |
View pi.auto_link.php
/** | |
* Add http:// to links if there isn't one | |
*/ | |
public function auto_link() { | |
$url = $this->EE->TMPL->fetch_param('url', NULL); | |
if ($url) { | |
$http = stripos($url, 'http://'); | |
$https = stripos($url, 'https://'); |
View Ftp.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
require_once(BASEPATH . 'libraries/Ftp.php'); | |
class EE_FTP extends CI_FTP { | |
var $timeout = 90; | |
/** | |
* FTP Connect |
View modulo-plugin.php
<?php | |
public function modulo() | |
{ | |
$numerator = $this->EE->TMPL->fetch_param('numerator', '1'); | |
$denominator = $this->EE->TMPL->fetch_param('denominator', '1'); | |
$denominator = ($denominator == 0) ? 1 : $denominator; | |
return $numerator % $denominator; | |
} |
NewerOlder