Skip to content

Instantly share code, notes, and snippets.

View imagehat's full-sized avatar

Mike Kroll imagehat

  • Surprise Highway
  • Madison, WI
View GitHub Profile
// Config overrides - http://expressionengine.com/wiki/EE_2_Config_Overrides/
$config['index_page'] = '';
$config['site_url'] = "http://${_SERVER['HTTP_HOST']}/";
$config['cp_url'] = $config['site_url'].SYSDIR."/index.php";
$config['captcha_url'] = "http://${_SERVER['HTTP_HOST']}/images/captchas/";
$config['emoticon_path'] = "http://${_SERVER['HTTP_HOST']}/images/smileys/";
$config['photo_url'] = "http://${_SERVER['HTTP_HOST']}/images/member_photos/";
$config['sig_img_url'] = "http://${_SERVER['HTTP_HOST']}/images/signature_attachments/";
$config['theme_folder_url'] = "http://${_SERVER['HTTP_HOST']}/themes/";
$config['theme_folder_path'] = "${_SERVER['DOCUMENT_ROOT']}/themes/";
{exp:weblog:entries weblog="${1:weblog1}" ${2:parameters} disable="categories|category_fields|member_data|pagination|trackbacks"}
$0
{/exp:weblog:entries}
$new = substr_replace($string, $insert, $position, 0);
// Split into two columns accounting for nested list items
var midway = Math.round($('#sitemap li').length / 2);
var $node = $('#sitemap li:eq('+midway+')');
var $parent = $node.parent().parent();
var marker = ( $parent.is('li') ) ? $('#sitemap > li').index($parent) : $('#sitemap > li').index($node);
$('#sitemap > li').each(function(i) {
if (i > marker) $(this).addClass('colsplit');
//Split into two columns
var marker = Math.round($('#sitemap > li').length / 2);
$('#sitemap > li').each(function(i) {
if (i >= marker) $(this).addClass('colsplit');
});
$('#sitemap li.colsplit').insertAfter('#sitemap').wrapAll('<ul class="columns-2"></ul>').removeClass('colsplit');
$('#sitemap').addClass("columns-2");