Javascript Get Values

<script type="text/javascript">

alert(function jsGet('get-variable-name));

function jsGet(variable) {
var queryString = window.location.search.substring(1);
var vars = queryString.split("&");
for(var i=0; i<vars.length; i++){
var getValue = vars[i].split("=");
if(getValue[0] == variable) return getValue[1];
}
}

</script>

Hide elements by url

<script type="text/javascript">

//By Page Only
if(document.URL == 'http://domain.com/page-to-hide-elements-on/') document.getElementById('element-to-hide').style.display = 'none';

//By Get Value
if(jsGet('get-name') == 'getvalue') document.getElementById('element-to-hide').style.display = 'none';

function jsGet(variable){
var queryString = window.location.search.substring(1);
var vars = queryString.split("&");
for(var i=0; i<vars.length; i++){
var getValue = vars[i].split("=");
if(getValue[0] == variable) return getValue[1];
}
}

</script>

Banned swear words

<?php
$bannedWords = array(
'anus',
'ass',
'bastard',
'bitch',
'blow job',
'blowjob',
'boner',
'bullshit',
'carpetmuncher',
'choad',
'chode',
'clit',
'cock',
'coochie',
'coochy',
'coon',
'cooter',
'cum',
'cunt',
'damn',
'dick',
'dike',
'dildo',
'doochbag',
'douche',
'dyke',
'fag',
'fellatio',
'fuck',
'fudgepacker',
'gay',
'goddamn',
'gooch',
'handjob',
'hard on',
'hell',
'homo',
'humping',
'jerk off',
'masturbate',
'erection',
'jizz',
'kooch',
'kootch',
'kunt',
'lesbian',
'lesbo',
'lezzie',
'mothafucka',
'muff',
'nigga',
'nigger',
'nut sack',
'pecker',
'penis',
'piss',
'polesmoker',
'poon',
'prick',
'punanny',
'pussies',
'pussy',
'queef',
'queer',
'rimjob',
'schlong',
'shit',
'shiz',
'skank',
'slut',
'snatch',
'splooge',
'testicle',
'tit',
'twat',
'vagina',
'wank',
'whore'
);
?>

Image Gallery with Thumbs

<!-- Main Image -->
<img src="path/to/starting/image.jpg" id="image-main">

<!-- Thumbnail Image(s) Just two here shown for example -->
<img src="path/to/thumbnail-1.jpg" alt="path/to/fullsize/image-1.jpg" onclick="imageSwap(event);">
<img src="path/to/thumbnail-2.jpg" alt="path/to/fullsize/image-2.jpg" onclick="imageSwap(event);">

<!-- The Javascript -->
<script type="text/javascript">
function imageSwap(event) {
var fullSize = event.currentTarget.getAttribute("alt");
var largeImageContainer = document.getElementById('image-main');
largeImageContainer.src=fullSize;
}
</script>

Server Superglobal

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Server Superblogal</title>

</head>
<body>

<?php

get_server_superglobals();

function get_server_superglobals(){?>
<style type="text/css">
.superglobals{font-family:"Courier New", Courier, monospace; font-size:14px; padding:8px;}
.superglobals tr td{border:1px solid #E4E4E4; padding:2px 6px; margin-right:10px;}
.superglobals tr th{border:1px solid #444; padding:2px 6px; margin-right:10px; background-color:#ccc;}
.superglobals tr:hover td{background-color:#E4E4E4;}
.superglobals .snippet{font-size:10px;}
.superglobals .middle{width:500px; overflow:auto;}
</style>
<?php
$constants = array(
'argv',
'argc',
'AUTH_TYPE',
'DOCUMENT_ROOT',
'GATEWAY_INTERFACE',
'HTTP_ACCEPT',
'HTTP_ACCEPT_CHARSET',
'HTTP_ACCEPT_ENCODING',
'HTTP_ACCEPT_LANGUAGE',
'HTTP_CONNECTION',
'HTTP_COOKIE',
'HTTP_HOST',
'HTTP_IF_MODIFIED_SINCE',
'HTTP_KEEP_ALIVE',
'HTTP_REFERER',
'HTTP_USER_AGENT',
'HTTPS',
'ORIG_PATH_INFO',
'PATH',
'PATH_INFO',
'PATH_TRANSLATED',
'PHP_AUTH_DIGEST',
'PHP_AUTH_USER',
'PHP_AUTH_PW',
'PHP_SELF',
'QUERY_STRING',
'REDIRECT_STATUS',
'REMOTE_ADDR',
'REMOTE_HOST',
'REMOTE_PORT',
'REQUEST_METHOD',
'REQUEST_TIME',
'REQUEST_URI',
'SCRIPT_FILENAME',
'SCRIPT_NAME',
'SERVER_ADDR',
'SERVER_ADMIN',
'SERVER_NAME',
'SERVER_PORT',
'SERVER_SIGNATURE',
'SERVER_SOFTWARE',
'SERVER_PROTOCOL',
'UNIQUE_ID',
);
?>

<table class="superglobals">
<tr>
<th>Constant</th>
<th><div class="middle">Server Superglobal Output</div></th>
<th>Snippet</th>
</tr>
<?php
foreach($constants as $constant){?>
<tr>
<td><strong><?php echo $constant ?></strong></td>
<td><div class="middle"><?php echo $_SERVER[$constant] ?></div></td>
<td class="snippet"><?php echo "$_SERVER['" . $constant . "']" ?></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>

</body>
</html>

Hide Private Posts

<?php
function hide_posts($where){
if( is_admin() ) return $where;
global $wpdb;
return " $where AND {$wpdb->posts}.post_status != 'private' ";
}

add_filter('posts_where','hide_posts');
?>