0; $is_catalog = preg_match('|catalog/\d+$|', request_uri()) > 0; if ($is_catalog_front) { $breadcrumb = array(); } else if ($is_catalog) { // TODO make this more prominent? $breadcrumb = array( l(t('Back to categories'), 'catalog'), ); } return '
'; } /* * let user know when last ordering period was, when current one ends. */ function theme_uc_buyingclub_catalog_browse($tid = 0) { $period = _uc_buyingclub_get_most_recent_ordering_period(); $date_format = "ga \o\\n l\, M jS Y"; if ($period->end > time()) { drupal_set_message('The current ordering period is from '. date($date_format, $period->start) .' to '. date($date_format, $period->end) .'', $type='status', $repeat=FALSE); } else { drupal_set_message('The most recent ordering period was from '. date($date_format, $period->start) .' to '. date($date_format, $period->end) .'', $type='error', $repeat=FALSE); // only let admins see catalog all the time if (!user_access('administer uc_buyingclub')) { $next_period = _uc_buyingclub_get_next_ordering_period(); $out = "Sorry, ordering is not currently open. Please come back during the next ordering period."; if ($next_period) { $out .= ' It will be from '. date($date_format, $next_period->start) .' to '. date($date_format, $next_period->end) .''; } return $out; } } drupal_add_js(drupal_get_path('module', 'uc_buyingclub') .'/jquery.example.min.js'); drupal_add_js(drupal_get_path('module', 'uc_buyingclub') .'/uc_buyingclub.js'); return theme_uc_catalog_browse($tid); }