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
//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"); |
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
// 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'); |
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
$new = substr_replace($string, $insert, $position, 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
{exp:weblog:entries weblog="${1:weblog1}" ${2:parameters} disable="categories|category_fields|member_data|pagination|trackbacks"} | |
$0 | |
{/exp:weblog:entries} |
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
// 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/"; |
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
------------ | |
JS | |
------------ | |
// After all images load, not dom-ready | |
$(window).load(function(){ | |
if(!$("#slideshow").length) return; | |
// Images to add to slideshow |
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
{exp:low_replace | |
regex="yes" | |
find="(<\/(.*)>)(\s+)$" | |
replace="SPACE<a class='more' href='{title_permalink=bulletin}'>[read more]</a>$1" | |
} | |
{blog_excerpt} | |
{/exp:low_replace} |
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
# | |
# Explanation: | |
# -E Adjust extension. | |
# -k Convert links. | |
# -N Enable timestamping. | |
# -np No parent. | |
# -p Page requisites. | |
# -r Recursive. | |
# -w1 The time to wait between requests. | |
# --random-wait Wait times 0.5 to 1.5. |
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
In mod.forum_core.php around line 11003 find: | |
// Single Variables | |
foreach ($this->EE->TMPL->var_single as $key => $val) | |
{ | |
// parse {post_total} | |
if ($key == 'post_total') | |
{ | |
$tagdata = $this->EE->TMPL->swap_var_single($key, $row['thread_total'], $tagdata); | |
} |
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
// Open external links and PDFs in a new window | |
$("a[href^='http'], a[href$='.pdf']").each(function() { | |
if(this.href.indexOf(location.hostname.replace(/www./gi, "")) == -1 || this.href.lastIndexOf('.pdf') !== -1) { | |
// Ensure subdomains are not counted as external | |
if(this.href.indexOf('mywebsite.com') == -1) { | |
$(this).click(function() { | |
window.open(this.href, "_blank"); | |
return false; | |
}); | |
} |
OlderNewer