All

Problemas com o submit

  1.   $items['admin/structure/taxonomy/pib_categories/grupos'] = array(
  2.     'title' => t('Adicionar Grupo/Subgrupo'),
  3.     'page callback' => 'pactum_extranet_add_group_subgroup_page',
  4.         'access callback

Fix for extranet

  1. <?php
  2.  
  3.   $items['admin/structure/taxonomy/pib_categories/grupos'] = array(
  4.     'title' => t('Adicionar Grupo/Subgrupo'),
  5. //    'page callback' => 'drupal_get_form',
  6.     'page callback' => 'pactum

extranet

  1. <?php
  2.  
  3.   $items['admin/structure/taxonomy/pib_categories/grupos'] = array(
  4.     'title' => t('Adicionar Grupo/Subgrupo'),
  5.     'page callback' => 'drupal_get_form',
  6.     'page arguments' => array('p

Fix for drush make snippet for apachesolr library

  1. ; "Solr PHP" library for the Drupal contrib module "Apache Solr Search Integration" (apachesolr).
  2. libraries[solrphpclient][destination] = modules/contrib/apachesolr
  3. libraries[solrphpclient][director

Fix for Embedding Google Maps, use object instead of iframe with XHTML Strict

  1. <object id="map" type="text/html" data="
  2. http://maps.google.com/maps?q=cyber+electronik&amp;hl=en&amp;sll=38.574834,-121.474957&amp;sspn=0.006295,0.006295&amp;ie=UTF8&amp;view=map&amp;cid=14202640731

Code

  1.   function drop_preprocess_page(&$variables) {
  2.         if ($variables['node']->type = "property_manager_registration") {
  3.           $variables['template_files'][] = "page--node--property-manager-registration";
  4.         }

Serializable closures

  1. <?php
  2.  
  3.  
  4.  
  5. class SuperClosure {
  6.  
  7.         protected $closure = NULL;
  8.         protected $reflection = NULL;
  9.         protected $code = NULL;
  10.         protected $used_variables = array();
  11.  
  12.         public function __construct($funct

Closures in menu item arguments

  1. <?php
  2.  
  3. $items['thing/new'] = array(
  4.   'title' => 'New thing',
  5.   'page callback' => 'my_thing_form',
  6.   'page arguments' => array(function() { return new MyThing; }),
  7. );
  8.  
  9. $items['thing/%mything'

dpr($content['field_headshot'])

  1. Array
  2. (
  3.     [#theme] => field
  4.    [#weight] => 3
  5.    [#title] => Headshot
  6.    [#access] => 1
  7.    [#label_display] => hidden
  8.    [#view_mode] => full
  9.    [#language] => und
  10.    [#field_name] =

Fix for Git push error

  1. ben@ubuntu:~/code/digio$ git push
  2. Counting objects: 21, done.
  3. Compressing objects: 100% (13/13), done.
  4. Writing objects: 100% (14/14), 8.79 KiB, done.
  5. Total 14 (delta 5), reused 0 (delta 0)
  6. error:

Проверка

  1. <?php
  2.  
  3. require_once('theme-settings.php');
  4.  
  5.  
  6. /**
  7.  * Initialize theme settings
  8.  */
  9. global $theme_key;
  10. if (db_is_active()) {
  11.   fusion_core_initialize_theme_settings($theme_key);
  12. }
  13.  
  14.  
  15. /**
  16.  

Code

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>"

$item['title'] = $item['title'];

  1. starting on line 94, culprit is $item['title'] = $item['title'];
  2.  
  3. foreach ($items as $item) {
  4.  
  5.     // Prepare the item:
  6.     foreach ($item as $key => $value) {
  7.       $item[$key] = trim($value);

Loading specific field

  1. $n = array(
  2. array('nid' => 1910),
  3. array('nid' => 1690),
  4. );
  5.  
  6.     $formats = array();
  7.     foreach ($n as $f) {
  8.       $e = new stdClass();
  9.     $e-> id = $f['nid'];
  10.     $e->bundle = 'bundle_name'

expire give non-aliased paths

  1. if your site have the non aliased url no-accesible (or redirect with global redirect), varnish never will have a hit on these urls
  2.  
  3. dity patch for expire:

Fix for Code

  1. # dig asociaciondrupal.es A
  2.  
  3. ; <<>> DiG 9.7.3 <<>> asociaciondrupal.es A
  4. ;; global options: +cmd
  5. ;; Got answer:
  6. ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8766
  7. ;; flags: qr rd ra; QUERY

Code

  1. dig +trace asociaciondrupal.es
  2.  
  3. ; <<>> DiG 9.6-ESV-R4-P3 <<>> +trace asociaciondrupal.es
  4. ;; global options: +cmd
  5. .                       104216  IN      NS      g.root-servers.net.
  6. .                       104216  IN      NS      e.root-servers.net.
  7. .                       104

About me

  1. Spent 2001-2007 developing strategies for wooden trains in Ohio. Prior to my current job I was short selling electric trains on the black market.

Fix for Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link,

  1. Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %li

Test

  1. #include<iostream>
  2. #include<conio.h>
  3. using namespace std;
  4.  
  5. int main(){
  6.         cout << "Hello World"  << endl;
  7.         cout << "Test program";
  8.         getch();
  9. }
Syndicate content