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
# NGINX CodeIgniter Config | |
server | |
{ | |
server_name .organizetheweb.com; | |
access_log /var/log/nginx/organizetheweb.com.access.log; | |
root /var/www/organizetheweb.com/trunk; |
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 | |
// src: http://www.sajithmr.me/php-time-ago-calculation/ | |
function wpalchemy_time_ago($datefrom,$dateto=-1) | |
{ | |
// Defaults and assume if 0 is passed in that | |
// its an error rather than the epoch | |
if($datefrom<=0) { return "A long time ago"; } | |
if($dateto==-1) { $dateto = time(); } |
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
<div class="my_meta_control"> | |
<a style="float:right; margin:0 10px;" href="#" class="dodelete-links button">Remove All</a> | |
<p>Add links to external sites</p> | |
<?php while($metabox->have_fields_and_multi('links')): ?> | |
<?php $metabox->the_group_open(); ?> | |
<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
<?php | |
define('_TEMPLATEURL', WP_CONTENT_URL . '/themes/' . basename(TEMPLATEPATH)); | |
include_once 'WPAlchemy/MetaBox.php'; | |
if (is_admin()) wp_enqueue_style('custom_meta_css', _TEMPLATEURL . '/custom/meta.css'); | |
$repeating_mb = new WPAlchemy_MetaBox(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
<div class="my_meta_control"> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras orci lorem, bibendum in pharetra ac, luctus ut mauris.</p> | |
<p><a href="#" class="dodelete-docs button">Remove All</a></p> | |
<?php while($mb->have_fields_and_multi('docs')): ?> | |
<?php $mb->the_group_open(); ?> | |
<a href="#" class="dodelete button">Remove</a> |
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 $pages = get_pages(); ?> | |
<?php while( $mb->have_fields_and_multi( 'buttons' ) ) : ?> | |
<?php $mb->the_group_open(); ?> | |
<div class="button"> | |
<a href="#" class="dodelete button">Remove</a> | |
<?php $mb->the_field('s_field'); ?> | |
<select name="<?php $mb->the_name(); ?>"> | |
<option></option> |
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
// disable all fields in a template (so they do not get submitted) | |
$('.template').find('input, textarea, select, button').each(function() | |
{ | |
$(this).attr('disabled', 'disabled'); | |
}); | |
function doRepeat(replace) | |
{ | |
var container = $(this).closest('.container'); |
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
<div class="container"> | |
<div class="collection"> | |
<div class="template" style="display:none;"> | |
<input type="text" name="questions[%][question]" value="qq"/> | |
<input type="text" name="questions[%][type]" value="qt"/> |
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 | |
global $am_option; | |
?> | |
<div class="post"> | |
<h2 class="home_title">UPCOMING:</h2> | |
<div class="box"> | |
<div class="holder"> | |
<div class="frame"> | |
<?php global $custom_metabox; ?> | |
<?php query_posts('post_type=events&showposts=3'); ?> |
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 clean(&$arr) | |
{ | |
if (is_array($arr)) | |
{ | |
foreach ($arr as $i => $v) | |
{ | |
if (is_array($arr[$i])) | |
{ | |
clean($arr[$i]); | |
OlderNewer