/** * Page alter. */ function bizreview_page_alter($page) { $mobileoptimized = array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array( 'name' => 'MobileOptimized', 'content' => 'width' ) ); $handheldfriendly = array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array( 'name' => 'HandheldFriendly', 'content' => 'true' ) ); $viewport = array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array( 'name' => 'viewport', 'content' => 'width=device-width, initial-scale=1' ) ); drupal_add_html_head($mobileoptimized, 'MobileOptimized'); drupal_add_html_head($handheldfriendly, 'HandheldFriendly'); drupal_add_html_head($viewport, 'viewport'); } /** * Preprocess variables for html.tpl.php */ function bizreview_preprocess_html(&$variables) { /* Color */ $file = 'color-' . theme_get_setting('theme_color') . '-style.css'; drupal_add_css(path_to_theme() . '/css/'. $file, array('group' => CSS_THEME, 'weight' => 115,'browsers' => array(), 'preprocess' => FALSE)); /** * Add IE8 Support */ drupal_add_css(path_to_theme() . '/css/ie8.css', array('group' => CSS_THEME, 'browsers' => array('IE' => '(lt IE 9)', '!IE' => FALSE), 'preprocess' => FALSE)); /** * Add Javascript for enable/disable Bootstrap 3 Javascript */ if (theme_get_setting('bootstrap_js_include', 'bizreview')) { drupal_add_js(drupal_get_path('theme', 'bizreview') . '/bootstrap/js/bootstrap.min.js'); } //EOF:Javascript /** * Add Javascript for enable/disable scrollTop action */ if (theme_get_setting('scrolltop_display', 'bizreview')) { drupal_add_js('jQuery(document).ready(function($) { $(window).scroll(function() { if($(this).scrollTop() != 0) { $("#toTop").fadeIn(); } else { $("#toTop").fadeOut(); } }); $("#toTop").click(function() { $("body,html").animate({scrollTop:0},800); }); });', array('type' => 'inline', 'scope' => 'header')); } //EOF:Javascript } /** * Override or insert variables into the html template. */ function bizreview_process_html(&$vars) { // Hook into color.module if (module_exists('color')) { _color_html_alter($vars); } } /** * Preprocess variables for page template. */ function bizreview_preprocess_page(&$vars) { /** * insert variables into page template. */ if($vars['page']['sidebar_first'] && $vars['page']['sidebar_second']) { $vars['sidebar_first_grid_class'] = 'col-md-2'; $vars['sidebar_second_grid_class'] = 'col-md-3'; $vars['main_grid_class'] = 'col-md-7'; } elseif ($vars['page']['sidebar_first'] && !($vars['page']['sidebar_second'])) { $vars['sidebar_first_grid_class'] = 'col-md-3'; $vars['main_grid_class'] = 'col-md-9'; } elseif (!($vars['page']['sidebar_first']) && $vars['page']['sidebar_second']) { $vars['sidebar_second_grid_class'] = 'col-md-4'; $vars['main_grid_class'] = 'col-md-8'; } else { $vars['main_grid_class'] = 'col-md-12'; } if($vars['page']['header_top_left'] && $vars['page']['header_top_right']) { $vars['header_top_left_grid_class'] = 'col-md-6'; $vars['header_top_right_grid_class'] = 'col-md-6'; } elseif ($vars['page']['header_top_right'] || $vars['page']['header_top_left']) { $vars['header_top_left_grid_class'] = 'col-md-12'; $vars['header_top_right_grid_class'] = 'col-md-12'; } if($vars['page']['preface_first'] && $vars['page']['preface_second']) { $vars['preface_first_grid_class'] = 'col-md-9'; $vars['preface_second_grid_class'] = 'col-md-3'; } elseif ($vars['page']['preface_second'] || $vars['page']['preface_first']) { $vars['preface_first_grid_class'] = 'col-md-12'; $vars['preface_second_grid_class'] = 'col-md-12'; } if($vars['page']['main_navigation'] && $vars['page']['sub_navigation']) { $vars['main_navigation_grid_class'] = 'col-md-3'; $vars['sub_navigation_grid_class'] = 'col-md-7'; } else { $vars['main_navigation_grid_class'] = 'col-md-10'; $vars['sub_navigation_grid_class'] = 'col-md-10'; } } /** * Override or insert variables into the page template. */ function bizreview_process_page(&$variables) { // Hook into color.module. if (module_exists('color')) { _color_page_alter($variables); } if ($variables['node']->type == "business") $variables['title'] = 0; } /** * Preprocess variables for block.tpl.php */ function bizreview_preprocess_block(&$variables) { $variables['classes_array'][]='clearfix'; } function bizreview_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'user_register_form') { drupal_set_title(t('Create new account')); } elseif ($form_id == 'user_pass') { drupal_set_title(t('Request new password')); } elseif ($form_id == 'user_login') { drupal_set_title(t('Log in')); } elseif ($form_id == 'demande_de_devis_node_form') { drupal_set_title(t('Envoyer votre demande de devis')); $form["actions"]["submit"]["#value"] = t('Envoyer ma demande'); $form["actions"]["preview"]["#value"] = t('Récapitulatif'); } elseif ($form_id == 'contact_entreprise_node_form') { drupal_set_title(t('Envoyer un message')); $form["actions"]["submit"]["#value"] = ' '.t('Envoyer'); $current_content = menu_get_object(); $form['field_entreprise']["und"]["#default_value"] = array($current_content->uid); } elseif($form_id == 'commerce_checkout_form_review_direct') { $form['buttons']['continue']['#value'] = 'Finaliser et payer'; } elseif ($form_id == 'business_node_form') { drupal_set_title(t('Ajouter votre entreprise')); } } function bizreview_node_validate($node, $form, &$form_state) { if($node->type == 'business'){ // For now assign the static value to MAX_NODES (No. of nodes), // however you can make it dynamic, and get those values using variable_get(). $max_nodes = 1; $node_count = 0; // Get the user uid from the global user variable. global $user; $user_id = $user->uid; if(!isset($node->nid) || empty($node->nid)){ if ((isset($node->uid))) { // Use entity query to get the number of nodes already published by this user. $query = new EntityFieldQuery; $node_count = $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'business') ->propertyCondition('uid', $user_id) ->count() ->execute(); // Check if the node count exceeds the max_node value. if ($node_count >= $max_nodes) { form_set_error('FIELD_NAME', t('Une entreprise est déjà reliée à ce compte.')); } } } } } function block_render($module, $block_id) { $block = block_load($module, $block_id); $block_content = _block_render_blocks(array($block)); $build = _block_get_renderable_array($block_content); $block_rendered = theme_status_messages()." ".drupal_render($build); print $block_rendered; } function bizreview_menu_tree__menu_mon_compte($variables) { global $user; $tree = ''; $tree .= '
  • Mon abonnement
  • '; $tree .= ''; return $tree; } function bizreview_menu_link($variables) { global $user; $premium = false; if(!empty($user)){ $roles_author = $user->roles; if(!empty($roles_author)) if(in_array("utilisateur premium", $roles_author)) $premium = true; } if($variables["element"]["#original_link"]["menu_name"] == "menu-mon-compte"){ $class = ''; if($variables["element"]["#attributes"]["id"] == "mon-entreprise") $class = 'glyphicon glyphicon-home'; if($variables["element"]["#attributes"]["id"] == "appels-offre") $class = 'glyphicon glyphicon-download-alt'; if($variables["element"]["#attributes"]["id"] == "messages-prives") $class = 'glyphicon glyphicon-envelope'; if($variables["element"]["#attributes"]["id"] == "mon-compte") $class = 'glyphicon glyphicon-user'; $return = ""; if($variables["element"]["#attributes"]["id"] == "mon-entreprise" && $premium == false){ $return = '
  • '.$variables["element"]["#original_link"]["link_title"].'
  • Appels d\'offre
  • '; } else { $return = '
  • '.$variables["element"]["#original_link"]["link_title"].'
  • '; } return $return; } return theme_menu_link($variables); }

    Coff.elec+

    6 rue saint jean - 22400 LAMBALLE

    Coff.elec+

    Nous situer

    Aucune information de géolocalisation renseignée.

     Activité(s)

    À propos

    Electricite petits travaux d'amenagement interieur


    Fatal error: Call to undefined function block_render() in /var/www/Portail-Artisans/sites/all/themes/bizreview/templates/node--business.tpl.php on line 146