Skip to content

Instantly share code, notes, and snippets.

View jeremyboggs's full-sized avatar

Jeremy Boggs jeremyboggs

View GitHub Profile
@jeremyboggs
jeremyboggs / omeka_alt_item_layouts
Created June 12, 2011 15:32 — forked from anonymous/omeka_alt_item_layouts
Omeka Code Aiming to Create Alternate Item Layouts by Collection (but not working)
<?php head(array('title' => item('Dublin Core', 'Title'),'bodyid'=>'items','bodyclass' => 'show')); ?>
<?php $collectionName = collection('Name', get_collection_for_item());
if ($collectionName == 'Media Reports and Commentary'): ?>
<div id="primary">
<h5><?php echo item('Dublin Core', 'Title'); ?></h5>
@jeremyboggs
jeremyboggs / dibny_display_filters.php
Created December 20, 2011 04:52
Filters function for Dibny theme
<?php
/**
* Returns a string detailing the parameters of a given query array.
*
* @param array A search array
* @return string HTML
*/
function dibny_display_filters($query = null)
{
$html = '';
<?php
$page = (get_query_var('page')) ? get_query_var('page') : 1;
$args = array(
'posts_per_page' => '10',
'cat' => '-592, -614',
'post_status' => 'publish',
'paged=' . $page
);
query_posts($args);
<?php
function public_nav_has_subpages() {
$view = get_view();
$nav = new Omeka_Navigation;
$nav->loadAsOption(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_OPTION_NAME);
$nav->addPagesFromFilter(Omeka_Navigation::PUBLIC_NAVIGATION_MAIN_FILTER_NAME);
$pages = get_view()->navigation()->menu($nav)->getPages();
foreach($pages as $page) {
if($page->hasPages()) {
return true;
@jeremyboggs
jeremyboggs / wget-single-omeka-classic-exhibit.txt
Created September 17, 2019 12:12 — forked from triplingual/wget-single-omeka-classic-exhibit.txt
wget a single Omeka Classic exhibit not hosted on Omeka.net
# Caveats
# I'm no shell expert
# This is in Bash on a Mac running Mojave
# You may need to read the whole thing before using
#
# Explanation
# (hopefully intelligible to the advanced beginner or low intermediate Bash user)
#
# * Slashes at the line ends tell the shell to consider the next line part of the command
#