Cron semaphore
Sometimes you want to avoid running massive operations during cron run, then you might want to at least first check if it is running. When cron runs it sets a variable called cron_semaphore in the variable table.
Sometimes you want to avoid running massive operations during cron run, then you might want to at least first check if it is running. When cron runs it sets a variable called cron_semaphore in the variable table.
This is how to save a node body, or stuff in node_revisions table without calling all hooks. I had a large report to be saved (over 6MB) and all unpacking and hooks made the server not to fulfil the job in a good way. Then I used just the part saving to the node_revisions table instead.
This is how you can run cron on Drupal 6 from a shell script and get out more of the cron run than via HTTP.
These are the PHP extentions I use to have on my servers.
php_curl
php_gd2
php_imap
php_mbstring
php_mycrypt
php_mysql
php_pdo_mysql
php_tidy
php_zip
This is how you can redirect a user to a destination after login
Based on good article referenced below, I have added some more form items to be used in my case.
When adding more columns or removing, it is important that the number of header items is the same as the number of columns, if you have less header items the drag and drop will not work.
I have added an extra row to be able to add new items.
If your theme has a template engine you can override a theme function in both your module and in your theme template.php
To override the function call theme('item_list') you have to copy the original function named theme_item_list and add it to your module or template.php replace theme_ with phptemplate_ and make your changes to the code.
Some useful Drupal functions
This is how to set Drupal 6.x site offline using SQL
UPDATE variable SET value='s:1:"1";' WHERE name = 'site_offline';
DELETE FROM cache WHERE CID = 'variables';
This is how to put it online again
UPDATE variable SET value='s:1:"0";' WHERE name = 'site_offline';
DELETE FROM cache WHERE CID = 'variables';
Nodemap show up in Firefox but not in Chrome, Opera and Internet Explorer in a correct way. By adding the following script it will solve the problem. The code below can be added in the end of your page.tpl.php template file.
</script>
<script type="text/javascript">
window.onload = function() {
load();
}
window.onunload = function() {
GUnload();
}
</script>
Or by adding it in a module by this code