How to upload images in drupal 6 form API?
Check the following article will help you easily go through:
Following are some drupal file form validate function
By default, drupal6 form api will create a select box with some default attributes like ‘class’ and ‘id’.
But how to add some custom attributes into the select? Continue reading Add custom attributes into Select element in Drupal6
Drupal provide a Form API to let us make a form. That is a right way to do that.
By default, it create a form element in html like this:
<div class="form-item" id="edit-email-wrapper">
<label for="edit-email" class="" style="display: block;">Email: <span class="form-required" title="This field is required.">*</span></label>
<input type="text" maxlength="127" name="email" id="edit-email" size="60" value="" class="form-text required StoreInput">
But how to add some custom html or class into it? Continue reading How to theme a form in Drupal6 with Drupal Form API
If you got this error, this article will save you:
Basically it is say the MySQL out of resources. Modify the MySQL configuration as following:
port = 3306
socket = /tmp/mysql.sock
key_buffer = 384M
max_allowed_packet = 64M
table_cache = 4096
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
In Windows this file is located by default at C:\Program Files\MySQL\MySQL Server X.Y\my.ini. In Linux this file is located at /etc/my.cnf to set global options, or /usr/local/var/mysql-data-dir/my.cnf to set server-specific options.
Important: Remember to keep backup files before you do anything! You will also have to reload the MySQL service after making changes to these configuration files.
There are already have some Drupal core function let us using templates. As the following. For Drupal 6, Drupal 6 Template Suggestions will help. If you want customise more flexible conditions, have a look on Working with template suggestions .
Just use the following file name rules to template drupal:
- page.tpl.php (global)
- page-front.tpl.php (front page)
- page-node-edit.tpl.php (node edit)
- page-node-[#].tpl.php (specific node)
- page-node.tpl.php (nodes – global)
- page-[internal/path].tpl.php (specific path)
- page-node-[content type].tpl.php (specific content type)
If not add the page prefix, like the following, then it will use page prefixed tpl file as their parent template( which already have layout including header and footer )
- node-[content type].tpl.php
take a look at this page: https://drupal.org/node/104319
In Drupal 7 template files are searched in the following order:
If the block delta key uses a hyphen, (-), replace this with an underscore (_).
Drupal 7 Template (Theme Hook) Suggestions
Drupal 5 & 6
In Drupal 5 and 6, template files are searched in the following order:
For example, the user login block has a delta of ‘0’. If you put it in the left sidebar, when it’s rendered, PHPTemplate will search for the following templates in descending order: