Drupal Logo

hook_menu path not working in Drupal (6,7)

Right From Drupal website : This hook enables modules to register paths in order to define how URL requests are handled. Paths may be registered for URL handling only, or they can register a link to be placed in a menu (usually the Navigation menu). A path and its associated information is commonly called a … Continue reading “hook_menu path not working in Drupal (6,7)”

Drupal Logo

[Solved] Add module to admin/config page in Drupal7

We are going to create a following custom block in admin/config page. To create a block in admin/config like those ‘People, Content Authoring, Media’ etc. We need to define two menu items as shown below [sourcecode language=”php” highlight=”3,13″]function products_menu() { $items = array(); $items[‘admin/config/products’] = array( ‘title’ => ‘Configure Products’, ‘description’ => ‘Allows administrators to … Continue reading “[Solved] Add module to admin/config page in Drupal7”

Xampp : Session Error

Below are the error in php due to session. This happens usually when server is unable to save the sessions data temporarily due to the improper path settings in session.save_path = “\xampp\tmp”. Solution is to set the session.savepath correctly to point to directory where server can find it easily. [php] Warning: session_start() [function.session-start]: open(\xampp\tmp\sess_nsvvoh9f5l55g063d7qka1lq72, O_RDWR) … Continue reading “Xampp : Session Error”

What is OpenCV ?

OpenCV [OpenCV] is an open source (see http://opensource.org) computer vision l ibrary available from http://SourceForge.net/projects/opencvlibrary. h e library is written in C and C++ and runs under Linux, Windows and Mac OS X. There is active development on interfaces for Python, Ruby, Matlab, and other languages. OpenCV was designed for computational efficiency and with a … Continue reading “What is OpenCV ?”

[Solution] warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’

VC++ Compiler throws warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’ warning when we try to declare float variable as double. Remember float M_PI = 3.1428571428571428     // This is actually double variable will throw the warning: warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’ The right way to do declare float varible is … Continue reading “[Solution] warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’”