Example #1
0
/**
 * @file
 * This file is empty by default because the base theme chain (Alpha & Omega) provides
 * all the basic functionality. However, in case you wish to customize the output that Drupal
 * generates through Alpha & Omega this file is a good place to do so.
 * 
 * Alpha comes with a neat solution for keeping this file as clean as possible while the code
 * for your subtheme grows. Please read the README.txt in the /preprocess and /process subfolders
 * for more information on this topic.
 */
function mufti_facetapi_link_inactive($variables)
{
    // Builds accessible markup.
    // @see http://drupal.org/node/1316580
    $accessible_vars = array('text' => $variables['text'], 'active' => FALSE);
    $accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);
    // Sanitizes the link text if necessary.
    $sanitize = empty($variables['options']['html']);
    $variables['text'] = $sanitize ? check_plain($variables['text']) : $variables['text'];
    //this line is added to prevent from showing 0
    if ($variables['text'] == '0') {
        return;
    }
    // Adds count to link if one was passed.
    /*Custom count 
      if (isset($variables['count'])) {
        $variables['text'] .= ' ' . theme('facetapi_count', $variables);
      }
      */
    if (isset($variables['count'])) {
        $variables['text'] = '<span class="facet-link">' . $variables['text'] . '</span>';
        $variables['text'] .= '<span class="facet-count">' . $variables['count'] . '</span>';
    }
    // Resets link text, sets to options to HTML since we already sanitized the
    // link text and are providing additional markup for accessibility.
    $variables['text'] .= $accessible_markup;
    $variables['options']['html'] = TRUE;
    return theme_link($variables);
}
/**
 * Returns HTML for an active facet item.
 */
function city_of_malmo_facetapi_link_active($variables)
{
    $sanitize = empty($variables['options']['html']);
    $link_text = $sanitize ? check_plain($variables['text']) : $variables['text'];
    $variables['text'] = $link_text;
    $variables['options']['html'] = TRUE;
    return theme_link($variables);
}
Example #3
0
/**
 * Theme function for facet api active links.
 *
 * @see theme_facetapi_link_active
 */
function favrskovtheme_facetapi_link_active($variables)
{
    $sanitize = empty($variables['options']['html']);
    $link_text = $sanitize ? check_plain($variables['text']) : $variables['text'];
    $accessible_vars = array('text' => $variables['text'], 'active' => TRUE);
    $replacements = array('!facetapi_deactivate_widget' => theme('facetapi_deactivate_widget', $variables), '!facetapi_accessible_markup' => theme('facetapi_accessible_markup', $accessible_vars));
    $variables['text'] = t('!facetapi_deactivate_widget !facetapi_accessible_markup', $replacements);
    $variables['options']['html'] = TRUE;
    return theme_link($variables) . '<span class = "active-filter">' . $link_text . '</span>';
}
Example #4
0
function myphp_facetapi_link_active($variables)
{
    $accessible_vars = array('text' => $variables['text'], 'active' => TRUE);
    $accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);
    $variables['text'] .= $accessible_markup;
    $variables['options']['html'] = TRUE;
    // Sanitizes the link text if necessary.
    $sanitize = empty($variables['options']['html']);
    $text = $sanitize ? check_plain($variables['text']) : $variables['text'];
    // Adds count to link if one was passed.
    if (isset($variables['count'])) {
        $text .= ' ' . theme('facetapi_count', $variables);
    }
    return theme_link($variables) . $text;
}
Example #5
0
?>
content/js/mootools-1.2.1.js"></script>
<script type="text/javascript" src="<?php 
echo DOMAIN;
?>
content/js/mootools-1.2m.js"></script>

<script type="text/javascript" src="<?php 
theme_link();
?>
/search.js"></script>

<?php 
if (got_comic()) {
    ?>
	<?php 
    if (!is_index()) {
        ?>
	<script type="text/javascript" src="<?php 
        theme_link();
        ?>
/comments.js"></script>
	<?php 
    }
    ?>
	<link rel="image_src" href="<?php 
    echo $comic->get_image();
    ?>
" />
<?php 
}
Example #6
0
/**
 * Overrides theme_facetapi_link_active().
 *
 * To get rid of '(-)'.
 */
function dguk_facetapi_link_active($variables)
{
    $accessible_markup = theme('facetapi_accessible_markup', array('text' => $variables['text'], 'active' => TRUE));
    $variables['text'] = '<span class="facet-name">' . $variables['text'] . '</span>' . $accessible_markup . '<div class="facet-kill pull-right"><i class="icon-large icon-remove-sign"></i></div>';
    $variables['options']['html'] = TRUE;
    return '<span class="facet-selected">' . theme_link($variables) . '</span>';
}
Example #7
0
/**
 * Returns HTML for an inactive facet item.
 *
 * @param $variables
 *   An associative array containing the keys 'text', 'path', and 'options'. See
 *   the l() function for information about these variables.
 *
 * @ingroup themeable
 */
