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 () { | |
function reorient(e) { | |
var portrait = (window.orientation % 180 == 0); | |
$("body > div").css("-webkit-transform", !portrait ? "rotate(-90deg)" : ""); | |
} | |
window.onorientationchange = reorient; | |
window.setTimeout(reorient, 0); | |
}); |
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
addLoadEvent(setSidebarNav); | |
function addLoadEvent(func) { | |
if (window.addEventListener) | |
window.addEventListener("load",func,false); | |
else if (document.addEventListener) | |
document.addEventListener("load",func,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
fieldset .captcha{ | |
legend{ | |
.fieldset-legend{ | |
} | |
} | |
.fieldset-wrapper{ | |
.fieldset-description{ |
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
/* the humans responsible & colophon */ | |
/* humanstxt.org */ | |
/* TEAM */ | |
Developer: Ray Nimmo | |
Site: http://www.junglecreative.com | |
Twitter: @raynimmo | |
Location: Koh Phangan, Thailand |
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
/* | |
Views, Chaos Tools, Token, Pathauto, Libraries API, Admin Menu, Webform, IMCE, Google Analytics, Wysiwyg, | |
Backup Migrate, Captcha, XML Sitemap, Module Filter, CCK, Media, Global Redirect, Sitemap, Honeypot, | |
Disable CSS, Search 404 | |
*/ | |
wget http://ftp.drupal.org/files/projects/views-7.x-3.8.tar.gz http://ftp.drupal.org/files/projects/ctools-7.x-1.4.tar.gz http://ftp.drupal.org/files/projects/token-7.x-1.5.tar.gz http://ftp.drupal.org/files/projects/pathauto-7.x-1.2.tar.gz http://ftp.drupal.org/files/projects/libraries-7.x-2.2.tar.gz http://ftp.drupal.org/files/projects/admin_menu-7.x-3.0-rc4.tar.gz http://ftp.drupal.org/files/projects/webform-7.x-3.20.tar.gz http://ftp.drupal.org/files/projects/imce-7.x-1.9.tar.gz http://ftp.drupal.org/files/projects/google_analytics-7.x-2.0.tar.gz http://ftp.drupal.org/files/projects/wysiwyg-7.x-2.2.tar.gz http://ftp.drupal.org/files/projects/backup_migrate-7.x-3.0.tar.gz http://ftp.drupal.org/files/projects/captcha-7.x-1.1.tar.gz http://ftp.drupal.org/files/projects/xmlsi |
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
$content_types = node_get_types(); | |
$output = ''; | |
foreach($content_types as $content_type => $content_type_object) { | |
$output .= "" . $content_type_object->name . ""; | |
$output .= ' '; | |
$fields = _content_type_info(); | |
$fields = $fields['content types'][$content_type]['fields']; | |
$ouput = ''; | |
foreach ($fields as $field_name=>$field) { | |
$output .= $field['widget']['label']; |
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
gunzip -c *.*.tar.gz | tar xopf - |
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
__FILE__ (on Hosting) === /home/xfiddlec/public_html/folder1/folder2/yourfile.php | |
__FILE__ (on Localhost) === C:\wamp\www\folder1\folder2\yourfile.php | |
$_SERVER['HTTP_HOST'] === www.yoursite.com (or without WWW) | |
$_SERVER["PHP_SELF"] === /folder1/folder2/yourfile.php | |
$_SERVER["REQUEST_URI"] === /folder1/folder2/yourfile.php?var=blabla | |
$_SERVER["DOCUMENT_ROOT"] === /home/xfiddlec/public_html | |
//basename returns the last filename | |
basename('/folder1/folder2/yourfile.php') {i.e. basename(__FILE__) ==== yourfile.php | |
//dirname returns the part upper part, without filename [same as getcwd()] |
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 getUrl() { | |
$url = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://'.$_SERVER["SERVER_NAME"] : 'https://'.$_SERVER["SERVER_NAME"]; | |
$url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":".$_SERVER["SERVER_PORT"] : ""; | |
$url .= $_SERVER["REQUEST_URI"]; | |
return $url; | |
} |