本文整理汇总了PHP中drupal_add_css函数的典型用法代码示例。如果您正苦于以下问题:PHP drupal_add_css函数的具体用法?PHP drupal_add_css怎么用?PHP drupal_add_css使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了drupal_add_css函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: phptemplate_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* array An array of saved settings for this theme.
* @return
* array A form array.
*/
function phptemplate_settings($saved_settings)
{
// Empty the cached css...
cache_clear_all('abessive_custom_css', 'cache');
$form = array();
require_once path_to_theme() . '/abessive_settings.php';
// Add Farbtastic color picker
drupal_add_css('misc/farbtastic/farbtastic.css', 'module', 'all', FALSE);
drupal_add_js('misc/farbtastic/farbtastic.js');
drupal_add_js(path_to_theme() . '/theme-settings.js');
$defaults = _abessive_default_settings();
$settings = array_merge($defaults, $saved_settings);
$form['abessive_picker'] = array('#type' => 'markup', '#value' => '<div id="picker"></div>');
$form['abessive_background_color'] = array('#type' => 'textfield', '#title' => t('Background Color'), '#description' => t('What colour should the body background behind all the containers be? Default: %val', array('%val' => $defaults['abessive_background_color'])), '#default_value' => $settings['abessive_background_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
$form['abessive_border_color'] = array('#type' => 'textfield', '#title' => t('Border Color'), '#description' => t('What colour should the border around all the containers be? Default: %val', array('%val' => $defaults['abessive_border_color'])), '#default_value' => $settings['abessive_border_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
$form['abessive_content_background_color'] = array('#type' => 'textfield', '#title' => t('Content Background Color'), '#description' => t('What colour should the background of all the containers be? Default: %val', array('%val' => $defaults['abessive_content_background_color'])), '#default_value' => $settings['abessive_content_background_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field', 'abessive_calculate_gradient'));
$form['abessive_content_background_color']['abessive_r5'] = $form['abessive_content_background_color']['abessive_r4'] = $form['abessive_content_background_color']['abessive_r3'] = $form['abessive_content_background_color']['abessive_r2'] = array('#type' => 'value', '#default_value' => 0);
$form['abessive_text_color'] = array('#type' => 'textfield', '#title' => t('Text Color'), '#description' => t('What colour should the text be? Default: %val', array('%val' => $defaults['abessive_text_color'])), '#default_value' => $settings['abessive_text_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
$form['abessive_link_color'] = array('#type' => 'textfield', '#title' => t('Hyperlink Color'), '#description' => t('What colour should hyperlinks be? Default: %val', array('%val' => $defaults['abessive_link_color'])), '#default_value' => $settings['abessive_link_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
$form['abessive_link_hover_color'] = array('#type' => 'textfield', '#title' => t('Hyperlink Hover Color'), '#description' => t('What colour should hyperlinks be when hovered over? Default: %val', array('%val' => $defaults['abessive_link_hover_color'])), '#default_value' => $settings['abessive_link_hover_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
$form['abessive_link_active_color'] = array('#type' => 'textfield', '#title' => t('Hyperlink Active Color'), '#description' => t('What colour should active hyperlinks be? Default: %val', array('%val' => $defaults['abessive_link_active_color'])), '#default_value' => $settings['abessive_link_active_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
$form['abessive_left_width'] = array('#type' => 'textfield', '#title' => t('Left Column Width'), '#description' => t('How wide should the left column be? Default: %val', array('%val' => $defaults['abessive_left_width'])), '#default_value' => $settings['abessive_left_width'], '#size' => 3, '#maxlength' => 3, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#field_suffix' => 'px', '#element_validate' => array('abessive_validate_numeric_field'));
$form['abessive_right_width'] = array('#type' => 'textfield', '#title' => t('Right Column Width'), '#description' => t('How wide should the right column be? Default: %val', array('%val' => $defaults['abessive_right_width'])), '#default_value' => $settings['abessive_right_width'], '#size' => 3, '#maxlength' => 3, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#field_suffix' => 'px', '#element_validate' => array('abessive_validate_numeric_field'));
$form['#submit'][] = 'abessive_submit_settings';
return $form;
}
示例2: lamtech_preprocess_html
function lamtech_preprocess_html(&$vars)
{
drupal_add_html_head_link(array('href' => 'http://fonts.googleapis.com/css?family=Roboto:300', 'rel' => 'stylesheet', 'type' => 'text/css'));
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/html-elements.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/forms.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/page.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/comments.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/views.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/forums.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/fields.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/blocks.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/navigation.css');
// drupal_add_css(drupal_get_path('theme', 'lamtech') . '/bootstrap/css/bootstrap.min.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/bootstrap/css/bootstrap-theme.min.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/responsive.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.bootstrap.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.core.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.common.css', array('group' => 1));
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.typography.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.forms.css');
drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/off-canvas.css');
drupal_add_js(drupal_get_path('theme', 'lamtech') . '/bootstrap/js/bootstrap.js');
drupal_add_js(drupal_get_path('theme', 'lamtech') . '/js/jquery.smooth-scroll.js');
}
示例3: jollyness_preprocess_html
function jollyness_preprocess_html(&$vars)
{
//Process portfolio color
if ($portfolio_category = taxonomy_vocabulary_machine_name_load('portfolio_category')) {
$terms = taxonomy_get_tree($portfolio_category->vid);
$less = new lessc();
$css = '';
$color = '';
$class = '';
foreach ($terms as $t) {
$term = taxonomy_term_load($t->tid);
$class = drupal_html_class($t->name);
if (!empty($term->field_color)) {
foreach ($term->field_color as $v) {
$color = $v[0]['value'];
break;
}
}
if ($color) {
$css .= ".dexp-masonry-filter,.dexp-portfolio-filter{.{$class} span:before{background-color: {$color} !important;}}";
$css .= ".{$class} .portfolio-item-overlay{background-color: rgba(red({$color}), green({$color}), blue({$color}), 0.7) !important;}";
}
}
$css = $less->compile($css);
drupal_add_css($css, array('type' => 'inline'));
}
}
示例4: gettysw_preprocess_field
/**
* Add link to view full-sized image in colorbox and add caption
*/
function gettysw_preprocess_field(&$vars, $hook)
{
foreach ($vars['element']['#items'] as $delta => $item) {
if (!empty($vars['element'][$delta])) {
if (module_exists('image_field_caption') && isset($item['image_field_caption'])) {
$vars['items'][$delta]['caption'] = check_markup($item['image_field_caption']['value'], $item['image_field_caption']['format']);
}
if ($vars['element']['#field_name'] == 'field_image' && isset($item['uri']) && module_exists('colorbox') && empty($vars['element']['#object']->is_export)) {
$vars['items'][$delta]['colorbox_link'] = '<a class="colorbox" href="' . file_create_url($item['uri']) . '">Expand Image</a>';
}
if ($vars['element']['#field_name'] == 'field_image_reference_info' && $vars['element']['#view_mode'] == 'full') {
drupal_add_css(drupal_get_path('module', 'lighttable') . '/lighttable.css');
$vars['content_attributes_array'] = array('id' => 'lighttable');
foreach ($vars['items'] as $delta => $item) {
$fc_item = reset($vars['items'][$delta]['entity']['field_collection_item']);
$image_entity = $fc_item['#entity']->field_image_reference[LANGUAGE_NONE][0]['entity'];
$file_nodes = file_usage_list($image_entity);
$image_node = node_load(key($file_nodes['file']['node']));
$vars['items'][$delta]['entity']['field_collection_item']['title'] = array('#markup' => '<span class="field-title">' . $image_node->title . '</span>', '#weight' => -1);
$left = $fc_item['#entity']->field_x_pos[LANGUAGE_NONE][0]['value'];
$top = $fc_item['#entity']->field_y_pos[LANGUAGE_NONE][0]['value'];
$width = $fc_item['#entity']->field_width[LANGUAGE_NONE][0]['value'];
$height = $fc_item['#entity']->field_height[LANGUAGE_NONE][0]['value'];
$vars['items'][$delta]['#attributes']['style'] = "position: absolute; top: {$top}px; left: {$left}px; width: {$width}px; height: {$height}px;";
$vars['items'][$delta]['#attributes']['class'][] = 'lighttable-image-container';
}
}
}
}
}
示例5: bartik_preprocess_maintenance_page
/**
* Implements hook_preprocess_maintenance_page().
*/
function bartik_preprocess_maintenance_page(&$variables)
{
if (!$variables['db_is_active']) {
unset($variables['site_name']);
}
drupal_add_css(drupal_get_path('theme', 'bartik') . '/css/maintenance-page.css');
}
示例6: reset_preprocess_views_view_grid
/**
* Display a view as a grid style.
*/
function reset_preprocess_views_view_grid(&$vars)
{
drupal_add_css(drupal_get_path('theme', 'reset') . '/css/views-view-grid.css');
foreach (element_children($vars['row_classes']) as $key => $value) {
$vars['row_classes'][$key] .= 'view-grid-row has-' . $vars['options']['columns'] . '-cols';
}
}
示例7: gavias_laikafood_preprocess_html
/**
* Override or insert variables into the html template.
* @param $vars
* An array of variables to pass to the theme template.
*/
function gavias_laikafood_preprocess_html(&$vars)
{
global $theme, $base_url;
global $parent_root;
$skin = theme_get_setting('theme_skin');
drupal_add_css(drupal_get_path('theme', 'gavias_laikafood') . '/css/' . ($skin ? 'skins/' . $skin . '/' : '') . 'template.css', array('group' => CSS_DEFAULT, 'type' => 'file'));
drupal_add_css(drupal_get_path('theme', 'gavias_laikafood') . '/css/' . ($skin ? 'skins/' . $skin . '/' : '') . 'bootstrap.css', array('group' => CSS_DEFAULT, 'type' => 'file'));
if (module_exists('gavias_themer') && theme_get_setting('frontend_panel') == '1' && user_access('gavias_customize_preview')) {
gavias_load_fontend();
}
if (theme_get_setting('enable_custom_style') == 1 && trim(variable_get('gavias_profile'))) {
drupal_add_css(drupal_get_path('theme', 'gavias_laikafood') . '/customize/save/' . variable_get('gavias_profile') . '.css', array('group' => CSS_DEFAULT, 'type' => 'file'));
}
$viewport = array('#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1, maximum-scale=1'), '#weight' => 1);
drupal_add_html_head($viewport, 'viewport');
// Add boxed class if layout is set that way.
if (theme_get_setting('site_layout') == 'boxed') {
$vars['classes_array'][] = 'boxed';
}
if (theme_get_setting('preloader') == '1') {
$vars['classes_array'][] = 'js-preloader';
} else {
$vars['classes_array'][] = 'not-preloader';
}
}
示例8: unity_lab_preprocess_paragraphs_item_pg_common_card_rollover_card
function unity_lab_preprocess_paragraphs_item_pg_common_card_rollover_card(&$vars, $hook)
{
$backgroundImage = '';
$vars['button_text'] = 'Read Story';
if (!empty($vars['field_links'][0]['url'])) {
$vars['link_url'] = $vars['field_links'][0]['url'];
} else {
$vars['link_url'] = "#";
}
if (!empty($vars['field_links'][0]['title'])) {
$vars['button_text'] = $vars['field_links'][0]['title'];
}
if (isset($vars['field_image'])) {
$backgroundImage = $vars['field_image'][0]['uri'];
$backgroundImage = file_create_url($backgroundImage);
} else {
$backgroundImage = file_create_url('/sites/all/libraries/unity-lab/latest/images/backgrounds/farbeyond-stripes/redSwooshes.jpg');
}
if ($backgroundImage) {
// $vars['css_classes'][] = 'section-background-image';
// $vars['css_classes'][] = 'overlay-black';
// $vars['css_classes'][] = 'light-theme';
drupal_add_css('#' . $vars['css_id'] . ' {background-image: url(' . $backgroundImage . ');}', array('group' => CSS_THEME, 'type' => 'inline'));
}
}
示例9: singular_settings
/**
* Implementation of hook_settings() for themes.
*/
function singular_settings($settings)
{
// Add js & css
drupal_add_css('misc/farbtastic/farbtastic.css', 'module', 'all', FALSE);
drupal_add_js('misc/farbtastic/farbtastic.js');
drupal_add_js(drupal_get_path('theme', 'singular') . '/js/settings.js');
drupal_add_css(drupal_get_path('theme', 'singular') . '/css/settings.css');
file_check_directory(file_directory_path(), FILE_CREATE_DIRECTORY, 'file_directory_path');
// Check for a new uploaded logo, and use that instead.
if ($file = file_save_upload('background_file', array('file_validate_is_image' => array()))) {
$parts = pathinfo($file->filename);
$filename = 'singular_background.' . $parts['extension'];
if (file_copy($file, $filename, FILE_EXISTS_REPLACE)) {
$settings['background_path'] = $file->filepath;
}
}
$form = array();
$form['layout'] = array('#title' => t('Layout'), '#type' => 'select', '#options' => array('fixed' => t('Fixed width'), 'fluid' => t('Fluid width')), '#default_value' => !empty($settings['layout']) ? $settings['layout'] : 'fixed');
$form['messages'] = array('#type' => 'fieldset', '#tree' => FALSE, '#title' => t('Autoclose messages'), '#descriptions' => t('Select the message types to close automatically after a few seconds.'));
$form['messages']['autoclose'] = array('#type' => 'checkboxes', '#options' => array('status' => t('Status'), 'warning' => t('Warning'), 'error' => t('Error')), '#default_value' => !empty($settings['autoclose']) ? $settings['autoclose'] : array('status'));
$form['style'] = array('#title' => t('Styles'), '#type' => 'select', '#options' => singular_get_styles(), '#default_value' => !empty($settings['style']) ? $settings['style'] : 'sea');
$form['custom'] = array('#tree' => FALSE, '#type' => 'fieldset', '#attributes' => array('class' => $form['style']['#default_value'] == 'custom' ? 'singular-custom-settings' : 'singular-custom-settings hidden'));
$form['custom']['background_file'] = array('#type' => 'file', '#title' => t('Background image'), '#maxlength' => 40);
if (!empty($settings['background_path'])) {
$form['custom']['background_preview'] = array('#type' => 'markup', '#value' => !empty($settings['background_path']) ? theme('image', $settings['background_path'], NULL, NULL, array('width' => '100'), FALSE) : '');
}
$form['custom']['background_path'] = array('#type' => 'value', '#value' => !empty($settings['background_path']) ? $settings['background_path'] : '');
$form['custom']['background_color'] = array('#title' => t('Background color'), '#type' => 'textfield', '#size' => '7', '#maxlength' => '7', '#default_value' => !empty($settings['background_color']) ? $settings['background_color'] : '#888888', '#suffix' => '<div id="singular-colorpicker"></div>');
$form['custom']['background_repeat'] = array('#title' => t('Tile'), '#type' => 'select', '#options' => array('no-repeat' => t('Don\'t tile'), 'repeat-x' => t('Horizontal'), 'repeat-y' => t('Vertical'), 'repeat' => t('Both')), '#default_value' => !empty($settings['background_repeat']) ? $settings['background_repeat'] : 'no-repeat');
return $form;
}
示例10: importacionesgm_preprocess_html
/**
* Implements hook_preprocess_html().
* Meta tags https://drupal.org/node/1468582#comment-5698732
*/
function importacionesgm_preprocess_html(&$variables)
{
$meta_charset = array('#tag' => 'meta', '#attributes' => array('charset' => 'utf-8'));
drupal_add_html_head($meta_charset, 'meta_charset');
$meta_x_ua_compatible = array('#tag' => 'meta', '#attributes' => array('http-equiv' => 'x-ua-compatible', 'content' => 'ie=edge, chrome=1'));
drupal_add_html_head($meta_x_ua_compatible, 'meta_x_ua_compatible');
$meta_mobile_optimized = array('#tag' => 'meta', '#attributes' => array('name' => 'MobileOptimized', 'content' => 'width'));
drupal_add_html_head($meta_mobile_optimized, 'meta_mobile_optimized');
$meta_handheld_friendly = array('#tag' => 'meta', '#attributes' => array('name' => 'HandheldFriendly', 'content' => 'true'));
drupal_add_html_head($meta_handheld_friendly, 'meta_handheld_friendly');
$meta_viewport = array('#tag' => 'meta', '#attributes' => array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1'));
drupal_add_html_head($meta_viewport, 'meta_viewport');
$meta_cleartype = array('#tag' => 'meta', '#attributes' => array('http-equiv' => 'cleartype', 'content' => 'on'));
drupal_add_html_head($meta_cleartype, 'meta_cleartype');
// Use html5shiv.
if (theme_get_setting('html5shim')) {
$element = array('element' => array('#tag' => 'script', '#value' => '', '#attributes' => array('type' => 'text/javascript', 'src' => file_create_url(drupal_get_path('theme', 'importacionesgm') . '/js/html5shiv-printshiv.js'))));
$html5shim = array('#type' => 'markup', '#markup' => "<!--[if lt IE 9]>\n" . theme('html_tag', $element) . "<![endif]-->\n");
drupal_add_html_head($html5shim, 'sonambulo_html5shim');
}
// Use Respond.js.
if (theme_get_setting('respond_js')) {
drupal_add_js(drupal_get_path('theme', 'importacionesgm') . '/js/respond.min.js', array('group' => JS_LIBRARY, 'weight' => -100));
}
// Use normalize.css
if (theme_get_setting('normalize_css')) {
drupal_add_css(drupal_get_path('theme', 'importacionesgm') . '/css/normalize.css', array('group' => CSS_SYSTEM, 'weight' => -100));
}
}
示例11: fire_preprocess_node
/**
* @file
* The primary PHP file for this theme.
*/
function fire_preprocess_node($vars)
{
// CSS overrides: content type
if (isset($vars['node'])) {
drupal_add_css(drupal_get_path('theme', 'fire') . '/css/page-' . $vars['node']->type . '.css', array('group' => CSS_THEME));
}
}
示例12: infine_preprocess_page
function infine_preprocess_page(&$variables)
{
drupal_add_css("http://fonts.googleapis.com/css?family=Roboto", 'external');
drupal_add_css("http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,300,700", 'external');
drupal_add_css(drupal_get_path('theme', 'infine') . '/icons/pictopro-normal/pictopro-normal.css');
drupal_add_css(drupal_get_path('theme', 'infine') . '/icons/pictopro-outline/pictopro-outline.css');
}
示例13: SimplyCivi_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @param $subtheme_defaults
* Allow a subtheme to override the default values.
* @return
* A form array.
*/
function SimplyCivi_settings($saved_settings, $subtheme_defaults = array())
{
/*
* The default values for the theme variables. Make sure $defaults exactly
* matches the $defaults in the template.php file.
*/
// Add CSS to adjust the layout on the settings page
drupal_add_css(drupal_get_path('theme', 'SimplyCivi') . '/css/theme-settings.css', 'theme');
// Add Javascript to adjust the layout on the settings page
// drupal_add_js(drupal_get_path('theme', 'SimplyCivi') . '/css/theme-settings.js', 'theme');
// Get the default values from the .info file.
$defaults = SimplyCivi_theme_get_default_settings('SimplyCivi');
// Allow a subtheme to override the default values.
$defaults = array_merge($defaults, $subtheme_defaults);
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
$form['SimplyCivi_dev'] = array('#type' => 'fieldset', '#title' => t('Development Settings'), '#weight' => 5, '#collapsible' => TRUE, '#collapsed' => FALSE);
// Setting for flush all caches
$form['SimplyCivi_dev']['SimplyCivi_rebuild_registry'] = array('#type' => 'checkbox', '#title' => t('Rebuild the theme registry on every page.'), '#default_value' => $settings['SimplyCivi_rebuild_registry'], '#description' => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a>. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'http://drupal.org/node/173880#theme-registry')));
$form['SimplyCivi_animated_submit'] = array('#type' => 'checkbox', '#title' => t('Prevent Duplicate Submits'), '#default_value' => $settings['SimplyCivi_animated_submit'], '#description' => t('This can be helpful to prevent users from hitting the submit button twice, however the autocomplete can interfere with this and cause it not to work. <a href="!link">More Information</a>', array('!link' => 'http://drupal.org/node/579070')));
$form['SimplyCivi_import_htmlmailings'] = array('#type' => 'checkbox', '#title' => t('CiviCRM Import HTML page function'), '#default_value' => $settings['SimplyCivi_import_htmlmailings'], '#description' => t('Adds the ability to import a full HTML page directly into the CiviCRM HTML mailing form. This is an experimental feature and does not do anything intelligent - it will load scripts and all kinds of bad stuff if you enter a bad URL, so only load URLs of pages that are <em>specifically made for HTML emails</a> (e.g. no: javascript, relative-paths for images, advanced CSS, etc..)'));
$form['SimplyCivi_block_edit_links'] = array('#type' => 'checkbox', '#title' => t('Show block edit and configure links for those with appropriate permissions'), '#default_value' => $settings['SimplyCivi_block_edit_links'], '#description' => t('This setting will display links to configure blocks, edit blocks, or modify the menus for block menus for users with the appropriate permissions. When enabled the links may obscure small blocks like the New User block.'));
// Return the additional form widgets
return $form;
}
示例14: storelocator_app_block_filter_opening
return $output;
}
function storelocator_app_block_filter_opening($language)
{
drupal_add_css(drupal_get_path('module', 'storelocator_app') . '/css/storelocator_app.form.css');
$output = theme_block_filter_opening(drupal_get_form('storelocator_app_block_filter_form_opening', $language), $language);
//theme_block_filter_opening(drupal_get_form('storelocator_app_block_filter_form_opening', $language), $language);
示例15: progressive_sub_preprocess_html
/**
* Implementation of hook_preprocess_html().
*/
function progressive_sub_preprocess_html(&$variables)
{
global $language;
$css_customizer = theme_get_setting('skin') . '-pages-customizer.css';
drupal_add_css(drupal_get_path('theme', 'progressive') . '/css/customizer/' . $css_customizer, array('group' => CSS_THEME));
drupal_add_css(drupal_get_path('theme', 'progressive_sub_sub') . '/css/custom.css');
if ($language->dir == 'rtl') {
drupal_add_css(drupal_get_path('theme', 'progressive') . '/css/drupal-rtl.css', array('group' => CSS_THEME));
}
drupal_add_js(array('theme_path' => drupal_get_path('theme', 'progressive'), 'basePath' => base_path(), 'progressive' => array('mobile_menu_toggle' => theme_get_setting('mobile_menu_toggle')), 'ubercart_currency' => variable_get('uc_currency_sign')), 'setting');
// Page 404
if (arg(0) == 'page-404-bg') {
$variables['classes_array'][] = 'page-404-promo';
}
// Login Page
global $user;
if (arg(0) == 'user' && (in_array(arg(1), array('register', 'password', 'login')) || arg(1) == '' && !$user->uid)) {
$variables['classes_array'][] = 'page-login-promo';
}
if (theme_get_setting('boxed') || $_GET['q'] == 'node/107' && strpos($_SERVER['HTTP_HOST'], 'nikadevs') !== FALSE) {
$variables['classes_array'][] = 'boxed';
}
$layout = _nikadevs_cms_get_active_layout();
$one_page = isset($layout['settings']['one_page']) && $layout['settings']['one_page'] ? 1 : 0;
if (theme_get_setting('header_top_menu') && !in_array($_GET['q'], array('user/login', 'user/register', 'user/password')) && !$one_page) {
$variables['classes_array'][] = 'hidden-top';
}
if ($one_page) {
$variables['classes_array'][] = 'one-page';
}
}