Version: Drupal 6.22
For whatever reason Cron will stop working occasionally on a site. The symptoms can vary, in some browsers it loads the custom 404 error page, and in IE it actually went to a white screen but the aggregator data was not being updated. When running cron manually from the Status Report page it simply says cron failed.
Solution:
First run Clear Cache from Admin -> Performance
Edit "common.inc" in the "/includes" directory.
On about line 2721 you need to change;
// Fetch the cron semaphore
Surprisingly hard to find, certain snippets floating around on the web do not work for specific versions of CCK. So far these are foolproof with Drupal 6.
global $user;
return array(0=> array('value' => $user->uid));
global $user;
return array(0=> array('value' => $user->name));
global $user;
$account = user_load(array('uid' => $user->uid));
return array(
0 => array('value' => $account->profile_commloc),
);
global $user;
return array(0 => array('value' => $user->mail));
A few default device passwords that have come in handy over the years... Drop us a line if you have some to add and we would gladly do so :D
There are times where you want to hide Drupal blocks from certain pages but occasionally you want to have them only appear on certain types of content. This can be done with a small block of php code, this example works on Drupal 6, and it has been working great for us on multiple sites.
Take a backup of your site before you start, inserting php code can break stuff.
If you are trying to setup Clean URLs in Drupal with IIS and Isapi go to Clean URLs IIRF Settings with IIS for Drupal
This seems pretty simple but actually it activated that twitchy angry part of my brain when I tried getting it to work.
Scenario
- IIS Web Hosting
- Drupal 6.0
- Clean URLs working fine
But you want to do a standard 301 redirect for SEO and Google picked up a clean URL that doesn't exist anymore.
Modules Required
Date
Calendar
CCK
Also Recommend
views
jqueryui (for date picker pop-up)
Here is how you can change your css file (likely your style.css file in the theme folder) to have specific cck imagefields float tot he right of your node content.
In this example the machine readable name of the field is "imgfld", this is how the sample image on this page is aligned to the right side using cck.
Add the following to the CSS file of your theme
.field-field-imgfld {
float: right;
margin-left: 1em;
}
We had one customer that required a randomized banner but also had specific drupal pages where they wanted a particular header image to appear. This featured seemed worth the work so I dug into a few of the options out there and came out with a modified solution and minimal code.
This is some php I discovered on adaptive themes as well as the rotate.php that comes with marinelli theme and I have found it in other places as
well.
Non-www canonical url using Drupal 6 with IIS and IIRF installed. (Using Drupal 6.22)
Tested and true IIRF settings to remove the www from your URL to make it Google friendly. This also enables you to use clean urls with IIS web servers.
RewriteCond %{HTTP_HOST} ^www.example\.com$
RedirectRule ^/(.*)$ http://example.com/$1 [R=301]
# Accept a url with the following directories and pass them through unchanged.
RewriteRule ^/misc/(.*)$ /misc/$1 [I,L]
RewriteRule ^/files/(.*)$ /files/$1 [I,L]
RewriteRule ^/modules/(.*)$ /modules/$1 [I,L]