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 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 |
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 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; | |
} |
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
<script src="assets/js/jrespond.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// call jRespond and add breakpoints | |
var jRes = jRespond([ | |
{ | |
label: 'handheld', | |
enter: 0, | |
exit: 600 | |
},{ |
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 sessions_end($session) | |
{ | |
if ($session->userdata['can_access_cp'] === 'y') { | |
$new_global_vars['gv_can_preview'] = TRUE; | |
} else { | |
$new_global_vars['gv_can_preview'] = 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
{embed="_layouts/blog" | |
blog_title="Extend" | |
blog_slug="extend" | |
blog_category_id="126" | |
blog_description="Code & Technology" | |
blog_description_more="our thirty foot view. Primarily written by/for Ruby, iOS, and front-end developers." | |
meta_description="Viget’s Extend blog: discussing all things code & technology including build-out, ExpressionEngine, development, coding best practices, and Ruby on Rails." | |
rss="{gv_extend_feed}" | |
} |
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 | |
if(empty($_SERVER['HTTP_X_REQUESTED_WITH'])) { | |
$config['show_profiler'] = (ENV === 'local') ? 'y' : 'n'; | |
$config['template_debugging'] = (ENV === 'local') ? 'y' : 'n'; | |
} |
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 clean_whitespace() { | |
$tagdata = $this->EE->TMPL->tagdata; | |
$tagdata = trim($tagdata); | |
$tagdata = preg_replace('/\s+/', ' ', $tagdata); | |
$tagdata = str_replace("\t", " ", $tagdata); | |
return $tagdata; | |
} |
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
/** | |
* @name jQuery List to Select Plugin | |
* @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 ListSelect = function(elem, options) { |
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
Output the picturefill HTML, so you don't have to repeat it all over the templates. | |
- Param: big_img, src for big image | |
- Param: small_img, src for small image | |
- Param: alt, alt attribute for image | |
- Param: media_query, media query to use, defaults to (min-width: 600px) | |
- Param: class, class for wrapper, defaults to hero | |
Example Usage: | |
{exp:vl:picturefill | |
big_img="{custom_field_name}" |
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
Installing nokogiri (1.5.5) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/tdavis/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb | |
checking for libxml/parser.h... *** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more | |
details. You may need configuration options. | |
Provided configuration options: |