function hospiten_omega_facetapi_link_active($variables)
{
    // Sanitizes the link text if necessary.
    $sanitize = empty($variables['options']['html']);
    $link_text = $sanitize ? check_plain($variables['text']) : $variables['text'];
    // Theme function variables fro accessible markup.
    // @see http://drupal.org/node/1316580
    $accessible_vars = array('text' => $variables['text'], 'active' => TRUE);
    // Builds link, passes through t() which gives us the ability to change the
    // position of the widget on a per-language basis.
    $replacements = array('!facetapi_deactivate_widget' => theme('facetapi_deactivate_widget'), '!facetapi_accessible_markup' => theme('facetapi_accessible_markup', $accessible_vars));
    $variables['text'] = t('!facetapi_deactivate_widget !facetapi_accessible_markup', $replacements);
    $variables['options']['html'] = TRUE;
    return theme_link($variables) . "<span class='facet_active_title'>" . $link_text . "</span>";
}
Example #8
0
/**
 * Returns HTML for an inactive facet item.
 *
 *   An associative array containing the keys 'text', 'path', and 'options'. See
 *   the l() function for information about these variables.
 *
 * @see l()
 *
 * @ingroup themeable
 */
function nuboot_radix_facetapi_link_active($variables)
{
    // Sanitizes the link text if necessary.
    $sanitize = empty($variables['options']['html']);
    $link_text = $sanitize ? check_plain($variables['text']) : $variables['text'];
    // Theme function variables fro accessible markup.
    // @see http://drupal.org/node/1316580
    $accessible_vars = array('text' => $variables['text'], 'active' => TRUE);
    $accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);
    $variables['text'] .= $accessible_markup;
    $variables['options']['html'] = TRUE;
    return theme_link($variables);
}
Example #9
0
/**
 * Overrides theme_link().
 */
function europa_link($variables)
{
    // Link module creates absolute URLs for internal links as well, resulting
    // in having the external link icon on these internal links. We attempt to
    // re-convert these to relative.
    global $base_url;
    $internal_url = explode($base_url, $variables['path']);
    if (count($internal_url) > 1) {
        $variables['options']['attributes']['class'][] = 'is-internal';
    }
    return theme_link($variables);
}
Example #10
0
function ardent_facetapi_link_inactive($variables)
{
    // Builds accessible markup.
    $accessible_vars = array('text' => $variables['text'], 'active' => FALSE);
    $accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);
    // Sanitizes the link text if necessary.
    $sanitize = empty($variables['options']['html']);
    $variables['text'] = $sanitize ? check_plain($variables['text']) : $variables['text'];
    // Adds count to link if one was passed.
    if (isset($variables['count'])) {
        $variables['text'] .= ' ' . theme('facetapi_count', $variables);
    }
    // Add functionality requested in #1669600.
    if (!$variables['count'] && isset($variables['options']['query']['f'])) {
        // We should be getting this from the url processor plugin, however we are
        // making an assumption since this is in our custom theme.
        $params =& $variables['options']['query']['f'];
        // Capture the filter associated with this link and find the field alias.
        $filter = end($params);
        $field_alias = substr($filter, 0, strpos($filter, ':')) . ':';
        // Iterate over params and strip out items that are using the same field
        // alias as this filter. Do not strip out this filter.
        foreach ($params as $key => $param) {
            if (0 === strpos($param, $field_alias) && $param != $filter) {
                unset($params[$key]);
            }
        }
    }
    // Resets link text, sets to options to HTML since we already sanitized the
    // link text and are providing additional markup for accessibility.
    $variables['text'] .= $accessible_markup;
    $variables['options']['html'] = TRUE;
    return theme_link($variables);
}
Example #11
0
/**
 * Returns HTML for an active facet item.
 *
 * @param $variables
 *   An associative array containing the keys 'text', 'path', and 'options'. See
 *   the l() function for information about these variables.
 *
 * @see l()
 *
 * @ingroup themeable
 */
function grapes_facetapi_link_active($variables)
{
    // Sanitizes the link text if necessary.
    $sanitize = empty($variables['options']['html']);
    $link_text = $sanitize ? check_plain($variables['text']) : $variables['text'];
    $link_text = '<span class="filter-value">' . $link_text . '</span>';
    // Theme function variables fro accessible markup.
    // @see http://drupal.org/node/1316580
    $accessible_vars = array('text' => $variables['text'], 'active' => TRUE);
    // Builds link, passes through t() which gives us the ability to change the
    // position of the widget on a per-language basis.
    $replacements = array('!facetapi_deactivate_widget' => t('Remove This Item'), '!facetapi_accessible_markup' => theme('facetapi_accessible_markup', $accessible_vars));
    $variables['text'] = t('!facetapi_deactivate_widget !facetapi_accessible_markup', $replacements);
    $variables['options']['html'] = TRUE;
    return $link_text . theme_link($variables);
}
Example #12
0
/**
 * Implements theme_facetapi_link_inactive().
 */
function dkan_facetapi_link_inactive($variables)
{
    // Builds accessible markup.
    // @see http://drupal.org/node/1316580
    $alter = array('max_length' => 30, 'ellipsis' => TRUE, 'word_boundary' => TRUE, 'trim' => TRUE);
    $variables['text'] = views_trim_text($alter, $variables['text']);
    $accessible_vars = array('text' => $variables['text'], 'active' => FALSE);
    $accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);
    // Sanitizes the link text if necessary.
    $sanitize = empty($variables['options']['html']);
    $variables['text'] = $sanitize ? check_plain($variables['text']) : $variables['text'];
    // Adds count to link if one was passed.
    if (isset($variables['count'])) {
        $variables['text'] .= ' ' . theme('facetapi_count', $variables);
    }
    // Resets link text, sets to options to HTML since we already sanitized the
    // link text and are providing additional markup for accessibility.
    $variables['text'] .= $accessible_markup;
    $variables['options']['html'] = TRUE;
    return theme_link($variables);
}