コード例 #1
0
ファイル: template.php プロジェクト: nodefortytwo/famelab
/**
 * Preprocessor for page.tpl.php template file.
 */
function ninesixty_preprocess_page(&$vars, $hook)
{
    if (strpos($vars['body_classes'], ' uk ')) {
        $uk = true;
    } else {
        if (strpos($vars['body_classes'], ' academy ')) {
            $academy = true;
        }
    }
    // For easy printing of variables.
    $vars['logo_img'] = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), t('Home'), t('Home')) : '';
    if ($uk) {
        $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], 'uk', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
        $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], 'uk', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
    } else {
        if ($academy) {
            $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], 'academy', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
            $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], 'academy', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
        } else {
            $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
            $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
        }
    }
    $vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
    $vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = ninesixty_css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
}
コード例 #2
0
function theme_block_overlay_store_form($form, $language)
{
    $output = "";
    $output .= drupal_get_css();
    $output .= drupal_get_js();
    $output .= '<div id="block-overlay-store" class="page-store">';
    $output .= '<div id="block-map">';
    $output .= '<img src="' . base_path() . drupal_get_path('module', 'storelocator_app') . '/images/carteBE-overlay.jpg' . '" ';
    $output .= ' class="maphilight" usemap="#Map"  />';
    $output .= '<map name="Map" id="Map">';
    $output .= '<AREA SHAPE=POLY COORDS="19,53,70,30,73,41,68,58,76,86,47,82,34,90,24,83" HREF="javascript:displayRegion(\'' . t('Province Flandre Occidentale', array(), $language) . '\');" ALT="' . t('Province Flandre Occidentale', array(), $language) . '" TITLE="' . t('Province Flandre Occidentale', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="73,40,80,41,79,36,97,43,114,41,123,33,129,52,119,55,120,67,103,90,75,87,71,73,68,57,71,49" HREF="javascript:displayRegion(\'' . t('Province Flandre Orientale', array(), $language) . '\');" ALT="' . t('Province Flandre Orientale', array(), $language) . '" TITLE="' . t('Province Flandre Orientale', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="39,94,34,91,46,82,48,85,54,86,57,87,68,90,75,88,79,89,82,92,87,87,95,90,103,91,103,96,113,94,114,101,119,100,128,111,134,109,138,111,145,113,145,121,145,132,133,135,126,140,132,141,131,149,132,158,134,171,124,167,116,166,113,160,120,157,113,151,116,140,111,132,106,129,99,132,96,129,89,130,89,134,85,129,83,117,70,115,63,109,59,100,62,94,57,92,52,85" HREF="javascript:displayRegion(\'' . t('Province de Hainaut', array(), $language) . '\');" ALT="' . t('Province de Hainaut', array(), $language) . '" TITLE="' . t('Province de Hainaut', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="141,111,150,108,165,106,173,111,182,119,187,126,194,127,194,136,189,140,184,144,191,151,172,155,169,161,171,167,172,175,168,179,165,185,159,184,158,177,159,172,155,167,158,154,159,149,149,155,149,164,140,166,135,170,128,157,129,147,130,141,124,140,132,134,142,133,144,123,142,116" HREF="javascript:displayRegion(\'' . t('Province de Namur', array(), $language) . '\');" ALT="' . t('Province de Namur', array(), $language) . '" TITLE="' . t('Province de Namur', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="195,123,211,131,215,138,222,139,221,131,231,132,233,148,219,167,216,177,214,187,225,198,222,208,200,212,189,202,166,184,171,176,171,167,167,159,171,153,184,152,183,142,193,137" HREF="javascript:displayRegion(\'' . t('Province de Luxembourg', array(), $language) . '\');" ALT="' . t('Province de Luxembourg', array(), $language) . '" TITLE="' . t('Province de Luxembourg', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="171,96,199,93,211,86,215,92,224,93,231,91,239,94,247,102,247,105,243,106,247,116,253,115,255,124,255,126,257,134,242,143,241,153,232,146,230,133,222,133,224,140,212,140,211,131,196,125,186,128,174,113,167,102" HREF="javascript:displayRegion(\'' . t('Province de Liège', array(), $language) . '\');" ALT="' . t('Province de Liège', array(), $language) . '" TITLE="' . t('Province de Liège', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="183,42,199,38,204,47,212,50,221,52,215,72,209,81,210,86,193,94,176,97,180,78,169,75,175,65,167,62,184,53,179,47,181,45" HREF="javascript:displayRegion(\'' . t('Province du Limbourg', array(), $language) . '\');" ALT="' . t('Province du Limbourg', array(), $language) . '" TITLE="' . t('Province du Limbourg', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="122,28,133,31,132,22,141,20,143,26,150,25,154,18,159,20,160,26,166,27,170,20,176,24,175,30,179,36,183,37,182,48,185,53,170,62,157,65,145,66,131,67,124,63,120,64,120,54,128,54,126,41" HREF="javascript:displayRegion(\'' . t('Province Anvers', array(), $language) . '\');" ALT="' . t('Province d\'Anvers', array(), $language) . '" TITLE="' . t('Province d\'Anvers', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="111,99,111,94,113,92,118,96,125,96,126,93,129,93,130,91,135,89,137,92,143,90,147,90,149,84,156,84,159,87,164,88,166,90,171,88,171,97,157,103,147,102,145,107,141,107,141,110,137,110,136,108,127,107,121,102,117,101,117,98,114,97,111,98,111,99" HREF="javascript:displayRegion(\'' . t('Province du Brabant wallon', array(), $language) . '\');" ALT="' . t('Province du Brabant wallon', array(), $language) . '" TITLE="' . t('Province du Brabant wallon', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="124,78,133,74,135,79,136,81,134,88,129,89,123,85" HREF="javascript:displayRegion(\'' . t('Région de Bruxelles', array(), $language) . '\');" ALT="' . t('Région de Bruxelles', array(), $language) . '" TITLE="' . t('Région de Bruxelles', array(), $language) . '">';
    $output .= '<AREA SHAPE=POLY COORDS="122,62,133,67,175,65,178,64,171,74,175,76,181,76,174,96,167,90,153,89,134,90,134,80,131,76,124,79,123,84,129,89,133,89,126,95,119,95,115,93,101,95,101,88,112,86,109,80,114,74,116,72,117,58,122,65" HREF="javascript:displayRegion(\'' . t('Province du Brabant flamand', array(), $language) . '\');" ALT="' . t('Province du Brabant flamand', array(), $language) . '" TITLE="' . t('Province du Brabant flamand', array(), $language) . '">';
    $output .= '</map>';
    $output .= '</div>';
    $output .= drupal_render($form);
    $output .= '</div>';
    return $output;
}
コード例 #3
0
function _yaml_3col_subcol_add_styles($vars = array())
{
    global $theme, $language;
    $base_theme_directory = str_replace('/layouts/' . $theme, '', $vars['directory']);
    $styles = drupal_get_css($vars['css']);
    // Page settings
    $styles .= _yaml_get_css_themesettings();
    // The styles array is complete, get the styled css and append the
    // IE Hacks. Additional this allows to dynamically add add packed or other iehacks.
    $styles .= "<!--[if lte IE 7]>\n";
    $styles .= '<style type="text/css" media="all">' . "\n";
    $styles .= '@import "' . base_path() . $base_theme_directory . '/yaml/core/iehacks' . (variable_get('preprocess_css', FALSE) ? '.pack' : '') . '.css";' . "\n";
    if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
        $styles .= '@import "' . base_path() . $base_theme_directory . '/yaml/core/iehacks-rtl' . (variable_get('preprocess_css', FALSE) ? '.pack' : '') . '.css";' . "\n";
    }
    $styles .= '@import "' . base_path() . $base_theme_directory . '/css/patches/patch_nav_vlist_drupal.css";' . "\n";
    $styles .= '@import "' . base_path() . $base_theme_directory . '/css/patches/patch_drupal.css";' . "\n";
    $styles .= "</style>\n";
    $styles .= "<![endif]-->\n";
    // IE 6 settings and styles.
    $styles_ie6 = _yaml_get_css_ie6_themesettings('', $base_theme_directory);
    if (!empty($styles_ie6)) {
        $styles .= "<!--[if lte IE 6]>\n";
        $styles .= '<style type="text/css" media="all">' . $styles_ie6 . "</style>\n";
        $styles .= "<![endif]-->\n";
    }
    // Return themed styles
    return $styles;
}
コード例 #4
0
ファイル: template.php プロジェクト: ryanbayona/Speedex
/**
 * Preprocessor for page.tpl.php template file.
 * The default functionality can be found in preprocess/preprocess-page.inc
 */
function omega_preprocess_page(&$vars, $hook) {
	// Prepare 960gs CSS. Fixed width is default, fluid is optional via theme-settings
  if(theme_get_setting('omega_fixed_fluid') == 'fluid') {
    $css_960 = drupal_get_path('theme', 'omega') .'/css/960-fluid.css';
  }
  else {
  	$css_960 = drupal_get_path('theme', 'omega') .'/css/960.css';
  }
  drupal_add_css($css_960, 'module', 'all');
  
  // enable/disable optional CSS files
  if (theme_get_setting('reset_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/reset.css', 'module', 'all');
  }
  if (theme_get_setting('text_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/text.css', 'module', 'all');
  }
  if (theme_get_setting('regions_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/regions.css', 'module', 'all');
  }
  if (theme_get_setting('defaults_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/defaults.css', 'module', 'all');
  }
  if (theme_get_setting('custom_css') == '1') {
    drupal_add_css(drupal_get_path('theme', 'omega') .'/css/custom.css', 'module', 'all');
  }
  // redeclare $styles
  //krumo($vars['styles']);
  $vars['styles'] = drupal_get_css();
  //krumo($vars['styles']);
} // end preprocess_page
コード例 #5
0
ファイル: template.php プロジェクト: TakenCdosG/aasa_new
/**
 * Override or insert PHPTemplate variables into the templates.
 */
function phptemplate_preprocess_page(&$vars)
{
    /* Load js and css files */
    drupal_add_js(path_to_theme() . '/js/aasa.js');
    drupal_add_css(path_to_theme() . '/editor.css');
    $node = aasa_theme_current_node();
    $url = explode('/', $_GET['q']);
    /* BROWSER TITLE */
    $vars['head_title'] = $node->field_browser_title[0]['value'];
    $vars['template'] = 'admin.inc.php';
    $vars['classes'] = $node->type;
    switch ($node->type) {
        case 'front_page':
            $vars['template'] = 'front.inc.php';
            if ($url[2] != 'edit') {
                drupal_add_js(path_to_theme() . '/js/jquery-1.6.2.js');
                drupal_add_js(path_to_theme() . '/js/nivo-slider/jquery.nivo.slider.js');
            }
            break;
        case 'internal_page':
        case 'board_of_director':
        case 'education_and_event':
        case 'member_resources':
        case 'membership':
        case 'sponsorship':
        case 'the_cutting_edge':
        case 'the_cutting_edge_past':
        case 'national_conference':
        case 'regional_conferences':
        case 'contact_form':
        case 'webinars_widget':
        case 'widget_container':
        case 'widget_gallery':
            $vars['template'] = 'node.tpl.php';
            if ($url[2] != 'edit') {
                drupal_add_js(path_to_theme() . '/js/jquery-1.6.2.js');
                drupal_add_js(path_to_theme() . '/js/nivo-slider/jquery.nivo.slider.js');
            }
            break;
    }
    $vars['node_nid_widget'] = $node->nid;
    if ($url[0] == 'admin' || $url[2] == 'edit' || $url[1] == 'add' || $url[2] == 'delete') {
        $vars['template'] = 'admin.inc.php';
    }
    if ($url[0] == 'node' && $url[1] == 'add' && $url[2] == 'profile') {
        $vars['template'] = 'node.tpl.php';
        drupal_add_css(path_to_theme() . '/profile.css');
    }
    $globals = node_load(56);
    /* FOOTER TEXT*/
    $vars['title'] = $globals->title;
    $vars['field_footer_text'] = $globals->field_footer_text[0]['value'];
    $vars['node_nid_widget'] = $globals->title;
    /* Reload the javascript and css files */
    $vars['scripts'] = drupal_get_js();
    $vars['styles'] = drupal_get_css();
    $vars['active_menu'] = title_internal();
}
コード例 #6
0
ファイル: template.php プロジェクト: Quilted/mass_extinction
/**
 * Override or insert variables into the page template.
 */
function seven_preprocess_page(&$vars)
{
    $vars['primary_local_tasks'] = menu_primary_local_tasks();
    $vars['secondary_local_tasks'] = menu_secondary_local_tasks();
    // get all the current css information into an array
    $css = drupal_add_css();
    // Removing the css files of vertical tabs module because and use the seven style instead.
    unset($css['all']['module'][drupal_get_path('module', 'vertical_tabs') . '/vertical_tabs.css']);
    // now place the remaining css files back into the template variable for rendering
    $vars['styles'] = drupal_get_css($css);
}
コード例 #7
0
ファイル: template.php プロジェクト: nimish321/openscholar
/**
 * Preprocessor for theme('page').
 */
function cube_preprocess_page(&$vars)
{
    // Automatically adjust layout for page with right sidebar content if no
    // explicit layout has been set.
    $layout = module_exists('context_layouts') ? context_layouts_get_active_layout() : NULL;
    if (arg(0) != 'admin' && !empty($vars['right']) && !$layout) {
        $vars['template_files'][] = 'layout-sidebar';
        $css = array('screen' => array('theme' => array(drupal_get_path('theme', 'cube') . '/layout-sidebar.css' => TRUE)));
        $vars['styles'] .= drupal_get_css($css);
    }
}
コード例 #8
0
ファイル: template.php プロジェクト: kimpepper/drupal-base
/**
 * Preprocessor for page.tpl.php template file.
 */
function ninesixty_preprocess_page(&$vars, $hook)
{
    // For easy printing of variables.
    $vars['logo_img'] = $vars['logo'] ? theme('image', str_replace(base_path(), '', $vars['logo']), t('Home'), t('Home')) : '';
    $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('rel' => 'home', 'title' => t('Home'), 'html' => TRUE)) : '';
    $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('rel' => 'home', 'title' => t('Home'))) : '';
    $vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
    $vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = ninesixty_css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
}
コード例 #9
0
function phptemplate_preprocess_page(&$vars)
{
    // Add css for search
    $array_q = explode('/', $_GET['q']);
    if ($array_q[0] == 'search') {
        drupal_add_css(path_to_theme() . '/css/search.css', 'theme');
        $vars['tabs'] = null;
        // don't show search tabs
    }
    //Reload css/js. This is needed for preprocess_page since css/js is already loaded.
    $vars['styles'] = drupal_get_css();
}
コード例 #10
0
ファイル: template.php プロジェクト: nodeone/232
/**
 * Implementation of template_process_html().
 */
function precision_process_html(&$variables, $hook)
{
    // Check if overlay is activated.
    if (theme_get_setting('precision_show_overlay')) {
        // Extract and put back the body classes.
        $variables['classes_array'][] = 'show-grid';
        $variables['classes'] = implode(' ', $variables['classes_array']);
        // Add the overlay css to the page.
        $styles = drupal_add_css(drupal_get_path('theme', 'precision') . '/debug/debug.css');
        $variables['css'] = $styles;
        $variables['styles'] = drupal_get_css($variables['css']);
    }
}
コード例 #11
0
ファイル: template.php プロジェクト: ViktorLinnasaar/hanset
function _phptemplate_variables($hook, $vars)
{
    // Setup theme path variable
    $vars['path'] = base_path() . path_to_theme();
    if ($hook == 'page') {
        // Menüüde genereerimine
        $vars['menu_level_1'] = theme('menu_links', menu_primary_links(1), 1);
        $vars['menu_level_2'] = theme('menu_links_2', menu_primary_links(2), 2);
        // Eemalda druapi css
        $css = drupal_add_css();
        unset($css['all']['module']['modules/system/system.css']);
        unset($css['all']['module']['modules/system/defaults.css']);
        $vars['styles'] = drupal_get_css($css);
        // Kasuta agregeeritud javascripti
        if (module_exists('javascript_aggregator') && $vars['scripts']) {
            $vars['scripts'] = javascript_aggregator_cache($vars['scripts']);
        }
        // Määra title page_title mooduli kaudu
        if (module_exists('page_title')) {
            $vars['head_title'] = page_title_page_get_title();
        }
        // Eemalda ebavajalikud tab'id
        _phptemplate_adminlogo($vars);
        // Ära näita tabe otsingus
        if (preg_match("|search/node|", $_GET['q'])) {
            $vars['show_tabs'] = false;
        } else {
            $vars['show_tabs'] = true;
        }
        // Title näitamise flag
        if (isset($vars['node']->field_hide_page_title)) {
            if ($vars['node']->field_hide_page_title[0]['value'] == 1) {
                $vars['show_title'] = false;
            } else {
                $vars['show_title'] = true;
            }
        } else {
            $vars['show_title'] = true;
        }
    } else {
        if ($hook == 'node') {
            // ...
        } else {
            if ($hook == 'block') {
                // ...
            }
        }
    }
    return $vars;
}
コード例 #12
0
ファイル: template.php プロジェクト: szczym/tutturu
function phptemplate_preprocess(&$vars, $hook)
{
    global $theme;
    // Set Page Class
    $vars['page_class'] = theme_get_setting('page_class');
    // Hide breadcrumb on all pages
    if (theme_get_setting('breadcrumb') == 0) {
        $vars['breadcrumb'] = '';
    }
    $vars['closure'] .= '
  <p id="theme-credit"><a href="http://drupal.org/project/strange_little_town">Strange Little Town</a> | ' . t('Original Designed : ') . '<a href="http://magical.nu/">Magical.nu</a> | ' . t('Drupal Ported : ') . '<a href="http://webzer.net/">Webzer.net</a></p>
  ';
    // Theme primary and secondary links.
    $vars['primary_menu'] = theme('links', $vars['primary_links'], array('class' => 'links primary-menu'));
    $vars['secondary_menu'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Set Accessibility nav bar
    if ($vars['primary_menu'] != '') {
        $vars['nav_access'] = '
    <ul id="nav-access" class="hidden">
      <li><a href="#primary-menu" accesskey="N" title="' . t('Skip to Primary Menu') . '">' . t('Skip to Primary Menu') . '</a></li>
      <li><a href="#main-content" accesskey="M" title="' . t('Skip to Main Content') . '">' . t('Skip to Main Content') . '</a></li>
    </ul>
  ';
    } else {
        $vars['nav_access'] = '
    <ul id="nav-access" class="hidden">
      <li><a href="#main-content" accesskey="M" title="' . t('Skip to Main Content') . '">' . t('Skip to Main Content') . '</a></li>
    </ul>
  ';
    }
    // Set Back to Top link toggle
    $vars['to_top'] = theme_get_setting('totop');
    if (theme_get_setting('totop') == 0) {
        $vars['to_top'] = '';
    } else {
        $vars['to_top'] = '<p id="to-top"><a href="#page">' . t('Back To Top') . '</a></p>';
    }
    // Comments count
    if (isset($vars['node']->links['comment_comments'])) {
        if ($vars['teaser']) {
            $all = comment_num_all($vars['node']->nid);
            $vars['comments_count'] = format_plural($all, '1 comment', '@count comments');
        }
    }
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
}
コード例 #13
0
/**
 * The Zen theme allows its subthemes to have their own template.php files
 * The only restriction with these files is that they cannot redefine any of the
 * functions that are already defined in Zen's main template.php file.
 *
 * Also remember that the "main" theme is still Zen, so your theme functions
 * should be named as such:
 *  theme_block()  becomes  zen_block()
 *  theme_feed_icon() becomes zen_feed_icon() as well
 *
 * Additionally, it is not possible for subthemes to redefine regions.
 *
 * For a subtheme to add its own variables, use the function name
 *   zen_variables($hook, $vars)
 */
function zen_variables($hook, $vars)
{
    $vars['subtheme_directory'] = path_to_subtheme();
    switch ($hook) {
        case 'page':
            // add main Zen styles
            drupal_add_css($vars['directory'] . '/layout.css', 'theme', 'all');
            drupal_add_css($vars['directory'] . '/icons.css', 'theme', 'all');
            drupal_add_css($vars['directory'] . '/zen.css', 'theme', 'all');
            drupal_add_css($vars['directory'] . '/print.css', 'theme', 'print');
            // then load the overrides for the above css
            $vars['css'] = drupal_add_css($vars['subtheme_directory'] . '/overrides.css', 'theme', 'all');
            $vars['styles'] = drupal_get_css();
    }
    return $vars;
}
コード例 #14
0
/**
 * Preprocessor for page.tpl.php template file.
 */
function pechi_preprocess_page(&$vars, $hook)
{
    global $language, $user;
    // For easy printing of variables.
    $vars['logo_img'] = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), t('Home'), t('Home')) : '';
    $vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'), 'html' => TRUE)) : '';
    $vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('attributes' => array('rel' => 'home'), 'title' => t('Home'))) : '';
    $vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
    $vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = pechi_css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
    drupal_add_js(drupal_get_path('theme', 'pechi') . '/js/pechi.js');
    // Remove sidebars if disabled e.g., for Panels
    if (!$vars['show_blocks']) {
        $vars['sidebar_first'] = '';
        $vars['sidebar_last'] = '';
    }
    // Add to array of helpful body classes
    $body_classes = explode(' ', $vars['body_classes']);
    // Default classes
    $body_classes[] = $language->prefix;
    if (isset($vars['node'])) {
        $body_classes[] = $vars['node'] ? 'full-node' : '';
        // Full node
        $body_classes[] = $vars['node']->type == 'forum' || arg(0) == 'forum' ? 'forum' : '';
        // Forum page
    } else {
        $body_classes[] = arg(0) == 'forum' ? 'forum' : '';
        // Forum page
    }
    if (module_exists('panels') && function_exists('panels_get_current_page_display')) {
        // Panels page
        $body_classes[] = panels_get_current_page_display() ? 'panels' : '';
    }
    $body_classes = array_filter($body_classes);
    // Remove empty elements
    $vars['body_classes'] = implode(' ', $body_classes);
    // Create class list separated by spaces
    $vars['body_id'] = 'pid-' . strtolower(preg_replace('/[^a-zA-Z0-9-]+/', '-', drupal_get_path_alias($_GET['q'])));
    // Add a unique page id
    if (module_exists('uc_product') && uc_product_is_product((int) $vars['node']->nid)) {
        // Kill the page title to surface our own.
        $vars['title'] = NULL;
    }
}
コード例 #15
0
ファイル: template.php プロジェクト: upei/drupal6-cms
function phptemplate_preprocess_page(&$vars)
{
    // get rid of all module css unless it's admin menu
    $css =& $vars['css'];
    foreach ($css['all']['module'] as $key => $value) {
        if (!preg_match('/admin_menu/', $key)) {
            unset($css['all']['module'][$key]);
        }
    }
    // get rid of all print css
    unset($css['print']);
    // reset the styles
    $vars['styles'] = drupal_get_css($css);
    // add title to breadcrumb
    $icon = uiphone_get_menu_icon($_REQUEST['q']);
    $vars['breadcrumb'] .= '<span class="nav-title"><span class="nav-title-icon">' . $icon . '</span><span class="nav-title-text">' . $vars['title'] . '</span></span>';
}
コード例 #16
0
ファイル: template.php プロジェクト: nodeone/drupal-precision
/**
 * Implementation of theme_preprocess_page().
 */
function precision_preprocess_page(&$vars)
{
    // Get theme setting for debug overlay.
    $grid_overlay = theme_get_setting('precision_show_overlay');
    // Check if overlay is activated.
    if ($grid_overlay == 1) {
        // Extract the body classes.
        $body_classes = explode(' ', $vars['body_classes']);
        // Add overlay class to body.
        $body_classes[] = 'show-grid';
        $vars['body_classes'] = implode(' ', $body_classes);
        // Add the overlay css to the page.
        $path = drupal_get_path('theme', 'precision');
        $styles = drupal_add_css($path . '/debug/debug.css', 'theme');
        $vars['styles'] = drupal_get_css($styles);
    }
}
コード例 #17
0
ファイル: template.php プロジェクト: sbma44/dc-crime
function _phptemplate_variables($hook, $vars = array())
{
    switch ($hook) {
        case 'page':
            global $theme;
            drupal_add_css($vars['directory'] . '/additional.css', 'theme', 'all');
            drupal_add_js($vars['directory'] . '/jquery.color.js', 'theme');
            drupal_add_js($vars['directory'] . '/scripts.js', 'theme');
            // turn off title?
            $vars['suppress_title'] = $vars['node']->type == 'crime';
            break;
    }
    $vars['css'] = drupal_add_css();
    $vars['styles'] = drupal_get_css();
    $vars['scripts'] = drupal_get_js();
    return $vars;
}
コード例 #18
0
ファイル: template.php プロジェクト: keylorm/manatus
function navin_process_maintenance_page(&$variables)
{
    // Include @font-your-face support
    if (module_exists('fontyourface')) {
        fontyourface_preprocess_page($variables);
        $fonts = (array) $variables['fontyourface'];
        foreach ($fonts as $font) {
            if (module_hook($font->provider, 'preprocess_page')) {
                call_user_func_array($font->provider . '_preprocess_page', array(&$variables));
            }
        }
    }
    // Add theme's maintenance CSS
    drupal_add_css(path_to_theme() . '/css/maintenance.css', array('group' => CSS_THEME, 'weight' => 10));
    // Reset variables
    $variables['head'] = drupal_get_html_head();
    $variables['css'] = drupal_add_css();
    $variables['styles'] = drupal_get_css();
    $variables['scripts'] = drupal_get_js();
}
コード例 #19
0
ファイル: template.php プロジェクト: juancho48/drupal_6_test
function wistar_preprocess_page(&$vars) {
	jquery_ui_add(array('effects.slide'));

	if( $vars['is_front'] ) {
		$vars['homepage'] = wistar_theme_get_active('homepage');
		$vars['head_title'] = $vars['homepage']->title;

		// load up the quicktabs
		$quicktabs = quicktabs_load(1);
		$vars['quicktabs'] = theme('quicktabs', $quicktabs);

		// load the alert
		$vars['alert'] = wistar_theme_get_alert();

		// we need to re-render the js, since qt relies on it's own
		$vars['css'] = drupal_add_css();
		$vars['styles'] = drupal_get_css();
		$vars['scripts'] = drupal_get_js();

		// rebuild the less files - this sucks, but is needed beacuse of how
		// quicktabs adds the required files in a theme function
		// this shouldn't be a problem in production, since this function only builds
		// the less files if they aren't built already. Otherwise, it just modifies the
		// css array to include the built files.
		_less_build($vars, 'page');
	}

	if( isset($vars['title']) && $vars['title'] ) {
		$vars['body_classes'] .= ' ' . wistar_str2class($vars['title']);
	}
	if(isset($_SESSION['donation_form'])&&arg(0)!='give'&&arg(1)!='confirmation'){
		unset($_SESSION['donation_form']);
	}

	$node = $vars['node'];
	if ($node->type=='microsite_subpage') {
		if ($node->field_template_type[0]['value'] == 1) {
			$vars['body_classes'] .= ' microsite-subpage-fullwidth';
		}
	}
}
コード例 #20
0
 public static function deliverMinimalHtmlPage($result)
 {
     if (is_int($result)) {
         drupal_deliver_html_page($result);
         return;
     }
     // Emit the correct charset HTTP header, but not if the page callback
     // result is NULL, since that likely indicates that it printed something
     // in which case, no further headers may be sent, and not if code running
     // for this page request has already set the content type header.
     if (isset($result) && is_null(drupal_get_http_header('Content-Type'))) {
         drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
     }
     // Send appropriate HTTP-Header for browsers and search engines.
     global $language;
     drupal_add_http_header('Content-Language', $language->language);
     if (isset($result)) {
         print '<html><head><title>' . drupal_get_title() . '</title>' . drupal_get_css() . drupal_get_js() . '</head>';
         print '<body>' . render($result) . '</body></html>';
     }
     drupal_page_footer();
 }
コード例 #21
0
ファイル: template.php プロジェクト: naveen3/test2-online
/**
 * Override or insert variables into the page templates.
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 */
function cmssimplicity_preprocess_page(&$vars)
{
    //Adding stylesheet for color
    $theme_color_style = theme_get_setting('theme_color_style');
    $theme_background = theme_get_setting('theme_background');
    $css_color_style_path = path_to_theme() . '/css/colors/' . $theme_color_style . '/' . $theme_color_style . '.css';
    if (!file_exists($css_color_style_path)) {
        $css_color_style_path = drupal_get_path('theme', 'cmssimplicity') . '/css/colors/' . $theme_color_style . '/' . $theme_color_style . '.css';
    }
    $background_color_style_path = path_to_theme() . '/css/background/' . $theme_background . '/' . $theme_background . '.css';
    if (!file_exists($background_color_style_path)) {
        $background_color_style_path = drupal_get_path('theme', 'cmssimplicity') . '/css/background/' . $theme_background . '/' . $theme_background . '.css';
    }
    $themes = array();
    foreach ($vars['css']['all']['theme'] as $key => $value) {
        $themes[$key] = $value;
        if ($key == drupal_get_path('theme', 'cmssimplicity') . '/css/cmssimplicity.css') {
            $themes[$css_color_style_path] = 1;
            $themes[$background_color_style_path] = 1;
        }
    }
    $vars['css']['all']['theme'] = $themes;
    $vars['styles'] = drupal_get_css($vars['css']);
    if (!module_exists('conditional_styles')) {
        $vars['styles'] .= $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'], '');
    }
    $classes = split(' ', $vars['body_classes']);
    // Add class to body depends on selected primary menu from theme settings.
    $vars['body_classes_array'] = $classes;
    $classes[] = 'color-' . $theme_color_style;
    $classes[] = 'bg-' . $theme_background;
    $vars['body_classes'] = implode(' ', $classes);
    // Concatenate with spaces.
    // Hook into color.module
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
コード例 #22
0
ファイル: template.php プロジェクト: 10corp/NMU-Zen
/**
 * Override or insert variables into the node templates.
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("node" in this case.)
 */
function zen_nmu_preprocess_node(&$variables, $hook)
{
    //add a css and js file to the fearless_nmu_homepage content type
    //this will appear above the main styles.css include so these styles can be overwritten
    if ($variables['type'] == 'fearless_nmu_homepage') {
        drupal_add_css(drupal_get_path('theme', 'zen_nmu') . '/css/nmu-homepage.css');
        $css = drupal_add_css();
        $styles = drupal_get_css($css);
    } elseif ($variables['type'] == 'fearless_admissions_home') {
        drupal_add_css(drupal_get_path('theme', 'zen_nmu') . '/css/nmu-admissions.css');
        $css = drupal_add_css();
        $styles = drupal_get_css($css);
    } elseif ($variables['type'] == 'fearless_block_newsletter') {
        drupal_add_css(drupal_get_path('theme', 'zen_nmu') . '/css/fearless-block-newsletter.css');
        $css = drupal_add_css();
        $styles = drupal_get_css($css);
    } elseif ($variables['type'] == 'fearless_homepage' || $variables['type'] == 'fearless_homepage_info') {
        drupal_add_css(drupal_get_path('theme', 'zen_nmu') . '/css/fearless-homepage.css');
        $css = drupal_add_css();
        $styles = drupal_get_css($css);
        //homepages need this JS library for the cycle to work
        drupal_add_js(drupal_get_path('theme', 'zen_nmu') . '/js/vendor/jquery.cycle2.min.js', array('type' => 'file', 'scope' => 'header'));
    } elseif ($variables['type'] == 'fearless_northern_notes') {
        drupal_add_css(drupal_get_path('theme', 'zen_nmu') . '/css/fearless-northern-notes.css');
        $css = drupal_add_css();
        $styles = drupal_get_css($css);
    } elseif ($variables['type'] == 'programs_what_s_new_nmu') {
        drupal_add_css(drupal_get_path('theme', 'zen_nmu') . '/css/fearless-alumni-newsletter.css');
        $css = drupal_add_css();
        $styles = drupal_get_css($css);
    }
}
コード例 #23
0
ファイル: template.php プロジェクト: knieper/crltmich
/**
 * Override or insert variables into the page templates.
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 */
function city_magazine_preprocess_page(&$vars)
{
    $theme_color_style = theme_get_setting('theme_color_style');
    $theme_background = theme_get_setting('theme_background');
    $css_color_style_path = path_to_theme() . '/css/colors/' . $theme_color_style . '/' . $theme_color_style . '.css';
    if (!file_exists($css_color_style_path)) {
        $css_color_style_path = drupal_get_path('theme', 'city_magazine') . '/css/colors/' . $theme_color_style . '/' . $theme_color_style . '.css';
    }
    $background_color_style_path = path_to_theme() . '/css/background/' . $theme_background . '/' . $theme_background . '.css';
    if (!file_exists($background_color_style_path)) {
        $background_color_style_path = drupal_get_path('theme', 'city_magazine') . '/css/background/' . $theme_background . '/' . $theme_background . '.css';
    }
    $themes = array();
    foreach ($vars['css']['all']['theme'] as $key => $value) {
        $themes[$key] = $value;
        if ($key == drupal_get_path('theme', 'city_magazine') . '/css/city_magazine.css') {
            $themes[$css_color_style_path] = 1;
            $themes[$background_color_style_path] = 1;
        }
    }
    $vars['css']['all']['theme'] = $themes;
    $vars['styles'] = drupal_get_css($vars['css']);
    if (!module_exists('conditional_styles')) {
        $vars['styles'] .= $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'], '');
    }
    $body_classes = split(' ', $vars['body_classes']);
    // Add class to body depends on selected primary menu from theme settings.
    $vars['body_classes_array'] = $body_classes;
    $body_classes[] = 'color-' . $theme_color_style;
    $body_classes[] = 'bg-' . $theme_background;
    if (empty($vars['preface_upper_top'])) {
        $body_classes[] = 'no-preface-upper-top';
    }
    $vars['body_classes'] = implode(' ', $body_classes);
    // Concatenate with spaces.
}
コード例 #24
0
/**
 * Intercept page template variables
 *
 * @param $vars
 *   A sequential array of variables passed to the theme function.
 */
function SimplyCivi_preprocess_page(&$vars)
{
    global $user;
    $vars['path'] = base_path() . path_to_theme() . '/';
    $vars['path_parent'] = base_path() . drupal_get_path('theme', 'SimplyCivi') . '/';
    $vars['user'] = $user;
    // Prep the logo for being displayed
    $site_slogan = !$vars['site_slogan'] ? '' : ' - ' . $vars['site_slogan'];
    $logo_img = '';
    $title = $text = variable_get('site_name', '');
    if ($vars['logo']) {
        $logo_img = "<img src='" . $vars['logo'] . "' alt='" . $title . "' border='0' />";
        $text = $vars['site_name'] ? $logo_img . $text : $logo_img;
    }
    $vars['logo_block'] = !$vars['site_name'] && !$vars['logo'] ? '' : l($text, '', array('attributes' => array('title' => $title . $site_slogan), 'html' => !empty($logo_img)));
    //Play nicely with the page_title module if it is there.
    if (!module_exists('page_title')) {
        // Fixup the $head_title and $title vars to display better.
        $title = drupal_get_title();
        $headers = drupal_set_header();
        // if this is a 403 and they aren't logged in, tell them they need to log in
        if (strpos($headers, 'HTTP/1.1 403 Forbidden') && !$user->uid) {
            $title = t('Please login to continue');
        }
        $vars['title'] = $title;
        if (!drupal_is_front_page()) {
            $vars['head_title'] = $title . ' | ' . $vars['site_name'];
            if ($vars['site_slogan'] != '') {
                $vars['head_title'] .= ' &ndash; ' . $vars['site_slogan'];
            }
        }
        $vars['head_title'] = strip_tags($vars['head_title']);
    }
    //Perform RTL - LTR swap and load RTL Styles.
    if ($vars['language']->dir == 'rtl') {
        // Remove SimplyCivi Grid and use RTL grid
        $css = $vars['css'];
        $css['screen,projection']['theme'][path_to_theme() . '/SimplyCivi/SimplyCivi/plugins/rtl/screen.css'] = TRUE;
        $vars['styles'] = drupal_get_css($css);
        //setup rtl css for IE
        $vars['styles_ie']['ie'] = '<link href="' . $path . 'css/ie-rtl.css" rel="stylesheet"  type="text/css"  media="screen, projection" />';
        $vars['styles_ie']['ie6'] = '<link href="' . $path . 'css/ie6-rtl.css" rel="stylesheet"  type="text/css"  media="screen, projection" />';
    }
    $vars['meta'] = '';
    // SEO optimization, add in the node's teaser, or if on the homepage, the mission statement
    // as a description of the page that appears in search engines
    if ($vars['is_front'] && $vars['mission'] != '') {
        $vars['meta'] .= '<meta name="description" content="' . SimplyCivi_trim_text($vars['mission']) . '" />' . "\n";
    } elseif (isset($vars['node']->teaser) && $vars['node']->teaser != '') {
        $vars['meta'] .= '<meta name="description" content="' . SimplyCivi_trim_text($vars['node']->teaser) . '" />' . "\n";
    } elseif (isset($vars['node']->body) && $vars['node']->body != '') {
        $vars['meta'] .= '<meta name="description" content="' . SimplyCivi_trim_text($vars['node']->body) . '" />' . "\n";
    }
    // SEO optimization, if the node has tags, use these as keywords for the page
    if (isset($vars['node']->taxonomy)) {
        $keywords = array();
        foreach ($vars['node']->taxonomy as $term) {
            $keywords[] = $term->name;
        }
        $vars['meta'] .= '<meta name="keywords" content="' . implode(',', $keywords) . '" />' . "\n";
    }
    // SEO optimization, avoid duplicate titles in search indexes for pager pages
    if (isset($_GET['page']) || isset($_GET['sort'])) {
        $vars['meta'] .= '<meta name="robots" content="noindex,follow" />' . "\n";
    }
    if (theme_get_setting('SimplyCivi_showgrid')) {
        $vars['body_classes'] .= ' showgrid ';
    }
    // Make sure framework styles are placed above all others.
    $vars['css_alt'] = SimplyCivi_css_reorder($vars['css']);
    $vars['styles'] = drupal_get_css($vars['css_alt']);
    /* I like to embed the Google search in various places, uncomment to make use of this
      // setup search for custom placement
      $search = module_invoke('google_cse', 'block', 'view', '0');
      $vars['search'] = $search['content'];
      */
    /* to remove specific CSS files from modules use this trick
      // Remove stylesheets
      $css = $vars['css'];
      unset($css['all']['module']['sites/all/modules/contrib/plus1/plus1.css']);
      $vars['styles'] = drupal_get_css($css);
      */
}
コード例 #25
0
ファイル: template.php プロジェクト: rtanglao/rtvps-d6
function acquia_marina_preprocess_page(&$vars)
{
    global $language;
    // Remove sidebars if disabled e.g., for Panels
    if (!$vars['show_blocks']) {
        $vars['sidebar_first'] = '';
        $vars['sidebar_last'] = '';
    }
    // Build array of helpful body classes
    $body_classes = array();
    $body_classes[] = $vars['logged_in'] ? 'logged-in' : 'not-logged-in';
    // Page user is logged in
    $body_classes[] = $vars['is_front'] ? 'front' : 'not-front';
    // Page is front page
    if (isset($vars['node'])) {
        $body_classes[] = $vars['node'] ? 'full-node' : '';
        // Page is one full node
        $body_classes[] = $vars['node']->type == 'forum' || arg(0) == 'forum' ? 'forum' : '';
        // Page is Forum page
        $body_classes[] = $vars['node']->type ? 'node-type-' . $vars['node']->type : '';
        // Page has node-type-x, e.g., node-type-page
    } else {
        $body_classes[] = arg(0) == 'forum' ? 'forum' : '';
        // Page is Forum page
    }
    $body_classes[] = module_exists('panels_page') && panels_page_get_current() ? 'panels' : '';
    // Page is Panels page
    $body_classes[] = 'layout-' . ($vars['sidebar_first'] ? 'first-main' : 'main') . ($vars['sidebar_last'] ? '-last' : '');
    // Page sidebars are active
    if ($vars['preface_first'] || $vars['preface_middle'] || $vars['preface_last']) {
        // Preface regions are active
        $preface_regions = 'preface';
        $preface_regions .= $vars['preface_first'] ? '-first' : '';
        $preface_regions .= $vars['preface_middle'] ? '-middle' : '';
        $preface_regions .= $vars['preface_last'] ? '-last' : '';
        $body_classes[] = $preface_regions;
    }
    if ($vars['postscript_first'] || $vars['postscript_middle'] || $vars['postscript_last']) {
        // Postscript regions are active
        $postscript_regions = 'postscript';
        $postscript_regions .= $vars['postscript_first'] ? '-first' : '';
        $postscript_regions .= $vars['postscript_middle'] ? '-middle' : '';
        $postscript_regions .= $vars['postscript_last'] ? '-last' : '';
        $body_classes[] = $postscript_regions;
    }
    $body_classes = array_filter($body_classes);
    // Remove empty elements
    $vars['body_classes'] = implode(' ', $body_classes);
    // Create class list separated by spaces
    // Add preface & postscript classes with number of active sub-regions
    $region_list = array('prefaces' => array('preface_first', 'preface_middle', 'preface_last'), 'postscripts' => array('postscript_first', 'postscript_middle', 'postscript_last'));
    foreach ($region_list as $sub_region_key => $sub_region_list) {
        $active_regions = array();
        foreach ($sub_region_list as $region_item) {
            if (!empty($vars[$region_item])) {
                $active_regions[] = $region_item;
            }
        }
        $vars[$sub_region_key] = $sub_region_key . '-' . strval(count($active_regions));
    }
    // Generate menu tree from source of primary links
    if (module_exists('i18nmenu')) {
        $vars['primary_links_tree'] = i18nmenu_translated_tree(variable_get('menu_primary_links_source', 'primary-links'));
    } else {
        $vars['primary_links_tree'] = menu_tree(variable_get('menu_primary_links_source', 'primary-links'));
    }
    // TNT THEME SETTINGS SECTION
    // Display mission statement on all pages
    if (theme_get_setting('mission_statement_pages') == 'all') {
        $vars['mission'] = theme_get_setting('mission', false);
    }
    // Hide breadcrumb on all pages
    if (theme_get_setting('breadcrumb_display') == 0) {
        $vars['breadcrumb'] = '';
    }
    // Set site title, slogan, mission, page title & separator
    if (!module_exists('page_title')) {
        $title = t(variable_get('site_name', ''));
        $slogan = t(variable_get('site_slogan', ''));
        $mission = t(variable_get('site_mission', ''));
        $page_title = t(drupal_get_title());
        $title_separator = theme_get_setting('configurable_separator');
        if (drupal_is_front_page()) {
            // Front page title settings
            switch (theme_get_setting('front_page_title_display')) {
                case 'title_slogan':
                    $vars['head_title'] = drupal_set_title($title . $title_separator . $slogan);
                    break;
                case 'slogan_title':
                    $vars['head_title'] = drupal_set_title($slogan . $title_separator . $title);
                    break;
                case 'title_mission':
                    $vars['head_title'] = drupal_set_title($title . $title_separator . $mission);
                    break;
                case 'custom':
                    if (theme_get_setting('page_title_display_custom') !== '') {
                        $vars['head_title'] = drupal_set_title(t(theme_get_setting('page_title_display_custom')));
                    }
            }
        } else {
            // Non-front page title settings
            switch (theme_get_setting('other_page_title_display')) {
                case 'ptitle_slogan':
                    $vars['head_title'] = drupal_set_title($page_title . $title_separator . $slogan);
                    break;
                case 'ptitle_stitle':
                    $vars['head_title'] = drupal_set_title($page_title . $title_separator . $title);
                    break;
                case 'ptitle_smission':
                    $vars['head_title'] = drupal_set_title($page_title . $title_separator . $mission);
                    break;
                case 'ptitle_custom':
                    if (theme_get_setting('other_page_title_display_custom') !== '') {
                        $vars['head_title'] = drupal_set_title($page_title . $title_separator . t(theme_get_setting('other_page_title_display_custom')));
                    }
                    break;
                case 'custom':
                    if (theme_get_setting('other_page_title_display_custom') !== '') {
                        $vars['head_title'] = drupal_set_title(t(theme_get_setting('other_page_title_display_custom')));
                    }
            }
        }
        $vars['head_title'] = strip_tags($vars['head_title']);
        // Remove any potential html tags
    }
    // Set meta keywords and description (unless using Meta tags module)
    if (!module_exists('nodewords')) {
        if (theme_get_setting('meta_keywords') !== '') {
            $keywords = '<meta name="keywords" content="' . theme_get_setting('meta_keywords') . '" />';
            $vars['head'] .= $keywords . "\n";
        }
        if (theme_get_setting('meta_description') !== '') {
            $keywords = '<meta name="description" content="' . theme_get_setting('meta_description') . '" />';
            $vars['head'] .= $keywords . "\n";
        }
    }
    // Add custom theme settings
    $theme_settings_path = path_to_theme() . '/theme_settings/';
    drupal_add_css($theme_settings_path . theme_get_setting('theme_width') . '.css', 'theme');
    drupal_add_css($theme_settings_path . theme_get_setting('theme_fonts') . '.css', 'theme');
    $banner_file = theme_get_setting('theme_banner');
    $vars['banner_image'] = $banner_file == 'none' ? '' : 'style="background: url(' . base_path() . $theme_settings_path . 'banners/' . $banner_file . ') no-repeat;"';
    // Set IE6 & IE7 stylesheets, plus right-to-left versions
    $theme_path = base_path() . path_to_theme();
    $vars['ie6_styles'] = '<link type="text/css" rel="stylesheet" media="all" href="' . $theme_path . '/ie6-fixes.css" />' . "\n";
    $vars['ie7_styles'] = '<link type="text/css" rel="stylesheet" media="all" href="' . $theme_path . '/ie7-fixes.css" />' . "\n";
    if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
        $vars['ie6_styles'] .= '    <link type="text/css" rel="stylesheet" media="all" href="' . $theme_path . '/ie6-fixes-rtl.css" />' . "\n";
        $vars['ie7_styles'] .= '    <link type="text/css" rel="stylesheet" media="all" href="' . $theme_path . '/ie7-fixes-rtl.css" />' . "\n";
    }
    if (file_exists(path_to_theme() . '/local.css')) {
        // Add local css file if present
        $theme_path = base_path() . path_to_theme() . '/local.css';
        $vars['local_styles'] = '<link type="text/css" rel="stylesheet" media="all" href="' . $theme_path . '" />' . "\n";
    }
    // Use grouped import technique for more than 30 un-aggregated stylesheets (css limit fix for IE)
    $css = drupal_add_css();
    if (theme_get_setting('fix_css_limit') && !variable_get('preprocess_css', FALSE) && acquia_marina_css_count($css) > 26) {
        $styles = '';
        $suffix = "\n" . '</style>' . "\n";
        foreach ($css as $media => $types) {
            $prefix = '<style type="text/css" media="' . $media . '">' . "\n";
            $imports = array();
            foreach ($types as $files) {
                foreach ($files as $file => $preprocess) {
                    $imports[] = '@import "' . base_path() . $file . '";';
                    if (count($imports) == 30) {
                        $styles .= $prefix . implode("\n", $imports) . $suffix;
                        $imports = array();
                    }
                }
            }
            $styles .= count($imports) > 0 ? $prefix . implode("\n", $imports) . $suffix : '';
        }
        $vars['styles'] = $styles;
    } else {
        $vars['styles'] = drupal_get_css();
        // Use normal link technique
    }
    if (drupal_is_front_page()) {
        $vars['closure'] .= '<div id="legal-notice">Theme provided by <a href="http://www.acquia.com">Acquia, Inc.</a> under GPL license from TopNotchThemes <a href="http://www.topnotchthemes.com">Drupal themes</a></div>';
    }
}
コード例 #26
0
ファイル: template.php プロジェクト: Aladjinn/upstream
/**
 * Delivery callback to display an empty page.
 *
 * This function is used to print out a bare minimum empty page which still has
 * the scripts and styles necessary in order to trigger the overlay to close.
 */
function omega_override_overlay_deliver_empty_page()
{
    $empty_page = '<html><head><title></title>' . drupal_get_css() . omega_get_js() . '</head><body class="overlay"></body></html>';
    print $empty_page;
    drupal_exit();
}
コード例 #27
0
ファイル: template.php プロジェクト: rasjones/csa
/**
 * Implementation of template_preprocess_page().
 */
function csa_base_preprocess_page(&$variables)
{
    $conditional = array();
    $query_string = '?' . substr(variable_get('css_js_query_string', '0'), 0, 1);
    $conditional['IE'] = array();
    // Target all IE versions
    $conditional['IE 6'] = array();
    // Target Internet Explorer 6 only
    $conditional['IE 7'] = array();
    // Target Internet Explorer 7 only
    $conditional['IE 8'] = array();
    // Target Internet Explorer 8 only
    $conditional['IE 6'][] .= '<script type="text/javascript">var blankImgIE="' . theme('theme_path', '/images/blank.gif') . '";</script>';
    $conditional['IE 6'][] .= '<style type="text/css" media="all">@import "' . theme('theme_path', '/css/fix-ie-6.css') . $query_string . '";</style>';
    $conditional['IE 6'][] .= '<style type="text/css">img { behavior: url(' . theme('theme_path', '/script/iepngfix.htc') . $query_string . ') }</style>';
    $conditional['IE 7'][] .= '<style type="text/css" media="all">@import "' . theme('theme_path', '/css/fix-ie-7.css') . $query_string . '";</style>';
    $conditional_output = '';
    foreach ($conditional as $version => $rules) {
        if (count($rules)) {
            $conditional_output .= '<!--[if ' . $version . "]>\n";
            foreach ($rules as $rule) {
                $conditional_output .= $rule . "\n";
            }
            $conditional_output .= "<![endif]-->\n";
        }
    }
    // Rebuild the $scripts output
    $js = drupal_add_js();
    // remove sticky table headers, we use our own modified version for this
    unset($js['module']['misc/tableheader.js']);
    $variables['scripts'] = drupal_get_js('header', $js) . $conditional_output;
    // Rebuild the $styles output
    $css = drupal_add_css();
    $variables['styles'] = drupal_get_css($css);
    $http = empty($_SERVER['HTTPS']) ? 'http' : 'https';
    $variables['styles'] .= "<link href='" . $http . "://fonts.googleapis.com/css?family=Molengo' rel='stylesheet' type='text/css'>\n";
    $variables['styles'] .= "<link href='" . $http . "://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>\n";
    // add a var $admin_section to see if we are in the admin section of the site
    $variables['admin_section'] = FALSE;
    if (arg(0) == 'admin' || arg(2) == 'edit' || arg(2) == 'webform-results') {
        $variables['body_classes'] .= ' admin-section';
        $variables['admin_section'] = TRUE;
    }
    // Move second sidebar to first if this option is enabled in the theme settings and the user is viewing an admin page
    if (theme_get_setting('csa_base_move_sidebar') && $variables['admin_section']) {
        if (!empty($variables['sidebar_1']) && !empty($variables['sidebar_2'])) {
            $variables['sidebar_1'] .= $variables['sidebar_2'];
            unset($variables['sidebar_2']);
        } elseif (!empty($variables['sidebar_2'])) {
            $variables['sidebar_1'] = $variables['sidebar_2'];
            unset($variables['sidebar_2']);
        }
    }
    // Set up layout variable
    $variables['layout'] = 'none';
    if (!empty($variables['sidebar_1'])) {
        $variables['layout'] = 'sidebar-1';
    }
    if (!empty($variables['sidebar_2'])) {
        $variables['layout'] = $variables['layout'] == 'sidebar-1' ? 'both' : 'sidebar-2';
    }
    // Strip sidebar classes from the body
    $variables['body_classes'] = str_replace(array('both', 'no-sidebars', 'two-sidebars', 'one-sidebar', 'sidebar-left', 'sidebar-right'), '', $variables['body_classes']);
    // Remove excess spaces
    $variables['body_classes'] = str_replace('  ', ' ', trim($variables['body_classes']));
    // Add information about the number of sidebars
    if ($variables['layout'] == 'both') {
        $variables['body_classes'] .= ' two-sidebars';
    } elseif ($variables['layout'] == 'none') {
        $variables['body_classes'] .= ' no-sidebars';
    } else {
        $variables['body_classes'] .= ' one-sidebar ' . $variables['layout'];
    }
    // add the taxonomy terms to the body_classes
    if (module_exists('taxonomy') && !empty($variables['node_terms'])) {
        $terms = array();
        foreach (taxonomy_node_get_terms($variables['node']) as $term) {
            $terms[] = $variables['node_terms'] . csa_base_safe_css_name($term->name);
        }
        if (count($terms)) {
            $variables['body_classes'] .= ' ' . implode(' ', $terms);
        }
    }
    if (!empty($variables['logo'])) {
        $logo_img = theme('image', substr($variables['logo'], strlen(base_path()), strlen($variables['logo'])), $variables['site_name'], $variables['site_name']);
        $variables['logo'] = l($logo_img, "<front>", array('html' => 'true', 'attributes' => array('title' => $variables['site_name'])));
    }
    // Display mission statement on all pages?
    if (theme_get_setting('mission_statement_pages') == 'all') {
        $variables['mission'] = theme_get_setting('mission', FALSE);
    }
    // Show the title in the breadcrumb?
    if (!theme_get_setting('breadcrumb_display_admin') && $variables['admin_section'] || theme_get_setting('breadcrumb_display') == 0 && !$variables['admin_section']) {
        //Hide breadcrumb on all pages?
        unset($variables['breadcrumb']);
    } elseif (theme_get_setting('breadcrumb_with_title')) {
        $variables['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb(), $variables['title']);
    }
    $title = t(variable_get('site_name', ''));
    $slogan = t(variable_get('site_slogan', ''));
    $mission = t(variable_get('site_mission', ''));
    $page_title = t(drupal_get_title());
    $title_separator = theme_get_setting('configurable_separator');
    // Front page title settings
    if (drupal_is_front_page()) {
        switch (theme_get_setting('front_page_title_display')) {
            case 'title_slogan':
                $variables['head_title'] = drupal_set_title($title . $title_separator . $slogan);
                break;
            case 'slogan_title':
                $variables['head_title'] = drupal_set_title($slogan . $title_separator . $title);
                break;
            case 'title_mission':
                $variables['head_title'] = drupal_set_title($title . $title_separator . $mission);
                break;
            case 'custom':
                if (theme_get_setting('page_title_display_custom') !== '') {
                    $variabless['head_title'] = drupal_set_title(t(theme_get_setting('page_title_display_custom')));
                }
        }
    } else {
        // Non-front page title settings
        switch (theme_get_setting('other_page_title_display')) {
            case 'ptitle_slogan':
                $variables['head_title'] = drupal_set_title($page_title . $title_separator . $slogan);
                break;
            case 'ptitle_stitle':
                $variables['head_title'] = drupal_set_title($page_title . $title_separator . $title);
                break;
            case 'ptitle_smission':
                $variables['head_title'] = drupal_set_title($page_title . $title_separator . $mission);
                break;
            case 'ptitle_custom':
                if (theme_get_setting('other_page_title_display_custom') !== '') {
                    $variables['head_title'] = drupal_set_title($page_title . $title_separator . t(theme_get_setting('other_page_title_display_custom')));
                }
                break;
            case 'custom':
                if (theme_get_setting('other_page_title_display_custom') !== '') {
                    $variables['head_title'] = drupal_set_title(t(theme_get_setting('other_page_title_display_custom')));
                }
        }
    }
    // Set variables for the primary and secondary links
    if (!empty($variables['primary_links'])) {
        if (theme_get_setting('primary_links_allow_tree')) {
            $variables['primary_menu'] = menu_tree(variable_get('menu_primary_links_source', 'primary-links'));
        } else {
            $variables['primary_menu'] = theme('links', $variables['primary_links'], array('class' => 'menu primary-links'));
        }
    }
    if (!empty($variables['secondary_links'])) {
        if (theme_get_setting('secondary_links_allow_tree')) {
            $variables['secondary_menu'] = menu_tree(variable_get('menu_secondary_links_source', 'secondary-links'));
        } else {
            $variables['secondary_menu'] = theme('links', $variables['secondary_links'], array('class' => 'menu secondary-links'));
        }
    }
    if (theme_get_setting('hide_front_page_title') && drupal_is_front_page()) {
        $variables['title'] = NULL;
    } else {
        // Remove any potential html tags
        $variables['head_title'] = strip_tags($variables['head_title']);
    }
}
コード例 #28
0
ファイル: imce-page.tpl.php プロジェクト: qltd/kresge_d6
<head>
  <title><?php 
print t('File Browser');
?>
</title>
  <?php 
if (isset($_GET['app'])) {
    drupal_add_js(drupal_get_path('module', 'imce') . '/js/imce_set_app.js');
}
?>
  <?php 
print drupal_get_html_head();
?>
  <?php 
print drupal_get_css();
?>
  <?php 
$vars['scripts'] = drupal_get_js('header');
?>
  <?php 
function_exists('jquery_update_preprocess_page') && jquery_update_preprocess_page($vars);
?>
  <?php 
print $vars['scripts'];
?>
  <style media="all" type="text/css">/*Quick-override*/</style>
</head>

<body class="imce">
<div id="imce-messages"><?php 
コード例 #29
0
/**
 * Implementation of preprocess_page().
 */
function tao_preprocess_page(&$vars)
{
    $attr = array();
    $attr['class'] = $vars['body_classes'];
    $attr['class'] .= ' tao';
    // Add the tao class so that we can avoid using the 'body' selector
    // Replace screen/all stylesheets with print
    // We want a minimal print representation here for full control.
    if (isset($_GET['print'])) {
        $css = tao_css_stripped();
        unset($css['all']);
        unset($css['screen']);
        $css['all'] = $css['print'];
        $vars['styles'] = drupal_get_css($css);
        // Add print header
        $vars['print_header'] = theme('print_header');
        // Replace all body classes
        $attr['class'] = 'print';
        // Use print template
        $vars['template_file'] = 'print-page';
        // Suppress devel output
        $GLOBALS['devel_shutdown'] = FALSE;
    } else {
        $vars['styles'] = drupal_get_css(tao_css_stripped());
    }
    // Split primary and secondary local tasks
    $vars['tabs'] = theme('menu_local_tasks', 'primary');
    $vars['tabs2'] = theme('menu_local_tasks', 'secondary');
    // Use the logo if it exists
    $vars['logo'] = file_exists($vars['logo']) ? l(theme('image', $logo), '<front>', array('attributes' => array('class' => 'logo'), 'html' => TRUE)) : NULL;
    $vars['site_name'] = empty($vars['logo']) ? l($vars['site_name'], '<front>') : NULL;
    // Don't render the attributes yet so subthemes can alter them
    $vars['attr'] = $attr;
}
コード例 #30
0
ファイル: template.php プロジェクト: ATouhou/www.alim.org
/**
 * Override or insert PHPTemplate variables into the templates.
 */
function phptemplate_preprocess_page(&$vars) {
  $vars['tabs2'] = menu_secondary_local_tasks();

  // Hook into color.module
  if (module_exists('color')) {
    _color_page_alter($vars);
  }

   // Construct page title
  if (drupal_get_title()) {
    $head_title = array(strip_tags(drupal_get_title()), variable_get('site_name', 'Drupal'));
  }
  else {
    $head_title = array(variable_get('site_name', 'Drupal'));
    if (variable_get('site_slogan', '')) {
      $head_title[] = variable_get('site_slogan', '');
    }
  }
   $crumb = drupal_get_breadcrumb();
    $c = count($crumb);	


   if(strip_tags($crumb[3])=="Hadith")  {    unset($crumb[3]);   }
   
   if(strip_tags($crumb[2])=="Hadith")   {
     
	 $val = arg(2);
	 switch ($val) {
		case "SAD" :
		$a[$c-1] = "Abu-Dawood";
		$crumb=array_merge($crumb,$a);
		break;
		
		case "AMH" :
		$a[$c-1] = "Al-Muwatta";
		$crumb=array_merge($crumb,$a);
		break;
		
		case "HDQ" :
		$a[$c-1] = "Al-Qudsi";
		$crumb=array_merge($crumb,$a);
		break;
		
		case "TIR" :
		$a[$c-1] = "Al-Tirmidhi";
		$crumb=array_merge($crumb,$a);
		break;
		
		case "fiq" :
		$a[$c-1] = "Fiqh-us-Sunnah";
		$crumb=array_merge($crumb,$a);
		break;
		
		case "SHB" :
		$a[$c-1] = "Sahih Al-Bukhari";
		$crumb=array_merge($crumb,$a);
		break;
		
		case "SHM" :
		$a[$c-1] = "Sahih Muslim";
		$crumb=array_merge($crumb,$a);
		break;		
		
		}

   }
   
   if(arg(3)=='english')   {
     
	 $val = arg(5);
	 switch ($val) {
	  case "TLT" : 
	  $a[$c-1] = "Transliteration";
	  $crumb=array_merge($crumb,$a);
	  break;
		
	 }
	  switch ($val) {
	  case "ASD" : 
	  $a[$c-1] = "Asad Translation";
	  $crumb=array_merge($crumb,$a);
	  break;
		
	 }	 
	 	  switch ($val) {
	  case "MAL" : 
	  $a[$c-1] = "Malik Translation";
	  $crumb=array_merge($crumb,$a);
	  break;
		
	 }	 
	  switch ($val) {
	  case "PIK" : 
	  $a[$c-1] = "Pickthall Translation";
	  $crumb=array_merge($crumb,$a);
	  break;
		
	 }	 
	 	  switch ($val) {
	  case "YAT" : 
	  $a[$c-1] = "Yusuf Ali Translation";
	  $crumb=array_merge($crumb,$a);
	  break;		
	 }
	 
	}	
	   
   if(arg(3)=='introduction')   {
     
	 $val = arg(5);
	 switch ($val) {
	  case "MAL" : 
	  $a[$c-1] = "Malik Surah Introductions";
	  $crumb=array_merge($crumb,$a);
	  break;
		
     }
	 
	 switch ($val) {
	  case "QSI" : 
	  $a[$c-1] = "Maududi Surah Introductions";
	  $crumb=array_merge($crumb,$a);
	  break;
		
     }
	 
	}
   
   if(strip_tags($crumb[$c-1])=="Hadith Narrator Index")   {     unset($crumb[$c-1]);   }   
   if(arg(2)=='subject' && arg(3)!='ayah')   {     unset($crumb[$c-1]);   }
    if(arg(2)=='duas' && arg(3)=='content')   {     unset($crumb[$c-1]);   }   
    if(strip_tags($crumb[$c-1])=="Fiqh-us-Sunnah")   {     unset($crumb[$c-1]);   }   
   if(arg(2)=='islamposters' && arg(3)=='content')   {    // unset($crumb[$c-1]);
      }   
   if(arg(2)=='narrator')   {      unset($crumb[$c-1]);   }   
    if(arg(2)=='narrators')   {      unset($crumb[$c-1]);   }   
   if(arg(2)=='khalifa' && arg(3)=='content')   {     unset($crumb[$c-1]);   }   
   if(arg(2)=='companion' && arg(3)=='content')   {     unset($crumb[$c-1]);   }  
    if(arg(1)=='163607')   {     unset($crumb[$c-1]);   }
    if($c > 1 ){  	 unset($crumb[0]);	 }
	 $crumblast = strip_tags($crumb[$c-1]);
	 if($crumblast != '' ){
		 if(@substr_count($head_title,$crumblast) > 0   ){
	 		unset($crumb[$c-1]);
	 	}
	}
	
    $crumb = array_reverse($crumb);   
   
 if (drupal_get_title()) {
 	//unset($crumb[$c-1]);
 	$newhead_tit = strip_tags(implode(' | ', $crumb ));
	if(count($head_title)>1)	{
 	$vars['head_title']        = $head_title[0].' | '.$head_title[1];
	}	else	{
	 $vars['head_title']        = $newhead_tit.' | '.$head_title[0];
	}
 }
 else{
 		$newhead_tit = strip_tags(implode(' | ', $crumb ));	
		if(count($head_title)>1)		{
		$vars['head_title']        = $head_title[0].' | '.$newhead_tit.' | '.$head_title[1];
		}		else		{
		 $vars['head_title']        = $newhead_tit.' | '.$head_title[0];
		}
	} 
      if(arg(1)=='163647')	   {		 $vars['head_title'] = 'Widgets | Alim.org';    }	   
	if(arg(0)=='recentcomments')   {  $vars['head_title'] = 'Recent Comments | Alim.org';    }   
     if(arg(1)=='163664')   {     $vars['head_title'] = 'Donate| Alim.org';   }
     if(arg(1)=='163663')   {    $vars['head_title'] = 'Donate | Alim.org';    }   
   	 if(arg(1)=='scholarpage')	 {
	 			  $vars['head_title'] = 'Advisers and Scholars Details | Our Advisers and Scholars | Alim.org';	
	 }	 
   	 if(arg(2)=='our-advisers-and-scholars') 	 {	 	  
		  $vars['head_title'] = 'Submit Advisers and Scholars | Our Advisers and Scholars | Alim.org';
	 }
	 if(arg(2)=='our-advisers-and-scholars') 	 { 
	   unset($vars['title']);
	   //drupal_set_title('Submit Advisers and Scholars')
	   $vars['title'] = 'Submit Advisers and Scholars';
	 }
   # User Profile, alter the title directly by cheking each page URl
   
	 if(arg(0)=='userprofile')	 {		$vars['head_title'] = 'Profile | Alim.org';  }	 
	 if(arg(0)=='node' && arg(2)=='edit')	 {	    unset($breadcrumb);		$vars['head_title'] = 'Edit Group | Profile | Alim.org'; 	 }	 
	 if(arg(0)=='node' && arg(2)=='delete')	 {
	    unset($breadcrumb);
		$vars['head_title'] = 'Delete Group | Profile | Alim.org'; 
	 }	    
    if(arg(0)=='searchusers')	 {	 	 $vars['head_title'] = 'Search Users | Profile | Alim.org';	 }	
	if(arg(0)=='searchgroups'){	 	 $vars['head_title'] = 'Search Groups | Profile | Alim.org';	 }	 
	if(arg(0)=='relationships'){	 	 $vars['head_title'] = 'My Relationships | Profile | Alim.org';	 }	 
	if(arg(1)=='create_admin')	 {	 	$vars['head_title'] = 'Confirm Admin | Group Members | Manage Groups | Profile | Alim.org';	 }   
    if(arg(1)=='subscribe')	 {	   $vars['head_title'] = 'Join Group | Profile | Alim.org';	 }	
	if(arg(1)=='unsubscribe')	 {	 	$vars['head_title'] = 'Leave Group | Profile | Alim.org';	 }
	if(arg(1)=='delete_admin')	 {	  $vars['head_title'] = 'Remove Admin | Profile | Alim.org';	 }	 
	if(arg(1)=='scholarpage')	 {	  $vars['head_title'] = 'Advisers and Scholars Details | Our Advisers and Scholars | Alim.org';	 }   
    if(arg(2)=='dictionary')	{		$vars['head_title'] = 'Islamic Terms Dictionary | References | Qur\'an & Hadith | Alim.org';	} 
	if(arg(0)=='recent-group-posts'){ $vars['head_title'] = 'Recent Group Posts | Alim.org'; } 
	if(arg(1)=='all-recent-tags') { $vars['head_title'] = 'Recent Tags | Alim.org'; }
	if(arg(1)=='clippings')	 {	 	 $vars['head_title'] = 'Home | My Notebook | Alim.org';	 }	
	if(arg(0) == 'bookmarks') {  $vars['head_title'] = 'Home | Bookmarks | Alim.org';	 }	
  
   if(arg(0)=='relationships')	{	alim_removetab('All',  $vars);}	
	 if(arg(0)=='user' && arg(2)=='edit')
	 {
	 	$vars['head_title'] = 'Edit Profile | Alim.org';
		alim_removetab('View',  $vars);
	    alim_removetab('Edit',  $vars);
		 alim_removetab('Notifications',  $vars);
		alim_removetab('3rd party identities',  $vars);
	
	 }
	global $user;
	$arr_role =  $user->roles;				
	if(in_array("Developer", $arr_role)==FALSE && in_array("System Administrator", $arr_role)==FALSE)	{
	 if(arg(0)=='node' && arg(2)=='edit')
	 {
	 	//alim_removetab('View',  $vars);
	    //alim_removetab('Edit',  $vars);
	    alim_removetab('Broadcast',  $vars);
	 }
    }
	 	
	 if(arg(2)=='our-advisers-and-scholars') 	 {	 	  
		  $vars['head_title'] = 'Submit Advisers and Scholars | Our Advisers and Scholars | Alim.org';
	 }
	 if(arg(1)==163997)
	 {
	 
	$vars['head_title'] = 'Alim Content Sources | References| Qur\'an & Hadith|Alim.org';

	 }
	 
if(arg(2)=='AlQuran-tafsir')
	 {
	 
	$vars['head_title'] = 'AlQuran-tafsir | Qur\'an & Hadith | Alim.org';

	 }
	 
	 // Remove the tabs from pages.
	 	
	alim_removetab('Your votes',  $vars);
	alim_removetab('Twitter',  $vars);
	alim_removetab('Bookmarks', $vars);	
	alim_removetab('Preset Bookmarks', $vars);	
   		    jquery_ui_add(array('ui.draggable', 'ui.dialog'));
			jquery_ui_add(array('ui.draggable'));
			drupal_add_js(drupal_get_path('module', 'alim_searchtags') .'/mybookmarkmenu.js');
			  if(arg(1)=='biography') {
				drupal_add_js(drupal_get_path('theme', 'alim') . '/scroll_menu/c_config.js');
				drupal_add_js(drupal_get_path('theme', 'alim') . '/scroll_menu/c_smartmenus.js');
				drupal_add_js(drupal_get_path('theme', 'alim') . '/scroll_menu/c_addon_scrolling.js');
			}
			
		 	drupal_add_js(drupal_get_path('theme', 'alim') . '/crawler.js');
			drupal_add_js(drupal_get_path('theme', 'alim') . '/galleryview/jquery.timers-1.2.js');		
			drupal_add_js(drupal_get_path('theme', 'alim') . '/galleryview/jquery.easing.1.3.js');
			drupal_add_js(drupal_get_path('theme', 'alim') . '/dhtml_menu/animatedcollapse.js');
			drupal_add_js(drupal_get_path('theme', 'alim') . '/hoverjq.js');
			$vars['scripts'] = drupal_get_js();	
			drupal_add_css(drupal_get_path('theme', 'alim') . '/galleryview/galleryview.css');
			drupal_add_css(drupal_get_path('theme', 'alim') . '/splash.css');
		
			$vars['styles'] = drupal_get_css();			
			
	alim_removetab('Voting details', $vars);
	if (arg(0) == 'bookmarks') {
      $vars['tabs'] = str_replace('Add item</span></a>', 'Add folder</span></a>', $vars['tabs']);   
	  $vars['tabs'] = str_replace('List items</span></a>', 'Manage Bookmarks</span></a>', $vars['tabs']);  
    }
	//alim_removetab('Voting details', $vars);
	//alim_removetab('Search Lucene', $vars);
		//if(arg(0) == 'search' )
			//alim_removetab('Content', $vars);			
			$vars['bookmark'] = bookmark();
	
}