Recent Posts

Get theme path for use inside views global text fields

  1. function hook_views_pre_view(&$view, &$display_id) {
  2.   if ($view->name == 'news' && $display_id == 'page')
  3.   {
  4.     $opts = $view->get_item($display_id, 'field', 'nothing');
  5.     $opts['alter']['tex

Code

  1.                      Jan        Feb     Mar     Apr     May     Jun     Jul     Aug     Sep     Oct     Nov     Dec     Total
  2. Member 1             100        500     500     500     500     500     500     100     500     500     500     500     5200
  3. Member 2             200        400     400     400     400     400     400     200     400     400     400     400     4

Fix for Code

  1.   foreach ($items as $item) {
  2.     module_invoke_all('uc_cart_item', 'view', $item);
  3.     $display_item = module_invoke($item->module, 'uc_cart_display', $item);
  4.     if (!empty($display_item)) {
  5.    

Code

  1.   foreach ($items as $item) {
  2.     module_invoke_all('uc_cart_item', 'view', $item);
  3.     $display_item = module_invoke($item->module, 'uc_cart_display', $item);
  4.     if (!empty($display_item)) {
  5.    

Fix for filefield implementation in an admin page. "An HTTP error 0 occurred. /drupal/?q=filefield/ahah///"

  1. $form['table'][] = array(
  2.     'col1' => array(
  3.       '#value' => t('Upload Font'),
  4.     ),
  5.     'col2' => array(
  6.       'font_upload' => array(
  7.         '#theme' => 'content_multiple_values',
  8.      

Undefined index:

  1. Notice: Undefined index: !message in _php_errors_show() (line 170 of /sites/all/modules/php_errors/php_errors.module).
  2. Notice: Undefined index: %file in _php_errors_show() (line 170 of /sites/all/mod

searching for two different taxonomy terms - get this into views (2 on D6)?

  1. SELECT COUNT(1) FROM node n
  2.   INNER JOIN term_node tn ON n.vid = tn.vid
  3.   INNER JOIN term_data td ON tn.tid = td.tid
  4.   INNER JOIN term_node tn2 ON n.vid = tn2.vid
  5.   INNER JOIN term_data td2 ON

Converting D6 to D7

  1.   // D7 version
  2.   $query = db_select('users', 'u');
  3.   $query->join('users_roles', 'r', 'u.uid = r.uid'); // JOIN users with users_roles
  4.   $query->fields('u', array('uid', 'name', 'mail', 'status'))

error on clone same as earlier error on migrate

  1. WD registry: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'FeedsCSVParser-class' for key 1: INSERT INTO {registry} (name, type, filename, module, weight) VALUES

Reordering ORDER BY elements in selectQuery query

  1. <?php
  2.  
  3. function hook_views_pre_execute(&$view) {
  4.   if ($view->name == 'view_name') {
  5.     $q = &$view->build_info['query'];
  6.     $q->join('field_data_field_review_rating', 'field_review_rating', 'f

Fix for Fix for prefix_sufix_admin.inc

  1. <?php
  2.  
  3. /**
  4.  * @file
  5.  * Admin page callback for prefix_sufix module.
  6.  */
  7.  
  8. /**
  9.  * Builds and returns the prefix_sufix settings form.
  10.  */
  11. function prefix_sufix_settings($form, &$form_state){
  12.        

Fix for prefix_sufix_admin.inc

  1. <?php
  2.  
  3. /**
  4.  * @file
  5.  * Creates a Table in the database for storing sufixes and prefixes.
  6.  */
  7.  
  8. /**
  9.  * Implementation of hook_menu()
  10.  */
  11.  
  12. function prefix_sufix_menu(){
  13.         $items['admin/struct

Form random errors

  1.  $form['settings']['replace_group'] = array(
  2.     '#title' => t('Replace group'),
  3.     '#description' => t('Override old group relationships'),
  4.     '#type' => 'select',
  5.     '#options' => array(
  6.    

Create a user

  1. $authorNames = explode(',', $row->byline);
  2.     $rolesAll = user_roles();
  3.     $roles = array();
  4.     $roles[array_search('author', $rolesAll)] = 'author';
  5.  
  6. $new_user = array(
  7.               'name'

Code

  1. /**
  2.  * Implements hook_entity_info().
  3.  */
  4. function audio_entity_entity_info() {
  5.   $return = array(
  6.     'audio_entity' => array(
  7.       'label' => t('Audio Entity'),
  8.       'controller class' =>

Code

  1. /**
  2.  * Implements hook_schema().
  3.  */
  4. function audio_entity_schema() {
  5.   $schema['audio_entity'] = array(
  6.     'description' => 'Stores information about our Audio Entities.',
  7.     'fields' => ar

★ DDoS & Hacking/Dump Database Services ★

  1. ★ DDoS, Database Dump And Hacking Services ★
  2. -----
  3. You want to launch a DDoS on a website?
  4. You want to hack a website?
  5. You need a dump database from any website?
  6. -----
  7. I CAN HELP YOU ABOUT THESE

Code

  1. aegir@aluminium:~$ drush provision-save ddddd --context_type=site --uri=ddddd.aluminium.ariane.tractebel.be --platform=@platform_drupal --db_server=@server_localhost --profile=livingattrasys --root=/v

Code

  1. git log --pretty=oneline master | head
  2. 92f86e97f2881369938348fa6562b58ca1ae584e Fix warning.
  3. 5345e3d3d3f6dba4117e6465eca8d40262f7f44e Fix #589 +  (Cleanup a bit cartier_product + cartier_product_ui)

Title and Subtitle block

  1. $view = new view;
  2. $view->name = 'titolosottotitolo';
  3. $view->description = 'Visualizza il titolo e il sottotitolo associato';
  4. $view->tag = 'default';
  5. $view->base_table = 'node';
  6. $view->human_name
Syndicate content