Skip to content

Instantly share code, notes, and snippets.

View akahn's full-sized avatar

Alex Kahn akahn

View GitHub Profile
// Look for the sidebar-right section, rip some stuff out, add in some stuff.
// This still has ugly echoditto poo in it, we may want to make it cleaner.
<?php if ($node->type == "campaign") { ?>
<div id="sidebar">
<?php } else if (_freepress_helper_get_tertiary_nav()){?>
<!--<div id="sidebar" style="margin-top:-45px">-->
<div id="sidebar">
<?php } else { ?>
<div id="summit-sidebar">
foreach ($vars['node']->field_link as $link) {
$vars['model_links'] .= l($link['title'], $link['url'], $link['attributes']);
}
color ir_black " my favorite stock colorscheme is desert
set autochdir
syntax on
set hlsearch
set wildmenu
set wildmode=longest:full
set incsearch
filetype plugin on
set ruler
set laststatus=2
$types = node_get_types();
$options = array();
foreach ($types as $type) {
$options[$type->type] = $type->name;
}
photo_urls = []
page_urls.each_with_index do |page_url, i|
photo_url = Scrubyt::Extractor.define :agent => :firefox do
fetch page_url[:page_url]
deviation "//div[@id='deviation']", :example_type => :xpath do
image "//span[@id='zoomed-in']/a/img", :example_type => :xpath do
image_url 'src', :type => :attribute
end
date_submitted "//div[@class='details']/span", :example_type => :xpath
$show = FALSE;
$node = node_load(arg(1));
if (array_key_exists(38, $node->taxonomy) {
$show = TRUE;
}
if (array_key_exists(38, $node->taxonomy) {
$show = TRUE;
}
return $show;
$paths = array('newsroom/for_the_press', 'newsroom/spokespeople');
$current_path = drupal_get_path_alias($_GET['q']);
if (in_array($current_path, $paths) {
$show = TRUE;
}
$(document).ready(function() {
$('ul#nc-counties').append('<select/>');
$('ul#nc-counties a').each(function(i, link) {
$('#nc-counties select').append('<option/>').val(link.href).text(link.href);
});
});
function freepress_mapper_feedapi_mapper($op, $node, $feed_element = array(), $field_name = '', $sub_field = '') {
if ($field_name == 'author') {
if ($op == 'describe') {
return t('Maps a field in a feed to the node author.');
}
else if ($op == 'list') {
return TRUE;
}
else if ($op == 'map') {
}
<div id="flickr_badge_uber_wrapper">
<div id="flickr_badge_wrapper">
<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=7&size=s&layout=x&source=all_tag&tag=ncmr2008&display=latest"></script><script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=10&size=s&layout=x&source=all_tag&tag=ncmr2008&display=random"></script>
</div>
</div>