drupal

1 answers

Settings for Drupal cacherouter with memcache

14 points

Following is a configuration to be put in drupal's settings.php on using drupal cacherouter with memcache:

$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'memcache',
'server' => array('192.168.0.100:11211', '192.168.0.100:11212'),
'shared' => TRUE,
),
);

Read more »
Created by Anonymous 14 weeks 3 days ago
  Tags:

Disable drupal modules using MySQL query

Sometimes, you may want to disable or enable drupal modules using mysql queries. In my case, it has happened when disabling a module during peak traffic hours. I can not afford to disable a module from standard interface, since, it rebuilds menu_router bringing load to the database server. Connect to your mysql shell and then use following shell query to disable a module: UPDATE system SET status=0 WHERE name='module'; To list all drupal modules: SELECT * FROM system WHERE type='module';
3 answers

How to control background processes from inside Drupal?

4 points

Is there any way to start/stop background processes from inside Drupal?
I'm currently writing a module that has to continuously monitor a socket connection for events coming from a remote server.I thought about using hook_cron(), but I'm afraid that the infinite (or continuous) loop of my event handler would tie out other modules that use hook_cron().Another alternative would be to use batch api, but do batch processes run in the background?

Thanks in advance,
Leo

Read more »
Created by Anonymous 16 weeks 3 days ago
  Tags:
0 answers

How to store extra information in Drupal $node?

6 points

Hi All,

In my drupal theming, I am stuck. I am using Drupal 6.

I have some extra data that I want to put in $node, so that I can show this data when theming the template file (node-contentype.tpl.php). I don't want to query mysql database in my template file?

Please help.

Read more »
Created by Anonymous 16 weeks 4 days ago
  Tags:
1 answers

White Blank Screen when installing drupal

0 points

I am installing Drupal and I am getting white blank screen of death with nothing in it. How do I solve it?

Read more »
Created by Anonymous 17 weeks 1 day ago
  Tags:
4 answers

“Too many connections” error in Mysql

2 points

I am getting "too many connections" error when my drupal appliation try to connect to the mysql server. I don't seem to be having too much traffic and this error seems to surprize me. I have browsed over the web, but could not find a reason that solves this issue. Any help is appreciated.

David

Read more »
Created by Anonymous 18 weeks 1 day ago
  Tags:

Sortable Drupal Pagination: pager_query

Drupal pagination can be achieved using pager_query API function and tablesort. I am here mentioning the code snippet that would help create drupal pagination of the output that is sortable with fields. <?php  $sql = 'SELECT cid, first_name, last_name, company, city FROM {clients}';  $limit = 20;  $header = array(    array('data' => t('Name'), 'field' => 'last_name', 'sort' => 'asc'),    array('data' => t('Company'), 'field' => 'company'),    array('data' => t('City'), 'field' => 'city')  );  $tablesort = tablesort_sql($header);?>
1 answers

Fatal error: Call to undefined function arg()

7 points

I get Fatal error: Call to undefined function arg() in my hook_init() in my custom module when checking for arg(1). This works well for authenticated user, but fails for logged out users. Any help?

Read more »
Created by programmer 18 weeks 4 days ago
  Tags:

Complete Drupal 6 Menu Theming

Drupal 6 Theming of Menus This tutorial expands on the snippet at: Theming Drupal Menu and how to make it work for Drupal 6. Theming Drupal menus are easy once you understand the key drupal menu theming API functions. I will go one by one depending on the level of css selector (id/class) you want to put on drupal menu system. Theming by adding css id/class to a Drupal Menu ul
1 answers

Drupal Menu Drop Down?

11 points

I am a newbie. What is the best way to create a drop down menu system in Drupal? Am I required to do some drupal themeing? Like here: drupal menu theming.

Read more »
Created by Anonymous 18 weeks 5 days ago
  Tags: