' . "\n"; $output .= render($variables['c_links']); $output .= '
' . "\n"; // Also create a search engine friendly version of the gallery. This markup // will only be seen by crawlers and users with javascript disabled. $bypass_noscript = (array_key_exists('addseocontent', $variables['gallery_options']) && $variables['gallery_options']['addseocontent'] == 'FALSE'); if (!$bypass_noscript) { $output .= '' . "\n"; } $output .= '
' . "\n"; return $output; } /** * Proprocess logic for the juicebox_debug_markup theme function. * * @param array $variables * An associative array containing variables used to render this HTML. * * @ingroup themeable */ function juicebox_preprocess_juicebox_debug_markup(&$variables) { // Calculate the XML link that will be displayed. For this display no query // strings should be shown and the link should be absolute. $xml_url = url($variables['xml']['path'], array('absolute' => TRUE)); $variables['xml_link'] = l($xml_url, $variables['xml']['path'], array('absolute' => TRUE)); // Get image count. $variables['image_count'] = count($variables['gallery_images']); // Get the gallery option list in a displayable format. $variables['option_list'] = array(); foreach ($variables['gallery_options'] as $option_key => $option_value) { $variables['option_list'][] = $option_key . '=' . $option_value; } // Get the library info in a displayable format. $library = juicebox_library_detect(FALSE, TRUE); $variables['lib_status'] = t('Locally Installed'); if (empty($library['installed'])) { $variables['lib_status'] = t('Not Locally Installed'); } if (!empty($library['version'])) { $variables['lib_status'] = $variables['lib_status'] . ', ' . $library['version']; } } /** * Returns HTML for the alternative "debug" display of a Juicebox gallery. * * @param array $variables * An associative array containing variables used to render this HTML. * * @ingroup themeable */ function theme_juicebox_debug_markup(&$variables) { $settings = $variables['settings']; $output = ''; // Display a structured list of each debug detail. $output .= '
' . "\n"; $output .= render($variables['c_links']); $output .= '
' . "\n"; $output .= '

' . t('Showing debugging information in place of gallery.') . '

'; $output .= '
'; $output .= '
' . t('Gallery ID') . '
'; $output .= '
' . $variables['gallery_id'] . '
'; $output .= '
' . t('XML URL') . '
'; $output .= '
' . $variables['xml_link'] . '
'; $output .= '
' . t('Juicebox Javascript Library') . '
'; $output .= '
' . $variables['lib_status'] . '
'; $output .= '
' . t('Image Count') . '
'; $output .= '
' . $variables['image_count'] . ' ' . t('images') . '
'; $output .= '
' . t('Juicebox Gallery Options') . '
'; $output .= '
' . theme('item_list', array('items' => $variables['option_list'])) . '
'; $output .= '
'; $output .= '
'; return $output; }