Skip to main content

Syndicate contentPHP

How to show all of first article on front page

May 6, 2010 by Steve

I want the first article showing on the front page, the most recent one, to show full length, while the rest of the articles show teasers as they normally do. There are not a lot of good references to this in the documentation, nor on the forum, nor elsewhere on the internet. It took a lot more searching around to figure this out than I thought it would.

Basically, there are two ways to do it: use the Views module or hack the theme PHP.

How to move the tags around on the node

May 3, 2010 by Steve

The part of the node layout that gives you all your taxonomy terms is called "terms". I've got these as subject tags, so I want them next to the title of the post. The default for Newswire is to have them at the bottom right, so I need to move them. This requires rearranging the PHP code in node.tpl.php and making some CSS changes, but none of this is too difficult. (This will be easier to follow if you have sites/all/themes/newswire/node.tpl.php open in the text editor of your choice while you are reading this.)

Hacking the theme

May 3, 2010 by Steve

The Newswire theme is just about exactly what I wanted when I first started drawing out my site on paper. There are just a few things that I wanted to change. Here's what I did:

  • Moved the "tags" block of links ("Drupal, theme, hack") for each node from the bottom right to the upper left. (Both CSS and PHP changes required.)
  • Changed the look for <code> sections. (CSS)
  • Changed the first post on the front page to print out full length. (PHP)

PHP setup for 1and1

April 29, 2010 by Steve

After setting up a php.ini file as described in this article, you need to add one more line. Drupal also requires that PHP be able to open other files on the server. This requires the fopen setting to be turned on. Open up your new php.ini file and add this line:

allow_url_fopen = On

Installation at 1and1

April 28, 2010 by Steve

At this point, you have downloaded the latest Drupal 6 package and the contributed modules that you want to use. You have them un-tarred and un-gzipped, and you have them running on your local machine or transferred them all to your web host of choice (or both). There are so many other tutorials covering those steps, I'm going to assume you can get that far without me.


Premium Drupal Themes by Adaptivethemes