Web Development

Copyright block: a footer with php code in drupal (The Module)

A follow-up on Copyright block: a footer with php code in drupal<.

I've had some requests to make this a module , so here it is, and there is nothing spectacular about it. It is just an example on how to make a simple block module.

Another question was if you could put drupal copyright footer block< in your theme. The answer is yes, but then you would not be able to switch it on / off or change themes as easy.

How do I make a drupal theme from my html page.

If you already have a html file from your design, and are using stock drupal, then the info on these pages (Convert any website layout or template into a Drupal theme - easily! and Assigning content to regions) of the theming guide will get you along.

In short, there are the following regions;

  • left
  • right
  • content
  • header
  • footer

CCK, Views and Contemplate. A Product display setup.

CCK Product Display - RV DealershipCCK Product Display - RV Dealership

I just came across some development snapshots made in 2006 on the development of a database driven RV dealership.

Remember this is Drupal 4.74 CCK,Views,Contemplate, one custom module and some tweaking here and there (sometimes with a pipe wrench).

One of the major things was the theme, and because the designer (at that time) had little theming experience (I think not much designers had then, and this was a good one), I did the initial theming.

Recreational Vehicle Dealership Website

RV Dealership Web-SiteRV Dealership Web-Site

RV Dealership Project built with cck and views on drupal 4.x.

Access at the legacy project portal.

Guesthouse / Corporate Housing Project

Guesthouse / Corporate Housing ProjectGuesthouse / Corporate Housing Project

Guesthouse server, website and promotion project.

Copyright block: a footer with php code in drupal

FootersFooters

Drupal has a nice feature to input a site wide footer message from the administration panel, it can be found at Administer>>Site configuration>>Site informationn  scroll down to Footer message:.

The only thing with this is that it is text only, and what you typically want is to be able to add some dynamic content in there.

One of the first thing you would want to do is to add a copyright notice to your site. Now, there is a module for nearly everything, and so there is this gem appropriately called  'Copyright'  which can set the copyright for the entire site and for individual  content pages.

There is a simpler way that, although manual, will help keep your install "light".

What I do is to just create a block, set the input format to "PHP code" and enter the following code:

<p>&copy; <?php print(date(Y)) ?> <a href="/"><?php print(variable_get('site_name', '')) ?></a><br />
All rights reserved
</p>

After that you can further customize when and where it will appear, if you need special formatting you can add css classes to it and enhance it's display as needed.

drupal copyright footer block

<p>&copy; <?php print(date(Y)) ?> <a href="/"><?php print(variable_get('site_name', '')) ?></a><br />
All rights reserved
</p>
Syndicate content