I've seen drupal sites that don't have the timestamp under the catagory.. can someone please tell how to remove the timestamp from the catagory listing.. I for the life of me can't find the setting for this.. so i'm guessing it is somewhere in the code.. maybe one of the include.. files..

thanks
-Chris

Comments

sepeck’s picture

Theme global settings?
If that is not what you are looking for, then you will need to mention what theme you are using.

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

sithicus’s picture

I don't see the setting under the global setting that effects the timestamps.. (I could very possibly missing it) sorry for the noob question

silverwing’s picture

read it wrong

sithicus’s picture

nobody knows how to do this?

clancy@culturecat.net’s picture

The timestamp is okay; it just takes up a good bit of space that I'd like to cut if possible.

CultureCat

Geary’s picture

I don't think there is a setting for this. You need to modify the code.

Here's a general procedure for finding and changing this kind of thing.

First, we need a string to search for. Since the block is titled "Categories", we'll search for that string using any text editor (case dependent, whole word search).

There are several matches, but the ones that look promising are in taxonomy.module (line numbers are from Drupal 4.5.2):

Line 102:
$blocks[0]['info'] = t('Categories');

Line 112:
$block['subject'] = t('Categories');

That sure looks like it might have something to do with the subject of a block, doesn't it? With any luck, the code that fills in the content of the block will be somewhere near there. And it is (text broken into multiple lines here for readability):

Line 109:
$items[] =
    l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid) .
    '<br />' .
    t('%time ago', array('%time' => format_interval(time() - $category->updated)));

Looking at that, we can see that it puts three strings together. First is the category name and count. Second is a line break tag. Third is the time since last post.

So, we just need to change this line to keep the category name and count but omit the line break and time:

$items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid);

All done!

sepeck’s picture

Now let's not go modifing core modules that will complicate any upgrades. Simple display issue's like this are better handled through the customizing the theme.

A quick look at Friends Electric show that you probably want the node.tpl.php module
Open it up and look at line 14 I think.

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

jgoodstein’s picture

Sepeck,

That worked like a charm, thank you for that, I was really hesitant on updating modules, and your fix worked wonders!!!