BLOG

  • 21/02/2012 - 17:12 0
    Cambiar el include/cache.inc en la linea 42:
     
    Desde
     
    if (isset($user->cache) && $user->cache > $cache->created) {
     
    a
     
    if (isset($user->cache) && $user->cache > $cache->expire) {
  • 18/01/2012 - 10:38 0
  • 01/12/2011 - 10:30 0
      // CREATE A PRESET IMAGECACHE
      $imagecachepreset = imagecache_preset_save(array('presetname' => 'PRESET_NAME'));
      // Action
      $imagecacheaction = new stdClass ();
      $imagecacheaction->presetid = $imagecachepreset['presetid'];
      $imagecacheaction->module = 'imagecache';
      $imagecacheaction->action = 'imagecache_scale_and_crop';
      $imagecacheaction->data = array('width' => '200', 'height' => '200' );
      drupal_write_record('imagecache_action', $imagecacheaction);
  • 29/11/2011 - 16:56 0
  • 29/11/2011 - 12:17 0
     <?php
    function my_form($form_state)
    {
      
    $users = array
      (
        array(
    'uid' => 1'first' => 'Indy''last' => 'Jones'),
        array(
    'uid' => 2'first' => 'Darth''last' => 'Vader'),
        array(
    'uid' => 3'first' => 'Super''last' => 'Man'),
      );

      foreach(

    $users as $user)
      {
        
    $checkboxes[$user['uid']] = ''
        
    $form[$user['uid']]['first_name'] = array 
        (
          
    '#value' => $user['first'],
        );
        
    $form[$user['uid']]['last_name'] = array 
        (
          
    '#value' => $user['last'],
        );
      }

      

    $form['checkboxes'] = array
      (
        
    '#type' => 'checkboxes',
        
    '#options' => $checkboxes
      );
      
    $form['#theme'] = 'my_form_theme'
      return 
    $form;
    }

    function 

    mymodule_theme()
    {
      return array
      (
        
    'my_form_theme' => array
        (
          
    'arguments' => array('form' => NULL),
        ),
      );
    }

    function 

    theme_my_form_theme($form)
    {
      
    $rows = array();

      foreach(

    element_children($form['checkboxes']) as $uid
      {
        
    $row = array(); 
        
    $row[] = drupal_render($form['checkboxes'][$uid]); 
        
    $row[] = drupal_render($form[$uid]['first_name']); 
        
    $row[] = drupal_render($form[$uid]['last_name']); 
        
    $rows[] = $row;
      }
      
      if(
    count($rows))
      {
        
    $header = array(theme('table_select_header_cell') , t('First Name'), t('Last Name')); 
      }
      else
      {
        
    $header = array(t('First Name'), t('Last Name')); 
        
    $row = array();
        
    $row[] = array
        (
          
    'data' => t('No users were found'),
          
    'colspan' => 2,
          
    'style' => 'text-align:center',
        );
        
    $rows[] = $row;
      }
      
      
    $output theme('table'$header$rows);
      return 
    $output drupal_render($form); 
    }
    ?>
  • 29/11/2011 - 12:17 0
     <?php
    function my_form($form_state)
    {
      
    $users = array
      (
        array(
    'uid' => 1'first' => 'Indy''last' => 'Jones'),
        array(
    'uid' => 2'first' => 'Darth''last' => 'Vader'),
        array(
    'uid' => 3'first' => 'Super''last' => 'Man'),
      );

      foreach(

    $users as $user)
      {
        
    $checkboxes[$user['uid']] = ''
        
    $form[$user['uid']]['first_name'] = array 
        (
          
    '#value' => $user['first'],
        );
        
    $form[$user['uid']]['last_name'] = array 
        (
          
    '#value' => $user['last'],
        );
      }

      

    $form['checkboxes'] = array
      (
        
    '#type' => 'checkboxes',
        
    '#options' => $checkboxes
      );
      
    $form['#theme'] = 'my_form_theme'
      return 
    $form;
    }

    function 

    mymodule_theme()
    {
      return array
      (
        
    'my_form_theme' => array
        (
          
    'arguments' => array('form' => NULL),
        ),
      );
    }

    function 

    theme_my_form_theme($form)
    {
      
    $rows = array();

      foreach(

    element_children($form['checkboxes']) as $uid
      {
        
    $row = array(); 
        
    $row[] = drupal_render($form['checkboxes'][$uid]); 
        
    $row[] = drupal_render($form[$uid]['first_name']); 
        
    $row[] = drupal_render($form[$uid]['last_name']); 
        
    $rows[] = $row;
      }
      
      if(
    count($rows))
      {
        
    $header = array(theme('table_select_header_cell') , t('First Name'), t('Last Name')); 
      }
      else
      {
        
    $header = array(t('First Name'), t('Last Name')); 
        
    $row = array();
        
    $row[] = array
        (
          
    'data' => t('No users were found'),
          
    'colspan' => 2,
          
    'style' => 'text-align:center',
        );
        
    $rows[] = $row;
      }
      
      
    $output theme('table'$header$rows);
      return 
    $output drupal_render($form); 
    }
    ?>
  • 28/11/2011 - 11:46 0
    Esta es una buena guía para crea una form en drupal 6
     
  • 24/11/2011 - 15:41 0
  • 21/11/2011 - 17:16 0
    http://www.filmaffinity.com/es/film484248.html
  • 21/11/2011 - 15:49 0
    http://elmundodelosasi.wordpress.com/2011/10/12/festen-la-celebracion-de-thomas-vinterberg/
  • 17/11/2011 - 13:16 0
  • 16/11/2011 - 11:27 0
     
    <?php
    function phptemplate_preprocess_node(&$vars) {
       
    $vars['template_files'][] = 'node-' . $vars['nid'];
    }
    ?>
  • 15/11/2011 - 16:55 0
  • 15/11/2011 - 15:45 0
  • 11/11/2011 - 16:23 0
  • 02/11/2011 - 12:05 0
    http://drupal.org/project/menutrails
  • 14/10/2011 - 09:16 0
  • 02/10/2011 - 18:01 0
    ini_set('display_errors',1);
    error_reporting(E_ALL);
  • 01/10/2011 - 17:58 0
    http://drupal.org/project/openatrium
  • 01/10/2011 - 12:17 0
    http://www.colorzilla.com/gradient-editor/
     
    http://jonraasch.com/blog/css-rounded-corners-in-all-browsers
     
    http://robertnyman.com/2010/03/16/drop-shadow-with-css-for-all-web-browsers/
  • 19/08/2011 - 11:24 0
  • 11/07/2011 - 13:00 0
    http://drupal.org/project/issuu
  • 29/04/2011 - 12:55 0
    Transformar filtros expuestos en tabs!!
  • 29/04/2011 - 12:53 0
  • 29/04/2011 - 11:32 0

      http://drupal.org/project/css3pie
     
    ¿Por qué?
    CSS Nivel 3 trae consigo algunas características de estilo increíblemente poderosa.Las esquinas redondeadas, sombras suaves gota, rellenos degradados, y así sucesivamente. Estos son los tipos de elementos de diseño a nuestros amigos les encanta usar porque hacen de los sitios atractivos, pero es difícil y requiere mucho tiempo para poner en práctica, con la participación imágenes complejas sprite, el marcado adicional no-semántico, las grandes bibliotecas de JavaScript, y otros hacksencantadora.

    CSS3 promesas de acabar con todo eso! Pero como todos sabemos, debido a lafalta de Internet Explorer de apoyo para cualquiera de estas características, debemostener paciencia y se abstengan de utilizar, y hacerlo con las mismas técnicas antiguastedioso para el futuro previsible.

  • 29/04/2011 - 11:06 0
  • 23/04/2011 - 22:43 0
  • 18/04/2011 - 19:51 0
  • 18/04/2011 - 19:40 0
    Collection of my photos in Barcelona
  • 15/04/2011 - 16:40 0
    Para traducir los terminos que salen en un filtro de la vista hace falta hook y a lo mejor aplicarlo a un filtro especifico utilizando el el    
    if($info['operator'] == "tid_op"){
     
    Se puede poner en el template.php del theme
    <?php
    /**
    * Default theme function for all filter forms.
    */
    function matteportalbcn_preprocess_views_exposed_form(&$vars) {
      $form = &$vars['form'];

      foreach ($form['#info'] as $id => $info) {
          if($info['operator'] == "tid_op"){
            $widget = new stdClass;
            // set up defaults so that there's always something there.
            $widget->label = $widget->operator = $widget->widget = NULL;
       
            $widget->id = $form[$info['value']]['#id'];
            if (!empty($info['label'])) {
              $widget->label = $info['label'];
            }
            if (!empty($info['operator'])) {
              $widget->operator = drupal_render($form[$info['operator']]);
            }
            $options = array();
            foreach($form[$info['value']]['#options'] as $key=>$option) {
                $options[$key]=tt('taxonomy:term:'. $key .':name', $option);  
            }
           unset($form[$info['value']]['#printed']);
           $form[$info['value']]['#options'] = $options;
       
            $widget->widget = drupal_render($form[$info['value']]);
            $vars['widgets'][$id] = $widget;
          }
      }

    }

     ?>