JAFFAR

Blog

view:  full / summary

drupal 6 sprintf equivalent drupal7

Posted by jaffar on March 19, 2014 at 12:45 AM Comments comments (0)

$query = db_select('block') ->condition('theme', $theme_key) ->condition('status', 1) ->fields('block');dpm((string) $query);dpm($query->arguments());

SCSS for Drupal

Posted by jaffar on October 14, 2013 at 1:20 PM Comments comments (0)

Enable PHP memcache in windows

Posted by jaffar on September 11, 2013 at 9:40 AM Comments comments (0)

Steps to enable PHP memcache in Windows

  1. Download files http://downloads.php.net/pierre/php_memcache-2.2.6-5.3-vc9-x86.zip
  2. Extract and place in D:\wamp\bin\php\php5.3.10\ext\php_memcache.dll
  3. add the code "extension=php_memcache.dll " in php.ini file
  4. Download memcache.exe in http://code.jellycan.com/files/memcached-1.2.6-win32-bin.zip
  5. extract and place in D:\wamp\bin\php\memcache.exe
  6. Open command prompt
  7. type "cd d:\wamp\b...
Read Full Post »

Export mysql query result to csv

Posted by jaffar on September 11, 2013 at 7:10 AM Comments comments (0)

Export mysql query result to csv

mysql -u <username> -h <hostname> <databasename> -p"<password>" -e  "SELECT title FROM node" -B > /home/tmp/excel1.csv                    

 

Print data to PHP Error Log

 For Windows

ini_set("log_errors", 1);

ini_set("error_log", "D:/wamp/logs/php-error.log");

error_...

Read Full Post »

print array value in file using php

Posted by jaffar on September 10, 2013 at 2:10 PM Comments comments (0)

print an array in file

$a = array('a', 'b', 'c');

$handle = fopen('sample.txt', 'a');

fwrite($handle, print_r($a, TRUE));

Drupal Interview Question for Drupal 7

Posted by jaffar on August 3, 2013 at 11:55 AM Comments comments (1)

Some of the reference links

http://drupalor.com/2012/06/21/drupal-interview-questions-for-experienced-drupal-developer/

Core modules in drupal

https/drupal.org/node/1283408

OOPS in drupal

https/drupal.org/node/547518

Top 15 Permance tips drupal

http://www.netmagazine.com/features/top-15-dr...

Read Full Post »

Architecture: Site or Functionality

Posted by jaffar on July 24, 2013 at 2:45 AM Comments comments (0)

Site architecture includes how the site works, the number of modules, and how they interact.

Best Practice

Keep your site lean, using the minimal amount of code and fewest number of modules necessary. Use contrib

modules whenever possible rather than writing custom code. Become expert at key contrib modules, such as

Views and Panels. Follow Drupal standards for custom code. Reevaluate your architecture periodically.

Mistake: Too many modules. More than 200 module...

Read Full Post »

Architecture: Display

Posted by jaffar on July 24, 2013 at 2:40 AM Comments comments (0)

5 Mistakes to Avoid on Your Drupal Website 4

Architecture: Content

Content is the essence of your website, the reason it exists. Determining the structure of content is the first

step in creating website architecture.

Best Practice

Plan your content structures, including fields and content types. Clear content architecture helps ensure

good performance, a better user experience, and easier maintenance.

(You may find overlap here with Display Architect...

Read Full Post »

Architecture: Content

Posted by jaffar on July 24, 2013 at 2:40 AM Comments comments (0)

Architecture: Content

Content is the essence of your website, the reason it exists. Determining the structure of content is the first

step in creating website architecture.

Best Practice

Plan your content structures, including fields and content types. Clear content architecture helps ensure

good performance, a better user experience, and easier maintenance.

(You may find overlap here with Display Architecture, because Views often depend on certain content

Read Full Post »

Drop Primary key and add primary key in Drupal 6

Posted by jaffar on June 9, 2013 at 1:45 AM Comments comments (0)

  How to set primary key in by using modules in drupal 6.  The below code is used to execute the primary key in a table

section_sidebar is a table name  sbid is the primary key of the table section_sidebar

 

<?php

$ret = array();

db_drop_primary_key($ret, 'section_sidebar');

db_add_primary_key($ret, 'section_sidebar', array('sbid'));

 

db_drop_index($ret, 'section_sidebar', 'sidebar_block_w_h');

db_add_index($re...

Read Full Post »

Rss_feed