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
/** | |
* jQuery Plugin: Table of Contents with Smooth Scrolling | |
* @link http://www.1stwebdesigner.com/css/jquery-plugin-smooth-scrolling/ | |
* @author Rochester Oliveira | |
*/ | |
(function($){ | |
$.fn.stoc = function(options) { | |
//Our default options | |
var defaults = { |
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
<body lang="en" class="sticky-frame"> | |
<header id="header" class="sticky-row"> | |
<div class="center"> | |
<h1>Some Header</h1> | |
</div> | |
</header> | |
<div id="wrap" class="sticky-row sticky-expand"> | |
<div id="content-wrapper"> | |
<article id="content"> | |
<p>Some content</p> |
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
$(document).ready(function() { | |
$("#content img").wrap(function() { | |
return '<a href="'+ this.src +'" />'; | |
}).parent().fancybox(); | |
}); |
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 | |
/** | |
* @license The included classes have their own licenses | |
* @copyright (c) 2012 by goldsky <[email protected]> | |
*/ | |
class Utility { | |
public function __construct() {} |
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 ($modx->event->name !== 'OnWebLogin') | |
return; | |
$usergroups = $user->getUserGroupNames(); | |
if(empty($usergroups)) | |
return; | |
switch (TRUE) { |
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 | |
$out = ''; | |
switch ($_REQUEST['act']) { | |
// ... more cases above | |
case 'get-data': | |
$params = array(); | |
//$headers = apache_request_headers(); | |
//$range = @explode('-', ltrim($headers['Range'], 'items=')); |
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 | |
/** | |
* Convert under_score type array's keys to camelCase type array's keys | |
* @param array $array array to convert | |
* @param array $arrayHolder parent array holder for recursive array | |
* @return array camelCase array | |
*/ | |
public function camelCaseKeys($array, $arrayHolder = array()) { | |
$camelCaseArray = !empty($arrayHolder) ? $arrayHolder : array(); |
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
function validateForm(formId, erPlacement, validRules) { | |
erPlacement = erPlacement || 'bottom'; | |
validRules = validRules || {}; | |
/* Validation message with the twitter's popover */ | |
/* http://d.hatena.ne.jp/hipsrinoky/20120329/1333035926 */ | |
var eClass = 'error'; // for bootstrap | |
var sClass = 'success'; // for bootstrap | |
var wClass = 'warning'; // for bootstrap (not in used) | |
$(formId).validate({ |
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 | |
/** | |
* Ajax Connector | |
* | |
* @package mypackage | |
*/ | |
$validActions = array( | |
'web/data/delete', | |
'web/data/edit' |
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 | |
header('Content-Type: text/html; charset=utf-8'); | |
/** | |
* Download the currecy data from the link below, and place it along side this file | |
* @link http://www.currency-iso.org/en/home/tables/table-a1.html Current currency & funds code list | |
*/ | |
$xml = file_get_contents( dirname(__FILE__) . '/dl_iso_table_a1.xml'); | |
$currencyArray = json_decode(json_encode((array) simplexml_load_string($xml)), 1); |
OlderNewer