Dynamic Copyright message in Drupal footer

If you want a dynamic footer in Drupal footer you can use thsi script.

The first year the messages sais:
Copyright© 2014PBC-techniek

All following years like:
Copyright© 2014-2015 PBC-techniek

The years are automaticly added


<?php
$FROM=2014;
$NOW = date('Y');
if ( $NOW == $FROM ) {
$DATESTRING = $NOW;
} else {

Update Drupal with drush without updating all modules

If you want to update Drupal core with drush but you don't want to update all contrib modules you can use this command.

drush up drupal

Strange why this is not in the drush manual

How-to remove the mdash after the text field in Drupal Twitter module


I was struggling around with removing the mdash character from the post on my website. It took some time till I realized that the dmash was NOT in the field-content but that is a field-separator.

Testpage for referen on sohf.nl

This is a testpage with a link to a subscribe page on www.sohf.nl if I click this link I should go to www.sohf.nl on the subscribe page. The sohf website stores the initial HTTP_REFERER in a session that I can recall by filling in the form.

Some more test links

Drupal: Set file permission on filesystem with a shell script

This script is to set all file permissions at once for a Drupal website.


!/bin/bash
# Script made by David Rush, davidprush@gmail.com
# Changes the permissions of the Drupal sites directory to secure after isntallation
# Very Important Put this script in the same directory as your site/ directory

Set Linux file permission for Dupal website

chown -R USER:www-data .
find . -type d -exec chmod u=rwx,g=rx,o= '{}' \;
find . -type f -exec chmod u=rw,g=r,o= '{}' \;

* change USER to your linux username

Rename the field quantity of Drupal uc_event_registration

To change the label of Ubercart Event Registration (uc_event_registration) without hacking the module simply insert some Jquery.

Put a pice of JQuery like this in your page.tpl.php

Drupal 6 Different page templates depending on URL aliases

Place this code in your template.php file if you want u use different templates for the same code.

Create a template named page-SOMETING-tpl.php
Create a url alias node/NID SOMETHING


function phptemplate_preprocess_page(&$vars) {
if (module_exists('path')) {
$alias = drupal_get_path_alias(str_replace('/edit','',$_GET['q']));
if ($alias != $_GET['q']) {

No Preview Images in Drupal 6.x ImageCache

Drupal-Logo.png

If you have no preview images in ImageCache under Drupal 6.x than is's possible that you do not have clean URL Enabled. ImageChache doesn't work with Clean URL Disabled.

Check: Admin --> Site configuration --> Clean URLs.

If "Disabled" switch to "Enabled"

Print alle node variables in Drupal

If you want to print all variables from a Drupal node insert this piece of code in the your template like node.tpl.php.

<pre>

Print alle node variables
<?php  print_r($node);?>

</pre>